org.datanucleus.store
Class StoreData

java.lang.Object
  extended by org.datanucleus.store.StoreData
Direct Known Subclasses:
MappedStoreData

public class StoreData
extends java.lang.Object

Basic store information about an object that is stored in a datastore. Can be a class or field.


Field Summary
static int FCO_TYPE
          First class object (FCO) type
protected static Localiser LOCALISER
          Localiser for messages.
protected  java.lang.String name
          Name of the class/field.
protected  java.util.Map properties
          Extension props.
static int SCO_TYPE
          Second class object (SCO) type
protected  int type
          Type of data being stored (FCO, SCO).
 
Constructor Summary
StoreData(java.lang.String name, int type)
          Constructor.
StoreData(java.lang.String name, MetaData metadata, int type, java.lang.String interfaceName)
          Constructor.
 
Method Summary
 void addProperty(java.lang.String key, java.lang.Object value)
           
 java.lang.String getInterfaceName()
          Accessor for the persistent interface name
 MetaData getMetaData()
          Accessor for class/field meta data.
 java.lang.String getName()
          Accessor for class/field name.
 java.util.Map getProperties()
          Accessor for extension props, if utilised by the store manager.
 int getType()
          Accessor for type.
 boolean isFCO()
          Accessor for whether this represents FCO data.
 boolean isSCO()
          Accessor for whether this represents SCO data.
 void setMetaData(MetaData md)
          Method to set the MetaData for this class.
 java.lang.String toString()
          Method to return this class/field managed object as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localiser for messages.


FCO_TYPE

public static final int FCO_TYPE
First class object (FCO) type

See Also:
Constant Field Values

SCO_TYPE

public static final int SCO_TYPE
Second class object (SCO) type

See Also:
Constant Field Values

name

protected final java.lang.String name
Name of the class/field.


type

protected final int type
Type of data being stored (FCO, SCO).


properties

protected java.util.Map properties
Extension props. Available for store manager to save additional info if required.

Constructor Detail

StoreData

public StoreData(java.lang.String name,
                 int type)
Constructor.

Parameters:
name - Name of the class/field
type - Type of data (FCO/SCO)

StoreData

public StoreData(java.lang.String name,
                 MetaData metadata,
                 int type,
                 java.lang.String interfaceName)
Constructor.

Parameters:
name - Name of the class/field
metadata - MetaData for the class or field (if available)
type - Type of data (FCO/SCO)
interfaceName - Name of persistent-interface being implemented
Method Detail

getName

public java.lang.String getName()
Accessor for class/field name.

Returns:
Returns the class/field name.

getMetaData

public MetaData getMetaData()
Accessor for class/field meta data.

Returns:
Returns the class/field meta data.

setMetaData

public void setMetaData(MetaData md)
Method to set the MetaData for this class.

Parameters:
md - MetaData

isFCO

public boolean isFCO()
Accessor for whether this represents FCO data.

Returns:
Whether it is FCO

isSCO

public boolean isSCO()
Accessor for whether this represents SCO data.

Returns:
Whether it is SCO.

getType

public int getType()
Accessor for type.

Returns:
Returns the type.

getInterfaceName

public java.lang.String getInterfaceName()
Accessor for the persistent interface name

Returns:
Returns the persistent interface name

addProperty

public void addProperty(java.lang.String key,
                        java.lang.Object value)

getProperties

public java.util.Map getProperties()
Accessor for extension props, if utilised by the store manager.

Returns:
Extension props

toString

public java.lang.String toString()
Method to return this class/field managed object as a string.

Overrides:
toString in class java.lang.Object
Returns:
String version of this class/field managed object.


Copyright © 2011. All Rights Reserved.