Compiere 3.1

org.compiere.model
Class MJournalLine

java.lang.Object
  extended by org.compiere.framework.PO
      extended by org.compiere.model.X_GL_JournalLine
          extended by org.compiere.model.MJournalLine
All Implemented Interfaces:
Serializable, Cloneable, Comparator<PO>, 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
accessLevel, C_ACCOUNTALIAS_ID_AD_Reference_ID, Model, Table_ID, Table_Name, updatedMS
 
Fields inherited from class org.compiere.framework.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Constructor Summary
MJournalLine(Ctx ctx, int GL_JournalLine_ID, String trxName)
          Standard Constructor
MJournalLine(Ctx ctx, ResultSet rs, String trxName)
          Load Constructor
MJournalLine(MJournal parent)
          Parent 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 setAmtSourceCr(String oldAmtSourceCr, String newAmtSourceCr, int windowNo)
          Set AmtSourceCr - Callout
 void setAmtSourceDr(String oldAmtSourceDr, String newAmtSourceDr, int windowNo)
          Set AmtSourceDr - Callout
 void setC_AccountAlias_ID(String oldC_AccountAlias_ID, String newC_AccountAlias_ID, int windowNo)
          Set Rate - Callout.
 void setC_ConversionType_ID(String oldC_ConversionType_ID, String newC_ConversionType_ID, int windowNo)
          Set Rate - Callout.
 void setC_Currency_ID(int C_Currency_ID)
          Set C_Currency_ID and precision
 void setC_Currency_ID(String oldC_Currency_ID, String newC_Currency_ID, int windowNo)
          Set Currency - Callout.
 void setC_ValidCombination_ID(int C_ValidCombination_ID)
          Set C_ValidCombination_ID
 void setC_ValidCombination_ID(MAccount acct)
          Set C_ValidCombination_ID
 void setC_ValidCombination_ID(String oldC_ValidCombination_ID, String newC_ValidCombination_ID, int windowNo)
          Set Rate - Callout.
 void setCurrency(int C_Currency_ID, int C_ConversionType_ID, BigDecimal CurrencyRate)
          Set Currency Info
 void setCurrencyRate(BigDecimal CurrencyRate)
          Set Currency Rate
 void setCurrencyRate(String oldCurrencyRate, String newCurrencyRate, int windowNo)
          Set CurrencyRate - Callout
 void setDateAcct(String oldDateAcct, String newDateAcct, int windowNo)
          Set DateAcct - Callout.
 
Methods inherited from class org.compiere.model.X_GL_JournalLine
get_AccessLevel, getAmtAcctCr, getAmtAcctDr, getAmtSourceCr, getAmtSourceDr, getC_AccountAlias_ID, getC_ConversionType_ID, getC_Currency_ID, getC_UOM_ID, getC_ValidCombination_ID, getCurrencyRate, getDateAcct, getDescription, getGL_Journal_ID, getGL_JournalLine_ID, getKeyNamePair, getLine, getQty, initPO, isGenerated, isHasAlias, isProcessed, setAmtAcctCr, setAmtAcctDr, setAmtSourceCr, setAmtSourceDr, setC_AccountAlias_ID, setC_ConversionType_ID, setC_UOM_ID, setDateAcct, setDescription, setGL_Journal_ID, setGL_JournalLine_ID, setHasAlias, setIsGenerated, setLine, setProcessed, setQty, toString
 
Methods inherited from class org.compiere.framework.PO
addAttachment, addAttachment, addError, beforeDelete, compare, convertToBigDecimal, convertToBoolean, convertToInt, convertToTimestamp, copy, copyValues, copyValues, createAttachment, delete_Accounting, delete, delete, dump, dump, equals, get_ChangeVO, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_EntityType, get_HashMap, get_ID, get_IDOld, get_Info, get_KeyColumns, get_Logger, get_Table_ID, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_ValuesAsString, get_WhereClause, get_xmlDocument, get_xmlString, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getVO, hashCode, insert_Accounting, is_Changed, is_KeyColumn, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveNew_getID, saveNewInsertSQL, saveNewSpecial, saveUpdate, set_ChangeVO, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueString, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setContext, setCtx, setDocWorkflowMgr, setIsActive, setStandardDefaults, setUpdateable, setUpdatedBy, toStringX, unlock, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MJournalLine

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

Parameters:
ctx - context
GL_JournalLine_ID - id
trxName - transaction

MJournalLine

public MJournalLine(Ctx 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

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

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

setC_ConversionType_ID

@UICallout
public void setC_ConversionType_ID(String oldC_ConversionType_ID,
                                             String newC_ConversionType_ID,
                                             int windowNo)
                            throws Exception
Set Rate - Callout.

Parameters:
oldC_ConversionType_ID - old
newC_ConversionType_ID - new
windowNo - window no
Throws:
Exception

setC_AccountAlias_ID

@UICallout
public void setC_AccountAlias_ID(String oldC_AccountAlias_ID,
                                           String newC_AccountAlias_ID,
                                           int windowNo)
                          throws Exception
Set Rate - Callout.

Parameters:
oldC_ConversionType_ID - old
newC_ConversionType_ID - new
windowNo - window no
Throws:
Exception

setC_ValidCombination_ID

@UICallout
public void setC_ValidCombination_ID(String oldC_ValidCombination_ID,
                                               String newC_ValidCombination_ID,
                                               int windowNo)
                              throws Exception
Set Rate - Callout.

Parameters:
oldC_ConversionType_ID - old
newC_ConversionType_ID - new
windowNo - window no
Throws:
Exception

setDateAcct

@UICallout
public void setDateAcct(String oldDateAcct,
                                  String newDateAcct,
                                  int windowNo)
                 throws Exception
Set DateAcct - Callout.

Parameters:
oldDateAcct - old
newDateAcct - new
windowNo - window no
Throws:
Exception

setC_Currency_ID

@UICallout
public void setC_Currency_ID(String oldC_Currency_ID,
                                       String newC_Currency_ID,
                                       int windowNo)
                      throws Exception
Set Currency - Callout.

Parameters:
oldC_Currency_ID - old
newC_Currency_ID - new
windowNo - window no
Throws:
Exception

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

setAmtSourceCr

@UICallout
public void setAmtSourceCr(String oldAmtSourceCr,
                                     String newAmtSourceCr,
                                     int windowNo)
                    throws Exception
Set AmtSourceCr - Callout

Parameters:
oldAmtSourceCr - old value
newAmtSourceCr - new value
windowNo - window
Throws:
Exception

setAmtSourceDr

@UICallout
public void setAmtSourceDr(String oldAmtSourceDr,
                                     String newAmtSourceDr,
                                     int windowNo)
                    throws Exception
Set AmtSourceDr - Callout

Parameters:
oldAmtSourceDr - old value
newAmtSourceDr - new value
windowNo - window
Throws:
Exception

setCurrencyRate

@UICallout
public void setCurrencyRate(String oldCurrencyRate,
                                      String newCurrencyRate,
                                      int windowNo)
                     throws Exception
Set CurrencyRate - Callout

Parameters:
oldCurrencyRate - old value
newCurrencyRate - new value
windowNo - window
Throws:
Exception

setC_ValidCombination_ID

public void setC_ValidCombination_ID(int C_ValidCombination_ID)
Set C_ValidCombination_ID

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

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.