Package org.datanucleus.metadata
Enum FieldRole
- All Implemented Interfaces:
Serializable
,Comparable<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 Summary
Enum ConstantsEnum ConstantDescriptionField is to be treated as the element of an array.Field is to be treated as the element of a collection.Field is a reference to another (persistable) object.Field is to be treated as an ordering or index in a List.Field is to be treated as the key of a map.Field is to be treated as the value of a map.No role defined for this field.Field is the owner of a relation.Field is to be treated as the relation to a persistable (via join table). -
Constructor Summary
Constructors -
Method Summary
-
Enum Constant Details
-
ROLE_NONE
No role defined for this field. -
ROLE_OWNER
Field is the owner of a relation. -
ROLE_FIELD
Field is a reference to another (persistable) object. -
ROLE_COLLECTION_ELEMENT
Field is to be treated as the element of a collection. -
ROLE_ARRAY_ELEMENT
Field is to be treated as the element of an array. -
ROLE_MAP_KEY
Field is to be treated as the key of a map. -
ROLE_MAP_VALUE
Field is to be treated as the value of a map. -
ROLE_INDEX
Field is to be treated as an ordering or index in a List. -
ROLE_PERSISTABLE_RELATION
Field is to be treated as the relation to a persistable (via join table).
-
-
Constructor Details
-
FieldRole
private FieldRole()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-