Package org.cyclos.entities.banking
Class RateParameters
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.banking.RateParameters
-
- All Implemented Interfaces:
Cloneable,HasNetwork,ProcessableForDataTranslation,IEntity
- Direct Known Subclasses:
TimeBasedRateParameters
@Entity public abstract class RateParameters extends BaseEntity
Base class for all rate parameters on the currency
-
-
Field Summary
Fields Modifier and Type Field Description protected BigDecimalcreationValueFor most rate types the creation value is zero by definition, and it cannot be changed.
-
Constructor Summary
Constructors Constructor Description RateParameters()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BigDecimalgetCreationValue()CurrencygetCurrency()DategetEndDate()NetworkgetNetwork()Returns the network this entity belongs toabstract RateTypegetRateType()DategetStartDate()booleanisActual()Returns if this RateParameters is the actual version.booleanisMarkedForResetting()reads the markedForResetting flag.
If a rate is disabled, all accounts must be reset, that is: all rates connected to accounts must be set to null.booleanisShowToUser()voidsetCurrency(Currency currency)voidsetEndDate(Date endDate)voidsetMarkedForResetting(boolean markedForResetting)voidsetShowToUser(boolean showToUser)voidsetStartDate(Date startDate)-
Methods inherited from class org.cyclos.entities.BaseEntity
getDataTranslationType, getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
clone, equals, getId, hashCode, id, ids, isPersistent, isTransient, setId, toShortString, toString, uniqueIds, uniqueIds
-
-
-
-
Field Detail
-
creationValue
protected BigDecimal creationValue
For most rate types the creation value is zero by definition, and it cannot be changed. For particular types it may be updateable, so there is no setter in this class, but subclasses may define a setter. That is also the reason it is protected and not private.
-
-
Method Detail
-
getCreationValue
public BigDecimal getCreationValue()
-
getCurrency
public Currency getCurrency()
-
getEndDate
public Date getEndDate()
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- See Also:
HasNetwork.getNetwork()
-
getRateType
public abstract RateType getRateType()
-
getStartDate
public Date getStartDate()
-
isActual
public boolean isActual()
Returns if this RateParameters is the actual version. RateParameters is stored as a history log, so all old versions are kept. Only the actual version has an endDate which is null.
-
isMarkedForResetting
public boolean isMarkedForResetting()
reads the markedForResetting flag.
If a rate is disabled, all accounts must be reset, that is: all rates connected to accounts must be set to null. This is done via a background task. This flag is set to true as soon as an enabled rate is disabled. It is set back to false when the account resetting task has succesfully finished.
-
isShowToUser
public boolean isShowToUser()
-
setCurrency
public void setCurrency(Currency currency)
-
setEndDate
public void setEndDate(Date endDate)
-
setMarkedForResetting
public void setMarkedForResetting(boolean markedForResetting)
- Parameters:
markedForResetting-
-
setShowToUser
public void setShowToUser(boolean showToUser)
-
setStartDate
public void setStartDate(Date startDate)
-
-