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 getter
      java.lang.String defaultValue
      A string convertable value that is set by default on the property identified by this getter
      boolean ignoreForEquality
      Indicates that the underlying property is derived: no need to test it for equality comparison The default value is false
      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 is false
      boolean isStringConvertable
      Indicates that the type returned by this getter can be converted to a string using a StringConverterLibrary.Converter.
    • Field Detail

      • UNDEFINED

        static final java.lang.String UNDEFINED
    • Element Detail

      • value

        java.lang.String value
        The property identifier of this getter
        Returns:
        the property identifier of this getter
      • cardinality

        Getter.Cardinality cardinality
        The cardinality of this getter
        Returns:
        the cardinality of the getter
        Default:
        org.openflexo.pamela.annotations.Getter.Cardinality.SINGLE
      • inverse

        java.lang.String inverse
        The inverse property identifier of this getter. Depending on the cardinality of this property and its inverse, this property will be either set or added to the inverse property of this property value.
        Returns:
        Default:
        ""
      • defaultValue

        java.lang.String defaultValue
        A string convertable value that is set by default on the property identified by this getter
        Returns:
        the string converted default value.
        Default:
        ""
      • isStringConvertable

        boolean isStringConvertable
        Indicates that the type returned by this getter can be converted to a string using a StringConverterLibrary.Converter. Upon serialization/deserialization, the PamelaModelFactory will provide, through its StringEncoder, an appropriate StringConverterLibrary.Converter. Failing to do that will result in an Exception The default value is false
        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
      • isDerived

        boolean isDerived
        Indicates that the underlying property is derived: no need to test it for equality comparison neither for updateWith() The default value is false
        Returns:
        true if underlying property is derived
        Default:
        false
      • ignoreForEquality

        boolean ignoreForEquality
        Indicates that the underlying property is derived: no need to test it for equality comparison The default value is false
        Returns:
        true if underlying property is derived
        Default:
        false