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.

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()
          Default constructor.
CollectionMetaData(CollectionMetaData colmd)
          Constructor to create a copy of the passed metadata.
 
Method Summary
 boolean elementIsPersistent()
           
 AbstractClassMetaData getElementClassMetaData(ClassLoaderResolver clr, MetaDataManager mmgr)
          Convenience 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, MetaDataManager mmgr)
          Method to populate any defaults, and check the validity of the MetaData.
 CollectionMetaData setDependentElement(boolean dependent)
           
 CollectionMetaData setDependentElement(java.lang.String dependent)
           
 CollectionMetaData setElementType(java.lang.String type)
           
 CollectionMetaData setEmbeddedElement(boolean embedded)
           
 CollectionMetaData setEmbeddedElement(java.lang.String embedded)
           
 CollectionMetaData setSerializedElement(boolean serialized)
           
 CollectionMetaData setSerializedElement(java.lang.String serialized)
           
 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
allowNulls, getFieldName, getMemberMetaData
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, 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(CollectionMetaData colmd)
Constructor to create a copy of the passed metadata.

Parameters:
colmd - The metadata to copy

CollectionMetaData

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

Method Detail

populate

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

Overrides:
populate in class ContainerMetaData
Parameters:
clr - ClassLoaderResolver to use for any loading operations
primary - the primary ClassLoader to use (or null)
mmgr - MetaData manager

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(ClassLoaderResolver clr,
                                                     MetaDataManager mmgr)
Convenience accessor for the Element ClassMetaData.

Parameters:
clr - ClassLoader resolver (in case we need to initialise it)
mmgr - MetaData manager
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

setElementType

public CollectionMetaData setElementType(java.lang.String type)

setEmbeddedElement

public CollectionMetaData setEmbeddedElement(java.lang.String embedded)

setEmbeddedElement

public CollectionMetaData setEmbeddedElement(boolean embedded)

setSerializedElement

public CollectionMetaData setSerializedElement(java.lang.String serialized)

setSerializedElement

public CollectionMetaData setSerializedElement(boolean serialized)

setDependentElement

public CollectionMetaData setDependentElement(java.lang.String dependent)

setDependentElement

public CollectionMetaData setDependentElement(boolean dependent)

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 © 2011. All Rights Reserved.