org.datanucleus.metadata
Class CollectionMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.ContainerMetaData
          extended by org.datanucleus.metadata.CollectionMetaData
All Implemented Interfaces:
java.io.Serializable

public class CollectionMetaData
extends ContainerMetaData

Representation of the MetaData of a collection.

Since:
1.1
Version:
$Revision: 1.37 $
See Also:
Serialized Form

Field Summary
protected  org.datanucleus.metadata.ContainerComponent element
          Representation of the element of the collection.
 
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
CollectionMetaData(AbstractMemberMetaData parent, CollectionMetaData colmd)
          Constructor to create a copy of the passed metadata using the passed parent.
CollectionMetaData(AbstractMemberMetaData parent, java.lang.String elementType, java.lang.String embeddedElement, java.lang.String dependentElement, java.lang.String serializedElement)
          Constructor.
 
Method Summary
 boolean elementIsPersistent()
           
 AbstractClassMetaData getElementClassMetaData()
          Accessor for the Element ClassMetaData
 java.lang.String getElementType()
          Accessor for the element-type tag value.
 boolean isDependentElement()
          Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.
 boolean isEmbeddedElement()
          Accessor for the embedded-element tag value
 boolean isSerializedElement()
          Accessor for the serialized-element tag value
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Method to populate any defaults, and check the validity of the MetaData.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 
Methods inherited from class org.datanucleus.metadata.ContainerMetaData
getFieldName, getMemberMetaData, getMetaDataManager
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

protected org.datanucleus.metadata.ContainerComponent element
Representation of the element of the collection.

Constructor Detail

CollectionMetaData

public CollectionMetaData(AbstractMemberMetaData parent,
                          CollectionMetaData colmd)
Constructor to create a copy of the passed metadata using the passed parent.

Parameters:
parent - The parent
colmd - The metadata to copy

CollectionMetaData

public CollectionMetaData(AbstractMemberMetaData parent,
                          java.lang.String elementType,
                          java.lang.String embeddedElement,
                          java.lang.String dependentElement,
                          java.lang.String serializedElement)
Constructor.

Parameters:
parent - The parent Field element
elementType - The type of element
embeddedElement - Whether elements are embedded
dependentElement - attribute dependent-element value
serializedElement - attribute serialized-element value
Method Detail

populate

public void populate(ClassLoaderResolver clr,
                     java.lang.ClassLoader primary)
Method to populate any defaults, and check the validity of the MetaData.

Parameters:
clr - ClassLoaderResolver to use for any loading operations
primary - the primary ClassLoader to use (or null)

getElementType

public java.lang.String getElementType()
Accessor for the element-type tag value. This can contain comma-separated values.

Returns:
element-type tag value

elementIsPersistent

public boolean elementIsPersistent()

getElementClassMetaData

public AbstractClassMetaData getElementClassMetaData()
Accessor for the Element ClassMetaData

Returns:
element ClassMetaData

isEmbeddedElement

public boolean isEmbeddedElement()
Accessor for the embedded-element tag value

Returns:
embedded-element tag value

isDependentElement

public boolean isDependentElement()
Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.

Returns:
dependent-element tag value

isSerializedElement

public boolean isSerializedElement()
Accessor for the serialized-element tag value

Returns:
serialized-element tag value

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object.

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


Copyright © 2009. All Rights Reserved.