org.datanucleus.metadata
Class KeyMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.AbstractElementMetaData
          extended by org.datanucleus.metadata.KeyMetaData
All Implemented Interfaces:
java.io.Serializable, ColumnMetaDataContainer

public class KeyMetaData
extends AbstractElementMetaData

This element specifies the mapping for the key component of maps. The serialized attribute specifies that the key values are to be serialized into the named column.

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

Field Summary
 
Fields inherited from class org.datanucleus.metadata.AbstractElementMetaData
columnMetaData, columnName, columns, embeddedMetaData, foreignKeyMetaData, indexed, indexMetaData, mappedBy, uniqueConstraint, uniqueMetaData
 
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
KeyMetaData(MetaData parent, KeyMetaData kmd)
          Constructor to create a copy of the passed metadata using the provided parent.
KeyMetaData(MetaData parent, java.lang.String column, java.lang.String deleteAction, java.lang.String updateAction, java.lang.String indexed, java.lang.String unique, java.lang.String mappedBy)
          Constructor.
 
Method Summary
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Populate the MetaData.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.
 
Methods inherited from class org.datanucleus.metadata.AbstractElementMetaData
addColumn, getColumnMetaData, getColumnName, getEmbeddedMetaData, getForeignKeyMetaData, getIndexMetaData, getMappedBy, getUniqueMetaData, initialise, setEmbeddedMetaData, setForeignKeyMetaData, setIndexMetaData, setUniqueMetaData
 
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
 

Constructor Detail

KeyMetaData

public KeyMetaData(MetaData parent,
                   KeyMetaData kmd)
Constructor to create a copy of the passed metadata using the provided parent.

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

KeyMetaData

public KeyMetaData(MetaData parent,
                   java.lang.String column,
                   java.lang.String deleteAction,
                   java.lang.String updateAction,
                   java.lang.String indexed,
                   java.lang.String unique,
                   java.lang.String mappedBy)
Constructor.

Parameters:
parent - Parent MetaData
column - Name of column
deleteAction - attribute delete-action value
updateAction - attribute delete-action value
indexed - Whether to index this
unique - Whether to add a unique constraint
mappedBy - Field the key is mapped by in the value object
Method Detail

populate

public void populate(ClassLoaderResolver clr,
                     java.lang.ClassLoader primary)
Populate the MetaData.

Overrides:
populate in class AbstractElementMetaData
Parameters:
clr - Class loader to use
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 using a prefix 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.