Class AccountancyEntry
java.lang.Object
org.salespointframework.core.AbstractEntity<AccountancyEntry.AccountancyEntryIdentifier>
org.salespointframework.accountancy.AccountancyEntry
- All Implemented Interfaces:
Persistable<AccountancyEntry.AccountancyEntryIdentifier>
- Direct Known Subclasses:
ProductPaymentEntry
@Entity
public class AccountancyEntry
extends AbstractEntity<AccountancyEntry.AccountancyEntryIdentifier>
This class represents an accountancy entry. It is advisable to sub-class it, to define specific entry types for an
accountancy, for example a
ProductPaymentEntry.- Author:
- Hannes Weisbach, Oliver Gierke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAccountancyEntry.AccountancyEntryIdentifierserves as an identifier type forAccountancyEntryobjects. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.AccountancyEntry(javax.money.MonetaryAmount value) Creates a newPersistentAccountancyEntrywith a specific value.AccountancyEntry(javax.money.MonetaryAmount value, String description) Creates a newPersistentAccountancyEntrywith a specific value and a user defined description. -
Method Summary
Modifier and TypeMethodDescriptiongetDate()getId()javax.money.MonetaryAmountgetValue()booleanhasDate()Returns whether theAccountancyEntryalready has aDateset.booleanReturns whether the entry is considered expense, i.e.booleanReturns whether the entry is considered revenue, i.e.toString()Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Constructor Details
-
AccountancyEntry
public AccountancyEntry(javax.money.MonetaryAmount value) Creates a newPersistentAccountancyEntrywith a specific value.- Parameters:
value- The value that is stored in this entry.
-
AccountancyEntry
Creates a newPersistentAccountancyEntrywith a specific value and a user defined description.- Parameters:
value- The value that is stored in this entry.description- A user-supplied description for this entry.
-
AccountancyEntry
Deprecated.
-
-
Method Details
-
hasDate
public boolean hasDate()Returns whether theAccountancyEntryalready has aDateset.- Returns:
-
getDate
- Returns:
- the
DateTimewhen this entry was posted.
-
getId
-
isRevenue
public boolean isRevenue()Returns whether the entry is considered revenue, i.e. its value is zero or positive.- Returns:
- Since:
- 7.1
-
isExpense
public boolean isExpense()Returns whether the entry is considered expense, i.e. its value is negative.- Returns:
- Since:
- 7.1
-
toString
-
getValue
public javax.money.MonetaryAmount getValue() -
getDescription
-