|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.RDBMSPersistenceHandler
public class RDBMSPersistenceHandler
Handler for persistence for RDBMS datastores. Makes use of the plugin-point "org.datanucleus.store.rdbms.rdbms_request" defining which request handlers we should use for the different operations.
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localiser for messages. |
protected org.datanucleus.store.mapped.MappedStoreManager |
storeMgr
Manager for the store. |
| Constructor Summary | |
|---|---|
RDBMSPersistenceHandler(org.datanucleus.store.StoreManager storeMgr)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Method to close the handler and release any resources. |
void |
deleteObject(org.datanucleus.StateManager sm)
Deletes a persistent object from the database. |
void |
fetchObject(org.datanucleus.StateManager sm,
int[] fieldNumbers)
Fetches a persistent object from the database. |
java.lang.Object |
findObject(org.datanucleus.ObjectManager om,
java.lang.Object id)
Method to return a persistable object with the specified id. |
void |
insertObject(org.datanucleus.StateManager sm)
Inserts a persistent object into the database. |
void |
locateObject(org.datanucleus.StateManager sm)
Locates this object in the datastore. |
void |
removeAllRequests()
Convenience method to remove all requests since the schema has changed. |
void |
removeRequestsForTable(org.datanucleus.store.mapped.DatastoreClass table)
Convenience method to remove all requests that use a particular table since the structure of the table has changed potentially leading to missing columns in the cached version. |
void |
updateObject(org.datanucleus.StateManager sm,
int[] fieldNumbers)
Updates a persistent object in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
protected final org.datanucleus.store.mapped.MappedStoreManager storeMgr
| Constructor Detail |
|---|
public RDBMSPersistenceHandler(org.datanucleus.store.StoreManager storeMgr)
storeMgr - StoreManager| Method Detail |
|---|
public void close()
close in interface org.datanucleus.store.StorePersistenceHandlerpublic void insertObject(org.datanucleus.StateManager sm)
insertObject in interface org.datanucleus.store.StorePersistenceHandlersm - The state manager of the object to be inserted.
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communication
public void fetchObject(org.datanucleus.StateManager sm,
int[] fieldNumbers)
fetchObject in interface org.datanucleus.store.StorePersistenceHandlersm - The state manager of the object to be fetched.fieldNumbers - The numbers of the fields to be fetched.
org.datanucleus.exceptions.NucleusObjectNotFoundException - if the object doesnt exist
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communication
public void updateObject(org.datanucleus.StateManager sm,
int[] fieldNumbers)
updateObject in interface org.datanucleus.store.StorePersistenceHandlersm - The state manager of the object to be updated.fieldNumbers - The numbers of the fields to be updated.
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communicationpublic void deleteObject(org.datanucleus.StateManager sm)
deleteObject in interface org.datanucleus.store.StorePersistenceHandlersm - The state manager of the object to be deleted.
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communicationpublic void locateObject(org.datanucleus.StateManager sm)
locateObject in interface org.datanucleus.store.StorePersistenceHandlersm - The StateManager for the object to be found
org.datanucleus.exceptions.NucleusObjectNotFoundException - if the object doesnt exist
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communication
public java.lang.Object findObject(org.datanucleus.ObjectManager om,
java.lang.Object id)
StoreManager implementations may simply return null, indicating that they leave the object instantiate to us. Other implementations may instantiate the object in question (whether the implementation may trust that the object is not already instantiated has still to be determined). If an implementation believes that an object with the given ID should exist, but in fact does not exist, then the implementation should throw a RuntimeException. It should not silently return null in this case.
findObject in interface org.datanucleus.store.StorePersistenceHandlerom - the ObjectManager which will manage the objectid - the id of the object in question.
public void removeAllRequests()
public void removeRequestsForTable(org.datanucleus.store.mapped.DatastoreClass table)
table - The table
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||