org.datanucleus.store
Class FederationPersistence

java.lang.Object
  extended by org.datanucleus.store.FederationPersistence
All Implemented Interfaces:
StorePersistenceHandler

public class FederationPersistence
extends java.lang.Object
implements StorePersistenceHandler


Constructor Summary
FederationPersistence()
           
 
Method Summary
 void close()
          Method to close the persistence handler, and release any resources.
 void deleteObject(StateManager sm)
          Deletes a persistent object from the datastore.
 void fetchObject(StateManager sm, int[] fieldNumbers)
          Fetches a persistent object from the database.
 java.lang.Object findObject(ObjectManager om, java.lang.Object id)
          Method to find a persistable object with the specified id from the datastore, if the StoreManager supports this operation (optional).
 void insertObject(StateManager sm)
          Inserts a persistent object into the database.
 void locateObject(StateManager sm)
          Locates this object in the datastore.
 void updateObject(StateManager sm, int[] fieldNumbers)
          Updates a persistent object in the datastore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FederationPersistence

public FederationPersistence()
Method Detail

close

public void close()
Description copied from interface: StorePersistenceHandler
Method to close the persistence handler, and release any resources.

Specified by:
close in interface StorePersistenceHandler

deleteObject

public void deleteObject(StateManager sm)
Description copied from interface: StorePersistenceHandler
Deletes a persistent object from the datastore.

Specified by:
deleteObject in interface StorePersistenceHandler
Parameters:
sm - The state manager of the object to be deleted.

fetchObject

public void fetchObject(StateManager sm,
                        int[] fieldNumbers)
Description copied from interface: StorePersistenceHandler
Fetches a persistent object from the database.

Specified by:
fetchObject in interface StorePersistenceHandler
Parameters:
sm - The state manager of the object to be fetched.
fieldNumbers - The numbers of the fields to be fetched.

findObject

public java.lang.Object findObject(ObjectManager om,
                                   java.lang.Object id)
Description copied from interface: StorePersistenceHandler
Method to find a persistable object with the specified id from the datastore, if the StoreManager supports this operation (optional). This allows for datastores that perform the instantiation of objects directly (such as ODBMS). With other types of datastores (e.g RDBMS) this method returns null. If the StoreManager supports this operation yet the object is not found an exception should be thrown.

Specified by:
findObject in interface StorePersistenceHandler
Parameters:
om - the ObjectManager which will manage the object
id - the id of the object in question.
Returns:
a persistable object with a valid object state (for example: hollow) or null, indicating that the implementation leaves the instantiation work to JPOX.

insertObject

public void insertObject(StateManager sm)
Description copied from interface: StorePersistenceHandler
Inserts a persistent object into the database.

Specified by:
insertObject in interface StorePersistenceHandler
Parameters:
sm - The state manager of the object to be inserted.

locateObject

public void locateObject(StateManager sm)
Description copied from interface: StorePersistenceHandler
Locates this object in the datastore.

Specified by:
locateObject in interface StorePersistenceHandler
Parameters:
sm - The StateManager for the object to be found

updateObject

public void updateObject(StateManager sm,
                         int[] fieldNumbers)
Description copied from interface: StorePersistenceHandler
Updates a persistent object in the datastore.

Specified by:
updateObject in interface StorePersistenceHandler
Parameters:
sm - The state manager of the object to be updated.
fieldNumbers - The numbers of the fields to be updated.


Copyright © 2009. All Rights Reserved.