org.kuali.kfs.coa.businessobject
Class Account

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.kfs.coa.businessobject.Account
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, org.kuali.rice.core.api.mo.common.active.Inactivatable, org.kuali.rice.core.api.mo.common.GloballyUnique, org.kuali.rice.core.api.mo.common.Versioned, org.kuali.rice.core.api.mo.ModelObjectBasic, org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.bo.PersistableBusinessObject

public class Account
extends org.kuali.rice.krad.bo.PersistableBusinessObjectBase
implements org.kuali.rice.core.api.mo.common.active.Inactivatable

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
Account()
          Default no-arg constructor.
 
Method Summary
 boolean equals(Object obj)
          Implementing equals since I need contains to behave reasonably in a hashed datastructure.
 Date getAccountCreateDate()
          Gets the accountCreateDate attribute.
 Date getAccountEffectiveDate()
          Gets the accountEffectiveDate attribute.
 Date getAccountExpirationDate()
          Gets the accountExpirationDate attribute.
 String getAccountKey()
          Convenience method to make the primitive account fields from this Account easier to compare to the account fields from another Account or an AccountingLine
 String getAccountName()
          Gets the accountName attribute.
 String getAccountNumber()
          Gets the accountNumber attribute.
 Chart getChartOfAccounts()
          Gets the chartOfAccounts attribute.
 String getChartOfAccountsCode()
           
 Organization getOrganization()
          Gets the organization attribute.
 String getOrganizationCode()
           
 List getSubAccounts()
           
 int hashCode()
          Calcluates hashCode based on current values of chartOfAccountsCode and accountNumber fields.
 boolean isActive()
          Gets the active attribute.
 boolean isClosed()
          Returns whether this account is not active or not
 boolean isExpired(Calendar testDate)
          This method determines whether the account is expired or not.
 boolean isExpired(Date testDate)
          This method determines whether the account is expired or not.
 void setAccountCreateDate(Date accountCreateDate)
          Sets the accountCreateDate attribute.
 void setAccountEffectiveDate(Date accountEffectiveDate)
          Sets the accountEffectiveDate attribute.
 void setAccountExpirationDate(Date accountExpirationDate)
          Sets the accountExpirationDate attribute.
 void setAccountName(String accountName)
          Sets the accountName attribute.
 void setAccountNumber(String accountNumber)
          Sets the accountNumber attribute.
 void setActive(boolean active)
          Sets the active attribute.
 void setChartOfAccounts(Chart chartOfAccounts)
          Deprecated.  
 void setChartOfAccountsCode(String chartOfAccountsCode)
           
 void setClosed(boolean closed)
          Sets the closed attribute.
 void setOrganization(Organization organization)
          Deprecated.  
 void setOrganizationCode(String organizationCode)
           
 void setSubAccounts(List subAccounts)
           
protected  LinkedHashMap toStringMapper()
           
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

Account

public Account()
Default no-arg constructor.

Method Detail

getOrganizationCode

public String getOrganizationCode()

setOrganizationCode

public void setOrganizationCode(String organizationCode)

getAccountNumber

public String getAccountNumber()
Gets the accountNumber attribute.

Returns:
Returns the accountNumber

setAccountNumber

public void setAccountNumber(String accountNumber)
Sets the accountNumber attribute.

Parameters:
accountNumber - The accountNumber to set.

getAccountName

public String getAccountName()
Gets the accountName attribute.

Returns:
Returns the accountName

setAccountName

public void setAccountName(String accountName)
Sets the accountName attribute.

Parameters:
accountName - The accountName to set.

getAccountCreateDate

public Date getAccountCreateDate()
Gets the accountCreateDate attribute.

Returns:
Returns the accountCreateDate

setAccountCreateDate

public void setAccountCreateDate(Date accountCreateDate)
Sets the accountCreateDate attribute.

Parameters:
accountCreateDate - The accountCreateDate to set.

getAccountEffectiveDate

public Date getAccountEffectiveDate()
Gets the accountEffectiveDate attribute.

Returns:
Returns the accountEffectiveDate

setAccountEffectiveDate

public void setAccountEffectiveDate(Date accountEffectiveDate)
Sets the accountEffectiveDate attribute.

Parameters:
accountEffectiveDate - The accountEffectiveDate to set.

getAccountExpirationDate

public Date getAccountExpirationDate()
Gets the accountExpirationDate attribute.

Returns:
Returns the accountExpirationDate

setAccountExpirationDate

public void setAccountExpirationDate(Date accountExpirationDate)
Sets the accountExpirationDate attribute.

Parameters:
accountExpirationDate - The accountExpirationDate to set.

isExpired

public boolean isExpired(Calendar testDate)
This method determines whether the account is expired or not. Note that if Expiration Date is the same date as testDate, then this will return false. It will only return true if the account expiration date is one day earlier than testDate or earlier. Note that this logic ignores all time components when doing the comparison. It only does the before/after comparison based on date values, not time-values.

Parameters:
testDate - - Calendar instance with the date to test the Account's Expiration Date against. This is most commonly set to today's date.
Returns:
true or false based on the logic outlined above

isExpired

public boolean isExpired(Date testDate)
This method determines whether the account is expired or not. Note that if Expiration Date is the same date as testDate, then this will return false. It will only return true if the account expiration date is one day earlier than testDate or earlier. Note that this logic ignores all time components when doing the comparison. It only does the before/after comparison based on date values, not time-values.

Parameters:
testDate - - java.util.Date instance with the date to test the Account's Expiration Date against. This is most commonly set to today's date.
Returns:
true or false based on the logic outlined above

isActive

public boolean isActive()
Gets the active attribute.

Specified by:
isActive in interface org.kuali.rice.core.api.mo.common.active.Inactivatable
Returns:
Returns the active

setActive

public void setActive(boolean active)
Sets the active attribute.

Parameters:
active - The active to set.

isClosed

public boolean isClosed()
Returns whether this account is not active or not

Returns:
the opposite of isActive()

setClosed

public void setClosed(boolean closed)
Sets the closed attribute.

Parameters:
closed - The closed to set.

getChartOfAccounts

public Chart getChartOfAccounts()
Gets the chartOfAccounts attribute.

Returns:
Returns the chartOfAccounts

setChartOfAccounts

public void setChartOfAccounts(Chart chartOfAccounts)
Deprecated. 

Sets the chartOfAccounts attribute.

Parameters:
chartOfAccounts - The chartOfAccounts to set.

getOrganization

public Organization getOrganization()
Gets the organization attribute.

Returns:
Returns the organization

setOrganization

public void setOrganization(Organization organization)
Deprecated. 

Sets the organization attribute.

Parameters:
organization - The organization to set.

getSubAccounts

public List getSubAccounts()
Returns:
Returns the subAccounts.

setSubAccounts

public void setSubAccounts(List subAccounts)
Parameters:
subAccounts - The subAccounts to set.

getChartOfAccountsCode

public String getChartOfAccountsCode()
Returns:
Returns the chartOfAccountsCode.

setChartOfAccountsCode

public void setChartOfAccountsCode(String chartOfAccountsCode)
Parameters:
chartOfAccountsCode - The chartOfAccountsCode to set.

toStringMapper

protected LinkedHashMap toStringMapper()
See Also:
org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()

equals

public boolean equals(Object obj)
Implementing equals since I need contains to behave reasonably in a hashed datastructure.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Calcluates hashCode based on current values of chartOfAccountsCode and accountNumber fields. Somewhat dangerous, since both of those fields are mutable, but I don't expect people to be editing those values directly for Accounts stored in hashed datastructures.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getAccountKey

public String getAccountKey()
Convenience method to make the primitive account fields from this Account easier to compare to the account fields from another Account or an AccountingLine

Returns:
String representing the account associated with this Accounting


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.