|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.impl.PersistEntityBinding
public class PersistEntityBinding
A persistence entity binding for a given entity class.
Field Summary | |
---|---|
(package private) PersistCatalog |
catalog
|
(package private) Format |
entityFormat
|
(package private) PersistKeyAssigner |
keyAssigner
|
(package private) boolean |
rawAccess
|
Constructor Summary | |
---|---|
PersistEntityBinding(PersistCatalog catalogParam,
String entityClassName,
boolean rawAccess)
Creates a key binding for a given entity class. |
Method Summary | |
---|---|
Object |
entryToObject(DatabaseEntry key,
DatabaseEntry data)
Converts key and data entry buffers into an entity Object. |
Object |
entryToObjectWithPriKey(Object priKey,
DatabaseEntry data)
This method will be used in PrimaryIndex.get, where the primary key is known to DPL. |
PersistKeyAssigner |
getKeyAssigner()
|
(package private) static Format |
getOrCreateFormat(Catalog useCatalog,
String clsName,
boolean rawAccess)
Utility method for getting or creating a format as appropriate for bindings and key creators. |
void |
objectToData(Object entity,
DatabaseEntry data)
Extracts the data entry from an entity Object. |
void |
objectToKey(Object entity,
DatabaseEntry key)
Extracts the key entry from an entity Object. |
(package private) static Object |
readEntity(Catalog useCatalog,
DatabaseEntry key,
Object priKey,
DatabaseEntry data,
boolean rawAccess)
Creates the instance, reads the entity key first to track visited entities correctly, then reads the data and returns the entity. |
(package private) void |
refresh(PersistCatalog newCatalog)
See Store.refresh. |
(package private) static void |
writeEntity(Format format,
Catalog catalog,
Object entity,
DatabaseEntry data,
boolean rawAccess)
Writes the formatId and object, and returns the bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
volatile PersistCatalog catalog
volatile Format entityFormat
final boolean rawAccess
PersistKeyAssigner keyAssigner
Constructor Detail |
---|
public PersistEntityBinding(PersistCatalog catalogParam, String entityClassName, boolean rawAccess)
Method Detail |
---|
public PersistKeyAssigner getKeyAssigner()
public Object entryToObject(DatabaseEntry key, DatabaseEntry data)
EntityBinding
entryToObject
in interface EntityBinding
key
- is the source key entry.data
- is the source data entry.
public Object entryToObjectWithPriKey(Object priKey, DatabaseEntry data)
static Object readEntity(Catalog useCatalog, DatabaseEntry key, Object priKey, DatabaseEntry data, boolean rawAccess) throws RefreshException
RefreshException
public void objectToData(Object entity, DatabaseEntry data)
EntityBinding
objectToData
in interface EntityBinding
entity
- is the source Object.data
- is the destination entry buffer.static void writeEntity(Format format, Catalog catalog, Object entity, DatabaseEntry data, boolean rawAccess) throws RefreshException
RefreshException
public void objectToKey(Object entity, DatabaseEntry key)
EntityBinding
objectToKey
in interface EntityBinding
entity
- is the source Object.key
- is the destination entry buffer.static Format getOrCreateFormat(Catalog useCatalog, String clsName, boolean rawAccess) throws RefreshException
RefreshException
void refresh(PersistCatalog newCatalog)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |