org.datanucleus.metadata
Class ArrayMetaData

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

public class ArrayMetaData
extends ContainerMetaData

Representation of the Meta-Data for an Array.

See Also:
Serialized Form

Field Summary
protected  org.datanucleus.metadata.ContainerComponent element
          Representation of the element of the array.
protected  boolean mayContainPersistenceCapableElements
          wether this array may contain PersistenceCapable elements
 
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
ArrayMetaData(AbstractMemberMetaData parent, ArrayMetaData arrmd)
          Constructor to create a copy of the passed metadata using the passed parent.
ArrayMetaData(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 implementation types (when element is a reference type).
 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 value
 boolean isSerializedElement()
          Accessor for the serialized-element tag value
 boolean mayContainPersistenceCapableElements()
          Returns whether this array may contain PersistenceCapable elements (as indicated by the user).
 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 array.


mayContainPersistenceCapableElements

protected boolean mayContainPersistenceCapableElements
wether this array may contain PersistenceCapable elements

Constructor Detail

ArrayMetaData

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

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

ArrayMetaData

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

Parameters:
parent - The parent Field
elementType - Implementation type(s) of element possible (when it is a reference type).
embeddedElement - Whether the element is embedded into the join table
dependentElement - Whether the element is dependent for deletion purposes
serializedElement - Whether the element is serialised into the join table
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 in loading any classes
primary - the primary ClassLoader to use (or null)

getElementType

public java.lang.String getElementType()
Accessor for the element implementation types (when element is a reference type). The return can contain comma-separated values.

Returns:
element implementation types

elementIsPersistent

public boolean elementIsPersistent()

getElementClassMetaData

public AbstractClassMetaData getElementClassMetaData()
Accessor for the Element ClassMetaData

Returns:
element ClassMetaData

mayContainPersistenceCapableElements

public boolean mayContainPersistenceCapableElements()
Returns whether this array may contain PersistenceCapable elements (as indicated by the user). TODO Remove this. The element-type of the array defines such things and this is not the solution

Returns:
whether this array may contain PersistenceCapable elements

isEmbeddedElement

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

Returns:
embedded-element value

isSerializedElement

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

Returns:
serialized-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

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 - The prefix string
indent - The indent string
Returns:
a string representation of the object.


Copyright © 2009. All Rights Reserved.