|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.geebis.books.model.account.Account<T>
@Name(value="account") public abstract class Account<T extends Account>
The Account class represents an account of funds.
| Constructor Summary | |
|---|---|
protected |
Account()
|
protected |
Account(java.lang.String name)
|
| Method Summary | |
|---|---|
void |
addSubAccount(T account)
Adds an account as a sub account to this account if it's not already a sub account |
java.lang.Double |
getAmount()
Gets the amount in the account |
java.lang.String |
getDescription()
Gets the description of the account |
java.lang.Long |
getId()
|
java.util.Set<Label> |
getLabels()
Gets the labels for this account |
java.lang.String |
getName()
Gets the name of the account. |
java.util.List<T> |
getSubAccounts()
Gets the sub accounts for this account |
java.lang.Double |
getTotal()
Calculates the total value in this account including sub accounts |
java.lang.Integer |
getVersion()
|
void |
removeSubAccount(T account)
Removes an account as a sub account from this account |
void |
setAmount(java.lang.Double amount)
Sets the amount in the account |
void |
setDescription(java.lang.String description)
Sets the description of the account |
void |
setId(java.lang.Long id)
|
void |
setLabels(java.util.Set<Label> labels)
Sets the labels for this account |
void |
setName(java.lang.String name)
Sets the name of the account |
void |
setSubAccounts(java.util.List<T> subAccounts)
Sets the sub accounts for this account |
void |
setVersion(java.lang.Integer version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Account()
protected Account(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - the new name for the accountpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - the new description of the accountpublic java.lang.Double getAmount()
public void setAmount(java.lang.Double amount)
amount - the new amount in the accountpublic java.util.List<T> getSubAccounts()
public void setSubAccounts(java.util.List<T> subAccounts)
subAccounts - the new list of accounts to use as the sub accounts for this accountpublic java.util.Set<Label> getLabels()
getLabels in interface Labelablepublic void setLabels(java.util.Set<Label> labels)
labels - the new labels for this accountpublic java.lang.Integer getVersion()
public void setVersion(java.lang.Integer version)
public java.lang.Long getId()
public void setId(java.lang.Long id)
public java.lang.Double getTotal()
public void addSubAccount(T account)
throws IncompatibleAccountException
account - the account to add as a sub account
IncompatibleAccountException - if the passed in account cannot be added as a subaccount of this accountpublic void removeSubAccount(T account)
account - the sub account to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||