Class FieldMetaData

  • All Implemented Interfaces:
    Serializable, Comparable, ColumnMetaDataContainer

    public class FieldMetaData
    extends AbstractMemberMetaData
    Representation of the Meta-Data for a field of a class.

    Lifecycle state

    An object of this type has 2 lifecycle states. The first is the raw constructed object which represents pure MetaData (maybe from a MetaData file). The second is a "populated" object which represents MetaData for a Field of a class with the metadata aligned to be appropriate for that Field.

    Containers

    Each field can represent a container. The container can be an array, a Collection or a Map. The field type must be of the correct type to represent these.

    Field Management

    Each field can be managed by us or not. The class provides a method for identifying if a field is managed by us (isJdoField()). If a field is managed by us, it will have a field "id" (within its class). In a class the field "id" will start at 0 (for the first field, in alphabetical order).
    See Also:
    Serialized Form
    • Constructor Detail

      • FieldMetaData

        public FieldMetaData​(MetaData parent,
                             AbstractMemberMetaData fmd)
        Convenience constructor to copy the specification from the passed field. This is used when we have an overriding field and we make a copy of the baseline field as a starting point.
        Parameters:
        parent - The parent
        fmd - The field to copy
      • FieldMetaData

        public FieldMetaData​(MetaData parent,
                             String name)
        Constructor. Saves the MetaData with the specified values. The object is then in an "unpopulated" state. It can become "populated" by calling the populate() method which compares it against the field it is to represent and updates any unset attributes and flags up any errors.
        Parameters:
        parent - parent MetaData instance
        name - field name