org.datanucleus.metadata
Class FetchGroupMetaData

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

public class FetchGroupMetaData
extends MetaData

A fetch group defines a particular loaded state for an object graph. It specifies fields/properties to be loaded for all of the instances in the graph when this fetch group is active.

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

Field Summary
protected  FetchGroupMetaData[] fetchGroupMetaData
          A contained fetch-group element indicates that the named group is to be included in the group being defined.
protected  java.util.List fetchGroups
          A contained fetch-group element indicates that the named group is to be included in the group being defined.
protected  AbstractMemberMetaData[] memberMetaData
          members declared to be in this fetch group.
protected  java.util.List members
          members (fields/properties) declared to be in this fetch group.
 
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
FetchGroupMetaData(MetaData parent, java.lang.String postLoad, java.lang.String name)
          Constructor.
 
Method Summary
 void addFetchGroup(FetchGroupMetaData fgmd)
          Add a new FetchGroupMetaData
 void addMember(AbstractMemberMetaData mmd)
          Add a new field/property.
 FetchGroupMetaData[] getFetchGroupMetaData()
          Accessor for fetchGroupMetaData
 AbstractMemberMetaData[] getMemberMetaData()
          Accessor for metadata for the members of this group.
 java.lang.String getName()
          Accessor for name
 java.lang.Boolean getPostLoad()
          Accessor for postLoad
 void initialise()
          Initialisation method.
 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.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, 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

fetchGroupMetaData

protected FetchGroupMetaData[] fetchGroupMetaData
A contained fetch-group element indicates that the named group is to be included in the group being defined. Nested fetch group elements are limited to only the name attribute.


memberMetaData

protected AbstractMemberMetaData[] memberMetaData
members declared to be in this fetch group.


fetchGroups

protected java.util.List fetchGroups
A contained fetch-group element indicates that the named group is to be included in the group being defined. Nested fetch group elements are limited to only the name attribute.


members

protected java.util.List members
members (fields/properties) declared to be in this fetch group.

Constructor Detail

FetchGroupMetaData

public FetchGroupMetaData(MetaData parent,
                          java.lang.String postLoad,
                          java.lang.String name)
Constructor.

Parameters:
parent - The parent MetaData
postLoad - Whether to use at post load
name - Name of fetch group
Method Detail

initialise

public void initialise()
Initialisation method. This should be called AFTER using the populate method if you are going to use populate. It creates the internal convenience arrays etc needed for normal operation.

Overrides:
initialise in class MetaData

getName

public final java.lang.String getName()
Accessor for name

Returns:
Returns the name.

getPostLoad

public final java.lang.Boolean getPostLoad()
Accessor for postLoad

Returns:
Returns the postLoad.

getFetchGroupMetaData

public final FetchGroupMetaData[] getFetchGroupMetaData()
Accessor for fetchGroupMetaData

Returns:
Returns the fetchGroupMetaData.

getMemberMetaData

public final AbstractMemberMetaData[] getMemberMetaData()
Accessor for metadata for the members of this group.

Returns:
Returns the metadata for members

addFetchGroup

public void addFetchGroup(FetchGroupMetaData fgmd)
Add a new FetchGroupMetaData

Parameters:
fgmd - the fetch group

addMember

public void addMember(AbstractMemberMetaData mmd)
Add a new field/property.

Parameters:
mmd - the field/property metadata

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object. 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 © 2009. All Rights Reserved.