| java.lang.Object com.sleepycat.persist.impl.PersistEntityBinding
PersistEntityBinding | public class PersistEntityBinding implements EntityBinding(Code) | | A persistence entity binding for a given entity class.
author: Mark Hayes |
Method Summary | |
public Object | entryToObject(DatabaseEntry key, DatabaseEntry data) | public PersistKeyAssigner | getKeyAssigner() | public void | objectToData(Object entity, DatabaseEntry data) | public void | objectToKey(Object entity, DatabaseEntry key) | static Object | readEntity(Catalog catalog, DatabaseEntry key, 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. | static void | writeEntity(Format format, Catalog catalog, Object entity, DatabaseEntry data, boolean rawAccess) Writes the formatId and object, and returns the bytes.
This is a special case of EntityOutput.writeObject for a top level
entity. |
rawAccess | boolean rawAccess(Code) | | |
PersistEntityBinding | public PersistEntityBinding(PersistCatalog catalog, String entityClassName, boolean rawAccess)(Code) | | Creates a key binding for a given entity class.
|
readEntity | static Object readEntity(Catalog catalog, DatabaseEntry key, DatabaseEntry data, boolean rawAccess)(Code) | | Creates the instance, reads the entity key first to track visited
entities correctly, then reads the data and returns the entity.
This is a special case of EntityInput.readObject for a top level entity.
Special treatments are:
- The formatId must be >= 0; since this is the top level instance, it
cannot refer to a visited object nor be a null reference.
- The resulting entity is not added to the visited object set; entities
cannot be referenced by another (or the same) entity.
- Reader.readPriKey must be called prior to calling Reader.readObject.
|
writeEntity | static void writeEntity(Format format, Catalog catalog, Object entity, DatabaseEntry data, boolean rawAccess)(Code) | | Writes the formatId and object, and returns the bytes.
This is a special case of EntityOutput.writeObject for a top level
entity. Special treatments are:
- The entity may not be null.
- The entity is not added to the visited object set nor checked for
existence in the visited object set; entities cannot be referenced by
another (or the same) entity.
|
|
|