org.datanucleus.metadata
Class ContainerMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.ContainerMetaData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ArrayMetaData, CollectionMetaData, MapMetaData

public class ContainerMetaData
extends MetaData

Representation of the Meta-Data for a container. This is subclassed by Array, Collection, and Map.

See Also:
Serialized Form

Field Summary
 
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
ContainerMetaData()
          Constructor.
 
Method Summary
 java.lang.Boolean allowNulls()
          Whether this container allows nulls.
 java.lang.String getFieldName()
          Accessor for the parent field name
 AbstractMemberMetaData getMemberMetaData()
          Accessor for the parent field/property MetaData.
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary, MetaDataManager mmgr)
          Method to populate any defaults, and check the validity of the MetaData.
 
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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerMetaData

public ContainerMetaData()
Constructor.

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.

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

allowNulls

public java.lang.Boolean allowNulls()
Whether this container allows nulls. For a collection/array this is whether there can be null elements. For a map this whether there can be null keys AND values (really we ought to treat them independent, but not done like that currently).

Returns:
Whether nulls are allowed to be stored in the container

getMemberMetaData

public AbstractMemberMetaData getMemberMetaData()
Accessor for the parent field/property MetaData.

Returns:
Parent metadata

getFieldName

public java.lang.String getFieldName()
Accessor for the parent field name

Returns:
Parent field name.


Copyright © 2011. All Rights Reserved.