Package org.datanucleus.store
Class StoreData
- java.lang.Object
-
- org.datanucleus.store.StoreData
-
public class StoreData extends Object
Basic store information about an object that is stored in a datastore. Can be a class or member.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStoreData.Type
-
Field Summary
Fields Modifier and Type Field Description protected StringinterfaceNameName of the persistent interface, when this represents one.protected MetaDatametadataMetadata for the class, or member (join table) depending on what this represents.protected StringnameName of the class/field.protected Map<String,Object>propertiesExtension props.protected Tabletableprotected StoreData.TypetypeType of data being stored (FCO, SCO).
-
Constructor Summary
Constructors Constructor Description StoreData(String name, MetaData metadata, StoreData.Type type, String interfaceName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(String key, Object value)StringgetInterfaceName()Accessor for the persistent interface nameMetaDatagetMetaData()Accessor for class/field meta data.StringgetName()Accessor for fully-qualified class/member name.Map<String,Object>getProperties()Accessor for extension props, if utilised by the store manager.ObjectgetProperty(String key)TablegetTable()Accessor for the generic Table for this class/member (if the store plugin supports generic Tables).StoreData.TypegetType()Accessor for type.booleanisFCO()Accessor for whether this represents FCO data.booleanisSCO()Accessor for whether this represents SCO data.voidsetMetaData(MetaData md)Method to set the MetaData for this class.voidsetTable(Table tbl)StringtoString()Method to return this class/field managed object as a string.
-
-
-
Field Detail
-
name
protected final String name
Name of the class/field.
-
type
protected final StoreData.Type type
Type of data being stored (FCO, SCO).
-
metadata
protected MetaData metadata
Metadata for the class, or member (join table) depending on what this represents.
-
interfaceName
protected String interfaceName
Name of the persistent interface, when this represents one. Otherwise null.
-
table
protected Table table
-
-
Constructor Detail
-
StoreData
public StoreData(String name, MetaData metadata, StoreData.Type type, String interfaceName)
Constructor.- Parameters:
name- Fully-qualified name of the class/member.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 String getName()
Accessor for fully-qualified class/member 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 StoreData.Type getType()
Accessor for type.- Returns:
- Returns the type.
-
getInterfaceName
public String getInterfaceName()
Accessor for the persistent interface name- Returns:
- Returns the persistent interface name
-
setTable
public void setTable(Table tbl)
-
getTable
public Table getTable()
Accessor for the generic Table for this class/member (if the store plugin supports generic Tables).- Returns:
- The table associated with this class/member
-
getProperties
public Map<String,Object> getProperties()
Accessor for extension props, if utilised by the store manager.- Returns:
- Extension props
-
-