Package com.exedio.cope.pattern
Class MoneyField<C extends Money.Currency>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.MoneyField<C>
- All Implemented Interfaces:
CheckingSettable<Money<C>>
,Settable<Money<C>>
,Serializable
public final class MoneyField<C extends Money.Currency>
extends Pattern
implements Settable<Money<C>>, CheckingSettable<Money<C>>
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(Money<C> value, FieldValues fieldValues) static <C extends Money.Currency>
MoneyField<C>exclusive
(FunctionField<C> currency) SetValue<?>[]
static <C extends Money.Currency>
MoneyField<C>fixed
(C currency) Deprecated.BEWARE: This method returns null, if the currency is not stored in a field.BEWARE: This method returns null, if the currency is stored in a field.Returns the exceptions possibly thrown, when setting a value for this settable.boolean
isFinal()
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.boolean
Returns true, if a value for the settable should be specified on the creation of an item.boolean
isNull()
minZero()
protected void
onMount()
Here you can do additional initialization not yet done in the constructor.optional()
void
static <C extends Money.Currency>
MoneyField<C>shared
(FunctionField<C> currency) toFinal()
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, registerSource
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Method Details
-
fixed
-
exclusive
-
toFinal
-
optional
-
minZero
-
getAmount
-
getCurrencyField
BEWARE: This method returns null, if the currency is not stored in a field.- See Also:
-
getCurrencyValue
BEWARE: This method returns null, if the currency is stored in a field.- See Also:
-
getCurrencyClass
-
getUnison
-
isInitial
public boolean isInitial()Description copied from interface:Settable
Returns true, if a value for the settable should be specified on the creation of an item.- Specified by:
isInitial
in interfaceSettable<C extends Money.Currency>
-
isFinal
public boolean isFinal()Description copied from interface:Settable
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.- Specified by:
isFinal
in interfaceSettable<C extends Money.Currency>
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatory
in interfaceSettable<C extends Money.Currency>
-
getInitialType
- Specified by:
getInitialType
in interfaceSettable<C extends Money.Currency>
-
getInitialExceptions
Description copied from interface:Settable
Returns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptions
in interfaceSettable<C extends Money.Currency>
-
onMount
protected void onMount()Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time. -
get
-
set
-
execute
- Specified by:
execute
in interfaceSettable<C extends Money.Currency>
-
check
- Specified by:
check
in interfaceCheckingSettable<C extends Money.Currency>
-
isNull
-
isNotNull
-
getCurrency
Deprecated.UsegetCurrencyField()
instead
-
getCurrencyField()
instead