Package org.openflexo.pamela.annotations
Annotation Type Getter
-
@Retention(RUNTIME) @Target(METHOD) public @interface Getter
Annotation 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.String
UNDEFINED
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
The property identifier of this getter
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
allowsMultipleOccurences
Only relevant for multiple cardinality properties.Getter.Cardinality
cardinality
The cardinality of this getterjava.lang.String
defaultValue
A string convertable value that is set by default on the property identified by this getterboolean
ignoreForEquality
Indicates that the underlying property is derived: no need to test it for equality comparison The default value isfalse
boolean
ignoreType
Indicates that the type returned by this getter should not be included in the model.java.lang.String
inverse
The inverse property identifier of this getter.boolean
isDerived
Indicates that the underlying property is derived: no need to test it for equality comparison neither for updateWith() The default value isfalse
boolean
isStringConvertable
Indicates 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, thePamelaModelFactory
will 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
-
-