|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.AbstractPersistenceHandler
org.datanucleus.store.rdbms.RDBMSPersistenceHandler
public class RDBMSPersistenceHandler
Handler for persistence for RDBMS datastores.
| 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.store.ObjectProvider op)
Deletes a persistent object from the database. |
void |
fetchObject(org.datanucleus.store.ObjectProvider op,
int[] memberNumbers)
Fetches (fields of) a persistent object from the database. |
Object |
findObject(org.datanucleus.store.ExecutionContext ec,
Object id)
Method to return a persistable object with the specified id. |
void |
insertObject(org.datanucleus.store.ObjectProvider op)
Inserts a persistent object into the database. |
void |
locateObject(org.datanucleus.store.ObjectProvider op)
Locates this object in the datastore. |
void |
locateObjects(org.datanucleus.store.ObjectProvider[] ops)
|
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.store.ObjectProvider op,
int[] fieldNumbers)
Updates a persistent object in the database. |
boolean |
useReferentialIntegrity()
|
| Methods inherited from class org.datanucleus.store.AbstractPersistenceHandler |
|---|
batchEnd, batchStart, deleteObjects, findObjects, insertObjects |
| 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()
public boolean useReferentialIntegrity()
useReferentialIntegrity in interface org.datanucleus.store.StorePersistenceHandleruseReferentialIntegrity in class org.datanucleus.store.AbstractPersistenceHandlerpublic void insertObject(org.datanucleus.store.ObjectProvider op)
op - The ObjectProvider of the object to be inserted.
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communication
public void fetchObject(org.datanucleus.store.ObjectProvider op,
int[] memberNumbers)
op - Object Provider of the object to be fetched.memberNumbers - The numbers of the members to be fetched.
org.datanucleus.exceptions.NucleusObjectNotFoundException - if the object doesn't exist
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communication
public void updateObject(org.datanucleus.store.ObjectProvider op,
int[] fieldNumbers)
op - The ObjectProvider 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.store.ObjectProvider op)
op - The ObjectProvider of the object to be deleted.
org.datanucleus.exceptions.NucleusDataStoreException - when an error occurs in the datastore communicationpublic void locateObjects(org.datanucleus.store.ObjectProvider[] ops)
locateObjects in interface org.datanucleus.store.StorePersistenceHandlerlocateObjects in class org.datanucleus.store.AbstractPersistenceHandlerpublic void locateObject(org.datanucleus.store.ObjectProvider op)
op - ObjectProvider 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 Object findObject(org.datanucleus.store.ExecutionContext ec,
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.
ec - execution contextid - 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 | |||||||||