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 class
StoreData.Type
-
Field Summary
Fields Modifier and Type Field Description protected String
interfaceName
Name of the persistent interface, when this represents one.protected MetaData
metadata
Metadata for the class, or member (join table) depending on what this represents.protected String
name
Name of the class/field.protected Map<String,Object>
properties
Extension props.protected Table
table
protected StoreData.Type
type
Type 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 void
addProperty(String key, Object value)
String
getInterfaceName()
Accessor for the persistent interface nameMetaData
getMetaData()
Accessor for class/field meta data.String
getName()
Accessor for fully-qualified class/member name.Map<String,Object>
getProperties()
Accessor for extension props, if utilised by the store manager.Object
getProperty(String key)
Table
getTable()
Accessor for the generic Table for this class/member (if the store plugin supports generic Tables).StoreData.Type
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.void
setTable(Table tbl)
String
toString()
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
-
-