Package org.openflexo.pamela.annotations
Annotation Type Getter
-
@Retention(RUNTIME) @Target(METHOD) public @interface GetterAnnotation for a getter
This annotation should be placed in a method and indicates that this method is the unique getter for implicit \emph{ModelProperty} whose identifier is the declared String value.
May also declares cardinality, enventual inverse property, default value and some other features.
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringUNDEFINED
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringvalueThe property identifier of this getter
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanallowsMultipleOccurencesOnly relevant for multiple cardinality properties.Getter.CardinalitycardinalityThe cardinality of this getterjava.lang.StringdefaultValueA string convertable value that is set by default on the property identified by this getterbooleanignoreForEqualityIndicates that the underlying property is derived: no need to test it for equality comparison The default value isfalsebooleanignoreTypeIndicates that the type returned by this getter should not be included in the model.java.lang.StringinverseThe inverse property identifier of this getter.booleanisDerivedIndicates that the underlying property is derived: no need to test it for equality comparison neither for updateWith() The default value isfalsebooleanisStringConvertableIndicates that the type returned by this getter can be converted to a string using aStringConverterLibrary.Converter.
-
-
-
-
cardinality
Getter.Cardinality cardinality
The cardinality of this getter- Returns:
- the cardinality of the getter
- Default:
- org.openflexo.pamela.annotations.Getter.Cardinality.SINGLE
-
-
-
isStringConvertable
boolean isStringConvertable
Indicates that the type returned by this getter can be converted to a string using aStringConverterLibrary.Converter. Upon serialization/deserialization, thePamelaModelFactorywill provide, through itsStringEncoder, an appropriateStringConverterLibrary.Converter. Failing to do that will result in an Exception The default value isfalse- Returns:
- true if the type returned by this getter can be converted to a string.
- Default:
- false
-
-
-
ignoreType
boolean ignoreType
Indicates that the type returned by this getter should not be included in the model. This flag allows to manipulate types that are unknown to PAMELA. If set to true, PAMELA will not try to interpret those classes and will not be able to serialize them- Returns:
- true if PAMELA should not import the type of the property identified by this getter.
- Default:
- false
-
-
-
allowsMultipleOccurences
boolean allowsMultipleOccurences
Only relevant for multiple cardinality properties. When set to true, indicates that many occurences of same object might be present in the property (you can add the same object multiple times)
Note that the equals() semantics is used here- Returns:
- Default:
- false
-
-