org.homeunix.thecave.buddi.plugin.api.model.impl
Class ImmutableAccountImpl

java.lang.Object
  extended by org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableModelObjectImpl
      extended by org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableSourceImpl
          extended by org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableAccountImpl
All Implemented Interfaces:
java.lang.Comparable<ImmutableModelObject>, ImmutableAccount, ImmutableModelObject, ImmutableSource

public class ImmutableAccountImpl
extends ImmutableSourceImpl
implements ImmutableAccount


Constructor Summary
ImmutableAccountImpl(Account account)
           
 
Method Summary
 Account getAccount()
          Returns the wrapped object from the underlying data model.
 ImmutableAccountType getAccountType()
          Returns the Type object associated with the account.
 long getBalance()
          Returns the current balance of the account.
 long getBalance(java.util.Date d)
          Returns the balance as of the given date.
 long getOverdraftCreditLimit()
          Returns the Overdraft Limit (for debit accounts) or Credit Limit (for credit accounts)
 java.util.Date getStartDate()
          Returns the earliest date assoicated with this source.
 long getStartingBalance()
          Returns the starting balance for the account.
 java.lang.String toString()
           
 
Methods inherited from class org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableSourceImpl
getFullName, getName, getNotes, getSource, isDeleted
 
Methods inherited from class org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableModelObjectImpl
compareTo, equals, getModified, getRaw, getUid, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableSource
getFullName, getName, getNotes, getSource, isDeleted
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableModelObject
getModified, getRaw, getUid
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ImmutableAccountImpl

public ImmutableAccountImpl(Account account)
Method Detail

getStartingBalance

public long getStartingBalance()
Description copied from interface: ImmutableAccount
Returns the starting balance for the account.

Specified by:
getStartingBalance in interface ImmutableAccount
Returns:

getBalance

public long getBalance()
Description copied from interface: ImmutableAccount
Returns the current balance of the account.

Specified by:
getBalance in interface ImmutableAccount
Returns:

getAccountType

public ImmutableAccountType getAccountType()
Description copied from interface: ImmutableAccount
Returns the Type object associated with the account.

Specified by:
getAccountType in interface ImmutableAccount
Returns:

getAccount

public Account getAccount()
Description copied from interface: ImmutableAccount
Returns the wrapped object from the underlying data model. By accessing this method, you bypass all protection which the Buddi API gives you; it is not recommended to use this method unless you understand the risks associated with it.

Specified by:
getAccount in interface ImmutableAccount
Returns:

getStartDate

public java.util.Date getStartDate()
Description copied from interface: ImmutableAccount
Returns the earliest date assoicated with this source. This is obtained by looking at the associated transactions / period dates.

Specified by:
getStartDate in interface ImmutableAccount
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class ImmutableSourceImpl

getBalance

public long getBalance(java.util.Date d)
Description copied from interface: ImmutableAccount
Returns the balance as of the given date.

Specified by:
getBalance in interface ImmutableAccount
Returns:

getOverdraftCreditLimit

public long getOverdraftCreditLimit()
Description copied from interface: ImmutableAccount
Returns the Overdraft Limit (for debit accounts) or Credit Limit (for credit accounts)

Specified by:
getOverdraftCreditLimit in interface ImmutableAccount
Returns: