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 TypeMethodDescriptionvoidcheck(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.booleanisFinal()Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.booleanReturns true, if a value for the settable should be specified on the creation of an item.booleanisNull()minZero()protected voidonMount()Here you can do additional initialization not yet done in the constructor.optional()voidstatic <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, registerSourceMethods 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:SettableReturns true, if a value for the settable should be specified on the creation of an item.- Specified by:
isInitialin interfaceSettable<C extends Money.Currency>
-
isFinal
public boolean isFinal()Description copied from interface:SettableReturns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.- Specified by:
isFinalin interfaceSettable<C extends Money.Currency>
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin interfaceSettable<C extends Money.Currency>
-
getInitialType
- Specified by:
getInitialTypein interfaceSettable<C extends Money.Currency>
-
getInitialExceptions
Description copied from interface:SettableReturns the exceptions possibly thrown, when setting a value for this settable.- Specified by:
getInitialExceptionsin interfaceSettable<C extends Money.Currency>
-
onMount
protected void onMount()Description copied from class:PatternHere 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:
executein interfaceSettable<C extends Money.Currency>
-
check
- Specified by:
checkin interfaceCheckingSettable<C extends Money.Currency>
-
isNull
-
isNotNull
-
getCurrency
Deprecated.UsegetCurrencyField()instead
-
getCurrencyField()instead