Class EmbeddedMetaData

  • All Implemented Interfaces:

    public class EmbeddedMetaData
    extends MetaData
    This element specifies the mapping for an embedded type. It contains multiple field elements, one for each field in the type.

    The nullIndicatorColumn optionally identifies the name of the column used to indicate whether the embedded instance is null. By default, if the value of this column is null, then the embedded instance is null. This column might be mapped to a field of the embedded instance but might be a synthetic column for the sole purpose of indicating a null reference. The nullIndicatorValue specifies the value to indicate that the embedded instance is null. This is only used for non-nullable columns. If nullIndicatorColumn is omitted, then the embedded instance is assumed always to exist.

    See Also:
    Serialized Form
    • Field Detail

      • ownerMember

        protected String ownerMember
        Name of the field/property in the embedded object that refers to the owner (bidirectional relation).
      • nullIndicatorColumn

        protected String nullIndicatorColumn
        Name of a column used for determining if the embedded object is null
      • nullIndicatorValue

        protected String nullIndicatorValue
        Value in the null column indicating that the embedded object is null
      • discriminatorMetaData

        protected DiscriminatorMetaData discriminatorMetaData
        Discriminator for use when embedding objects with inheritance.
    • Constructor Detail

      • EmbeddedMetaData

        public EmbeddedMetaData​(EmbeddedMetaData embmd)
        Constructor to create a copy of the passed metadata.
        embmd - The metadata to copy
      • EmbeddedMetaData

        public EmbeddedMetaData()
        Default constructor. Use setters to set fields, before calling populate().
    • Method Detail

      • populate

        public void populate​(ClassLoaderResolver clr,
                             ClassLoader primary)
        Method to populate the embedded MetaData. This performs checks on the validity of the field types for embedding.
        clr - The class loader to use where necessary
        primary - the primary ClassLoader to use (or null)
      • initialise

        public void initialise​(ClassLoaderResolver clr)
        Method to initialise the object, creating all internal convenience arrays.
        initialise in class MetaData
        clr - ClassLoader resolver
      • getMemberMetaData

        public final List<AbstractMemberMetaData> getMemberMetaData()
        Accessor for metadata for the embedded members.
        Returns the metadata for any defined members.
      • getOwnerMember

        public final String getOwnerMember()
      • getNullIndicatorColumn

        public final String getNullIndicatorColumn()
      • getNullIndicatorValue

        public final String getNullIndicatorValue()
      • newDiscriminatorMetaData

        public DiscriminatorMetaData newDiscriminatorMetaData()
        Method to create a new discriminator metadata, assign it to this inheritance, and return it.
        The discriminator metadata
      • addMember

        public void addMember​(AbstractMemberMetaData mmd)
        Method to add a member to the embedded definition. Rejects the addition of duplicate named members, or when we have already initialised this embedded definition.
        mmd - Meta-Data for the member
      • newFieldMetaData

        public FieldMetaData newFieldMetaData​(String name)
        Method to create a new FieldMetaData, add it, and return it.
        name - Name of the field
        The FieldMetaData
      • newPropertyMetaData

        public PropertyMetaData newPropertyMetaData​(String name)
        Method to create a new PropertyMetaData, add it, and return it.
        name - Name of the property
        The PropertyMetaData