Class AbstractElementMetaData

  • All Implemented Interfaces:
    Serializable, ColumnMetaDataContainer
    Direct Known Subclasses:
    ElementMetaData, KeyMetaData, ValueMetaData

    public abstract class AbstractElementMetaData
    extends MetaData
    implements ColumnMetaDataContainer
    This element specifies the mapping for the element component of arrays and collections. If only one column is mapped, and no additional information is needed for the column, then the column attribute can be used. Otherwise, the column element(s) are used. The serialized attribute specifies that the key values are to be serialized into the named column. The foreign-key attribute specifies the name of a foreign key to be generated.
    See Also:
    Serialized Form
    • Field Detail

      • unique

        protected boolean unique
        Whether to add a unique constraint
      • mappedBy

        protected String mappedBy
        Field that this is mapped to.
      • indexed

        protected IndexedValue indexed
        The indexing value
      • indexMetaData

        protected IndexMetaData indexMetaData
      • uniqueMetaData

        protected UniqueMetaData uniqueMetaData
      • embeddedMetaData

        protected EmbeddedMetaData embeddedMetaData
        Definition of embedding of the element/key/value. Only present if defined by user.
      • table

        protected String table
      • columnName

        protected String columnName
    • Constructor Detail

      • AbstractElementMetaData

        public AbstractElementMetaData​(AbstractElementMetaData aemd)
        Constructor to create a copy of the passed metadata object.
        aemd - The metadata to copy
      • AbstractElementMetaData

        public AbstractElementMetaData()
        Default constructor. Set the fields using setters, before populate().
    • Method Detail

      • populate

        public void populate​(ClassLoaderResolver clr,
                             ClassLoader primary)
        Populate the metadata.
        clr - the ClassLoaderResolver
        primary - the primary ClassLoader to use (or null)
      • initialise

        public void initialise​(ClassLoaderResolver clr)
        Method to initialise the object, creating any convenience arrays needed. Initialises all sub-objects.
        initialise in class MetaData
      • getTable

        public String getTable()
      • setTable

        public void setTable​(String table)
      • getMappedBy

        public String getMappedBy()
      • setMappedBy

        public void setMappedBy​(String mappedBy)
      • setIndexed

        public void setIndexed​(IndexedValue indexed)
      • isUnique

        public boolean isUnique()
      • setUnique

        public void setUnique​(boolean unique)
      • getForeignKeyMetaData

        public final ForeignKeyMetaData getForeignKeyMetaData()
        Accessor for foreignKeyMetaData
        Returns the foreignKeyMetaData.
      • setDeleteAction

        public void setDeleteAction​(String deleteAction)
      • setDeleteAction

        public void setDeleteAction​(ForeignKeyAction deleteAction)
      • setUpdateAction

        public void setUpdateAction​(String updateAction)
      • setUpdateAction

        public void setUpdateAction​(ForeignKeyAction updateAction)
      • getColumnName

        public final String getColumnName()
      • setColumnName

        public void setColumnName​(String columnName)
      • newColumnMetaData

        public ColumnMetaData newColumnMetaData()
        Method to create a column metadata, add it, and return it.
        The column metadata
      • getEmbeddedMetaData

        public final EmbeddedMetaData getEmbeddedMetaData()
        Accessor for embeddedMetaData
        Returns the embeddedMetaData.
      • setEmbeddedMetaData

        public final void setEmbeddedMetaData​(EmbeddedMetaData embeddedMetaData)
        Mutator for the Embedded MetaData
        embeddedMetaData - The embeddedMetaData to set.
      • newEmbeddedMetaData

        public EmbeddedMetaData newEmbeddedMetaData()
        Method to create an embedded metadata, add it, and return it.
        The embedded metadata
      • setForeignKeyMetaData

        public final void setForeignKeyMetaData​(ForeignKeyMetaData foreignKeyMetaData)
        Mutator for the Foreign Key MetaData
        foreignKeyMetaData - The foreignKeyMetaData to set.
      • newForeignKeyMetaData

        public ForeignKeyMetaData newForeignKeyMetaData()
        Method to create a unique metadata, add it, and return it.
        The unique metadata
      • getIndexMetaData

        public final IndexMetaData getIndexMetaData()
        Accessor for indexMetaData
        Returns the indexMetaData.
      • setIndexMetaData

        public final void setIndexMetaData​(IndexMetaData indexMetaData)
        Mutator for the Index MetaData
        indexMetaData - The indexMetaData to set.
      • newIndexMetaData

        public IndexMetaData newIndexMetaData()
        Method to create an index metadata, add it, and return it.
        The index metadata
      • getUniqueMetaData

        public final UniqueMetaData getUniqueMetaData()
        Accessor for uniqueMetaData
        Returns the uniqueMetaData.
      • setUniqueMetaData

        public final void setUniqueMetaData​(UniqueMetaData uniqueMetaData)
        Mutator for the Unique MetaData
        uniqueMetaData - The uniqueMetaData to set.
      • newUniqueMetaData

        public UniqueMetaData newUniqueMetaData()
        Method to create a unique metadata, add it, and return it.
        The unique metadata