Enum FieldRole

  • All Implemented Interfaces:
    Serializable, Comparable<FieldRole>

    public enum FieldRole
    extends Enum<FieldRole>
    Series of roles that fields can be performing in the (ORM) mapping process. This is typically for use by mapped datastores, but relates to MetaData definitions too, so is stored in org.datanucleus.metadata.
    • Enum Constant Detail

      • ROLE_NONE

        public static final FieldRole ROLE_NONE
        No role defined for this field.
      • ROLE_OWNER

        public static final FieldRole ROLE_OWNER
        Field is the owner of a relation.
      • ROLE_FIELD

        public static final FieldRole ROLE_FIELD
        Field is a reference to another (persistable) object.
      • ROLE_COLLECTION_ELEMENT

        public static final FieldRole ROLE_COLLECTION_ELEMENT
        Field is to be treated as the element of a collection.
      • ROLE_ARRAY_ELEMENT

        public static final FieldRole ROLE_ARRAY_ELEMENT
        Field is to be treated as the element of an array.
      • ROLE_MAP_KEY

        public static final FieldRole ROLE_MAP_KEY
        Field is to be treated as the key of a map.
      • ROLE_MAP_VALUE

        public static final FieldRole ROLE_MAP_VALUE
        Field is to be treated as the value of a map.
      • ROLE_INDEX

        public static final FieldRole ROLE_INDEX
        Field is to be treated as an ordering or index in a List.
      • ROLE_PERSISTABLE_RELATION

        public static final FieldRole ROLE_PERSISTABLE_RELATION
        Field is to be treated as the relation to a persistable (via join table).
    • Method Detail

      • values

        public static FieldRole[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FieldRole c : FieldRole.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FieldRole valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null