org.datanucleus.metadata
Class ElementMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.AbstractElementMetaData
          extended by org.datanucleus.metadata.ElementMetaData
All Implemented Interfaces:
java.io.Serializable, ColumnMetaDataContainer

public class ElementMetaData
extends AbstractElementMetaData

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 serialised attribute specifies that the key values are to be serialised into the named column. The foreign-key attribute specifies the name of a foreign key to be generated.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.datanucleus.metadata.AbstractElementMetaData
columnMetaData, columnName, columns, embeddedMetaData, foreignKeyMetaData, indexed, indexMetaData, mappedBy, unique, uniqueMetaData
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
ElementMetaData()
          Default constructor.
ElementMetaData(ElementMetaData emd)
          Constructor to create a copy of the passed metadata using the provided parent.
 
Method Summary
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary, MetaDataManager mmgr)
          Populate the MetaData.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.
 
Methods inherited from class org.datanucleus.metadata.AbstractElementMetaData
addColumn, getColumnMetaData, getColumnName, getDeleteAction, getEmbeddedMetaData, getForeignKeyMetaData, getIndexed, getIndexMetaData, getMappedBy, getUniqueMetaData, getUpdateAction, initialise, isUnique, newColumnMetaData, newEmbeddedMetaData, newForeignKeyMetaData, newIndexMetaData, newUniqueMetaData, setColumnName, setDeleteAction, setDeleteAction, setEmbeddedMetaData, setForeignKeyMetaData, setIndexed, setIndexMetaData, setMappedBy, setUnique, setUnique, setUniqueMetaData, setUpdateAction, setUpdateAction
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementMetaData

public ElementMetaData(ElementMetaData emd)
Constructor to create a copy of the passed metadata using the provided parent.

Parameters:
emd - The metadata to copy

ElementMetaData

public ElementMetaData()
Default constructor. Set the fields using setters, before populate().

Method Detail

populate

public void populate(ClassLoaderResolver clr,
                     java.lang.ClassLoader primary,
                     MetaDataManager mmgr)
Populate the MetaData.

Overrides:
populate in class AbstractElementMetaData
Parameters:
clr - Class loader to use
primary - the primary ClassLoader to use (or null)
mmgr - MetaData manager

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.

Overrides:
toString in class MetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © 2010. All Rights Reserved.