org.datanucleus.metadata
Class ImplementsMetaData

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

public class ImplementsMetaData
extends MetaData

The implements element declares a persistence-capable interface implemented by the persistence-capable class that contains this element. An extent of persistence-capable classes that implement this interface is managed by the JDO implementation. The extent can be used for queries or for iteration just like an extent of persistence-capable instances. The attribute name is required, and is the name of the interface. The java class naming rules apply: if the interface name is unqualified, the package is the name of the enclosing package.

MetaData Element

The MetaData Element represented here is as follows
 
 
 

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

Field Summary
protected  java.lang.String name
          Name of the interface implemented.
protected  java.util.List properties
          Properties implemented.
 
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
ImplementsMetaData(ClassMetaData parent, java.lang.String name)
          Constructor.
 
Method Summary
 void addProperty(PropertyMetaData pmd)
          Method to add a property to this interface.
 java.lang.String getName()
          Accessor for name.
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Method to populate the details of the implements.
 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, 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

name

protected java.lang.String name
Name of the interface implemented.


properties

protected final java.util.List properties
Properties implemented.

Constructor Detail

ImplementsMetaData

public ImplementsMetaData(ClassMetaData parent,
                          java.lang.String name)
Constructor.

Parameters:
parent - Parent class
name - Name of the interface being implemented
Method Detail

getName

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

Returns:
Returns the name.

addProperty

public void addProperty(PropertyMetaData pmd)
Method to add a property to this interface.

Parameters:
pmd - Property

populate

public void populate(ClassLoaderResolver clr,
                     java.lang.ClassLoader primary)
Method to populate the details of the implements.

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

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.