Adempiere 3.5.2a

org.compiere.model
Class MJournalLine

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_GL_JournalLine
          extended by org.compiere.model.MJournalLine
All Implemented Interfaces:
Serializable, Comparator, I_GL_JournalLine, I_Persistent, Evaluatee

public class MJournalLine
extends X_GL_JournalLine

Journal Line Model

Version:
$Id: MJournalLine.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.model.X_GL_JournalLine
A_ASSET_ID_AD_Reference_ID
 
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Fields inherited from interface org.compiere.model.I_GL_JournalLine
accessLevel, COLUMNNAME_A_Asset_Group_ID, COLUMNNAME_A_Asset_ID, COLUMNNAME_A_CreateAsset, COLUMNNAME_A_Processed, COLUMNNAME_AmtAcctCr, COLUMNNAME_AmtAcctDr, COLUMNNAME_AmtSourceCr, COLUMNNAME_AmtSourceDr, COLUMNNAME_C_ConversionType_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_UOM_ID, COLUMNNAME_C_ValidCombination_ID, COLUMNNAME_CurrencyRate, COLUMNNAME_DateAcct, COLUMNNAME_Description, COLUMNNAME_GL_Journal_ID, COLUMNNAME_GL_JournalLine_ID, COLUMNNAME_IsGenerated, COLUMNNAME_Line, COLUMNNAME_Processed, COLUMNNAME_Qty, Model, Table_ID, Table_Name
 
Constructor Summary
MJournalLine(MJournal parent)
          Parent Constructor
MJournalLine(Properties ctx, int GL_JournalLine_ID, String trxName)
          Standard Constructor
MJournalLine(Properties ctx, ResultSet rs, String trxName)
          Load Constructor
 
Method Summary
protected  boolean afterDelete(boolean success)
          After Delete
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save.
protected  boolean beforeSave(boolean newRecord)
          Before Save
 MAccount getAccount()
          Get Account (Valid Combination)
 MElementValue getAccountElementValue()
          Get Natural Account Element Value
 int getPrecision()
          Get Currency Precision
 boolean isDocControlled()
          Is it posting to a Control Acct
 void setAmtAcct(BigDecimal AmtAcctDr, BigDecimal AmtAcctCr)
          Set Accounted Amounts only if not 0.
 void setC_Currency_ID(int C_Currency_ID)
          Set C_Currency_ID and precision
 void setC_ValidCombination_ID(int C_ValidCombination_ID)
          Set C_ValidCombination_ID
 void setC_ValidCombination_ID(MAccount acct)
          Set C_ValidCombination_ID
 void setCurrency(int C_Currency_ID, int C_ConversionType_ID, BigDecimal CurrencyRate)
          Set Currency Info
 void setCurrencyRate(BigDecimal CurrencyRate)
          Set Currency Rate
 
Methods inherited from class org.compiere.model.X_GL_JournalLine
get_AccessLevel, getA_Asset_Group_ID, getA_Asset_Group, getA_Asset_ID, getAmtAcctCr, getAmtAcctDr, getAmtSourceCr, getAmtSourceDr, getC_ConversionType_ID, getC_ConversionType, getC_Currency_ID, getC_Currency, getC_UOM_ID, getC_UOM, getC_ValidCombination_ID, getCurrencyRate, getDateAcct, getDescription, getGL_Journal_ID, getGL_Journal, getGL_JournalLine_ID, getKeyNamePair, getLine, getQty, initPO, isA_CreateAsset, isA_Processed, isGenerated, isProcessed, setA_Asset_Group_ID, setA_Asset_ID, setA_CreateAsset, setA_Processed, setAmtAcctCr, setAmtAcctDr, setAmtSourceCr, setAmtSourceDr, setC_ConversionType_ID, setC_UOM_ID, setDateAcct, setDescription, setGL_Journal_ID, setGL_JournalLine_ID, setIsGenerated, setLine, setProcessed, setQty, toString
 
Methods inherited from class org.compiere.model.PO
beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compiere.model.I_Persistent
save
 

Constructor Detail

MJournalLine

public MJournalLine(Properties ctx,
                    int GL_JournalLine_ID,
                    String trxName)
Standard Constructor

Parameters:
ctx - context
GL_JournalLine_ID - id
trxName - transaction

MJournalLine

public MJournalLine(Properties ctx,
                    ResultSet rs,
                    String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set
trxName - transaction

MJournalLine

public MJournalLine(MJournal parent)
Parent Constructor

Parameters:
parent - journal
Method Detail

setCurrency

public void setCurrency(int C_Currency_ID,
                        int C_ConversionType_ID,
                        BigDecimal CurrencyRate)
Set Currency Info

Parameters:
C_Currency_ID - currenct
C_ConversionType_ID - type
CurrencyRate - rate

setC_Currency_ID

public void setC_Currency_ID(int C_Currency_ID)
Set C_Currency_ID and precision

Specified by:
setC_Currency_ID in interface I_GL_JournalLine
Overrides:
setC_Currency_ID in class X_GL_JournalLine
Parameters:
C_Currency_ID - currency

getPrecision

public int getPrecision()
Get Currency Precision

Returns:
precision

setCurrencyRate

public void setCurrencyRate(BigDecimal CurrencyRate)
Set Currency Rate

Specified by:
setCurrencyRate in interface I_GL_JournalLine
Overrides:
setCurrencyRate in class X_GL_JournalLine
Parameters:
CurrencyRate - check for null (->one)

setAmtAcct

public void setAmtAcct(BigDecimal AmtAcctDr,
                       BigDecimal AmtAcctCr)
Set Accounted Amounts only if not 0. Amounts overwritten in beforeSave - set conversion rate

Parameters:
AmtAcctDr - Dr
AmtAcctCr - Cr

setC_ValidCombination_ID

public void setC_ValidCombination_ID(int C_ValidCombination_ID)
Set C_ValidCombination_ID

Specified by:
setC_ValidCombination_ID in interface I_GL_JournalLine
Overrides:
setC_ValidCombination_ID in class X_GL_JournalLine
Parameters:
C_ValidCombination_ID - id

setC_ValidCombination_ID

public void setC_ValidCombination_ID(MAccount acct)
Set C_ValidCombination_ID

Parameters:
acct - account

getAccount

public MAccount getAccount()
Get Account (Valid Combination)

Returns:
combination or null

getAccountElementValue

public MElementValue getAccountElementValue()
Get Natural Account Element Value

Returns:
account

isDocControlled

public boolean isDocControlled()
Is it posting to a Control Acct

Returns:
true if control acct

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
true

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save. Update Journal/Batch Total

Overrides:
afterSave in class PO
Parameters:
newRecord - true if new record
success - true if success
Returns:
success

afterDelete

protected boolean afterDelete(boolean success)
After Delete

Overrides:
afterDelete in class PO
Parameters:
success - true if deleted
Returns:
true if success

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.