Class PropertyMetaData

  • All Implemented Interfaces:
    Serializable, Comparable, ColumnMetaDataContainer

    public class PropertyMetaData
    extends AbstractMemberMetaData
    The property element declares mapping between a virtual field of an implemented interface and the corresponding persistent field of a persistence-capable class. The name attribute is required, and declares the name for the property. The naming conventions for JavaBeans property names is used: the property name is the same as the corresponding get method for the property with the get removed and the resulting name lower-cased. The field-name attribute is required; it associates a persistent field with the named property.
    See Also:
    Serialized Form
    • Field Detail

      • fieldName

        protected String fieldName
        Name of the field that this property is wrapping (when part of a persistent class).
    • Constructor Detail

      • PropertyMetaData

        public PropertyMetaData​(MetaData parent,
                                PropertyMetaData 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
      • PropertyMetaData

        public PropertyMetaData​(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/property name
    • Method Detail

      • getFieldName

        public String getFieldName()
        Accessor for the field name if a concrete implementation of the interface is generated the field name for this property.
        Returns:
        field name. null if no field name is set, or if this is a property in a concrete class.
      • setFieldName

        public PropertyMetaData setFieldName​(String name)
        Method to set the field name that this property wraps (persistent interface implementation)
        Parameters:
        name - Field name
        Returns:
        This metadata