Method Summary |
|
void | addListener(Object listener, Class[] classes) Method to register a listener for instances of the specified classes. |
void | addStateManager(StateManager sm) Method to add the object managed by the specified StateManager to the cache. |
void | assertClassPersistable(Class cls) Convenience method to assert if the passed class is not persistable. |
void | attachObject(Object pc, boolean sco) Method to attach the passed object (and related objects). |
Object | attachObjectCopy(Object pc, boolean sco) Method to attach a copy of the passed object (and related objects). |
void | clearDirty(StateManager sm) Mark the specified StateManager as clean. |
void | clearDirty() Method to mark as clean all StateManagers of dirty objects. |
void | close() Method to close the ObjectManager. |
void | deleteObject(Object obj) Method to delete an object from the datastore. |
void | deleteObjectInternal(Object pc) Method to delete the passed object (internally). |
void | deleteObjects(Object[] objs) Method to delete an array of objects from the datastore. |
void | deleteObjects(Collection objs) Method to delete a collection of objects from the datastore. |
void | detachAll() Method to detach all objects in the PM. |
void | detachObject(Object pc, FetchPlanState state) Method to detach the passed object. |
Object | detachObjectCopy(Object pc, FetchPlanState state) Method to detach a copy of the passed object using the provided state. |
public void | disconnectLifecycleListener() |
public void | disconnectSMCache() |
void | enlistInTransaction(StateManager sm) Method to enlist the specified StateManager in the current transaction. |
void | evictAllObjects() |
void | evictFromTransaction(StateManager sm) Method to evict the specified StateManager from the current transaction. |
void | evictObject(Object pc) Method to evict the passed object. |
void | evictObjects(Class cls, boolean subclasses) Method to evict all objects of the specified type (and optionaly its subclasses). |
boolean | exists(Object obj) Method to return if the specified object exists in the datastore. |
Object | findObject(Object id, FieldValues fv) Accessor for an object given the object id. |
Object | findObject(Object id, boolean validate, boolean checkInheritance, String objectClassName) Accessor for an object given the object id.
Parameters: id - Id of the object. Parameters: validate - Whether to validate the object state Parameters: checkInheritance - Whether look to the database to determine whichclass this object is. |
Object | findObject(Object id, FieldValues fv, Class pcClass, boolean ignoreCache) Accessor for an object given the object id.
Parameters: id - Id of the object. Parameters: fv - the FieldValues Parameters: pcClass - the type which the object is. |
Object | findObjectUsingAID(Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance) Accessor for an object given the object id. |
StateManager | findStateManager(Object pc) Method to find the StateManager for the passed persistable object when it is managed by this manager. |
void | flush() Method callable from external APIs for user-management of flushing. |
void | flushInternal(boolean flushToDatastore) Method to flushes all dirty, new, and deleted instances to the datastore.
It has no effect if a transaction is not active. |
ApiAdapter | getApiAdapter() Accessor for the API adapter. |
CallbackHandler | getCallbackHandler() |
ClassLoaderResolver | getClassLoaderResolver() Accessor for the ClassLoader resolver to use in class loading issues. |
public boolean | getCopyOnAttach() Accessor for whether the ObjectManager should copy on attaching. |
public boolean | getDetachAllOnCommit() |
org.jpox.store.Extent | getExtent(Class candidateClass, boolean includeSubclasses) Accessor for the Extent for a class (and optionally its subclasses). |
FetchPlan | getFetchPlan() |
boolean | getIgnoreCache() Accessor for whether to ignore the cache. |
Set | getManagedObjects() Accessor for the currently managed objects for the current transaction. |
Set | getManagedObjects(Class[] classes) Accessor for the currently managed objects for the current transaction. |
Set | getManagedObjects(String[] states) Accessor for the currently managed objects for the current transaction. |
Set | getManagedObjects(String[] states, Class[] classes) Accessor for the currently managed objects for the current transaction. |
MetaDataManager | getMetaDataManager() Accessor for the MetaData Manager. |
public boolean | getMultithreaded() |
OMFContext | getOMFContext() Accessor for the context in which this ObjectManager is running. |
public Object | getObjectFromCache(Object id) Convenience method to access an object in the cache. |
Object | getOwner() Method to return the owner object. |
StateManager | getStateManagerById(Object myID) Accessor for the StateManager of an object given the object id.
Parameters: myID - Id of the object. |
StoreManager | getStoreManager() Accessor for the Store Manager. |
Transaction | getTransaction() Accessor for the current transaction for this ObjectManager. |
public boolean | hasPersistenceInformationForClass(Class cls) Utility method to check if the specified class has reachable metadata or annotations. |
void | hereIsStateManager(StateManager sm, Object pc) Method to register the StateManager as being for the passed object. |
boolean | isClosed() Accessor for whether this ObjectManager is closed. |
boolean | isDelayDatastoreOperationsEnabled() Whether the datastore operations are delayed until commit. |
boolean | isEnlistedInTransaction(Object id) Method to return if an object is enlisted in the current transaction. |
boolean | isFlushing() Accessor for whether the ObjectManager is flushing changes to the datastore. |
boolean | isInserted(Object pc, int fieldNumber) Convenience method to find if the specified field of the specified object has been inserted yet. |
boolean | isInserted(Object pc, String className) Convenience method to find if the specified object is inserted down to the specified class level yet. |
boolean | isInserting(Object pc) Tests whether this persistable object is being inserted. |
boolean | isManagingRelations() Returns whether this ObjectManager is currently performing the manage relationships task. |
boolean | isRunningDetachAllOnCommit() Accessor for whether this ObjectManager is currently running detachAllOnCommit. |
void | makeObjectNontransactional(Object pc) Method to make the passed object nontransactional. |
void | makeObjectTransactional(Object pc) Method to make the passed object transactional. |
void | makeObjectTransient(Object pc, FetchPlanState state) Method to make transient the passed object. |
void | markDirty(StateManager sm, boolean directUpdate) |
void | markManagedRelationDirty(StateManager sm) Method to mark the specified StateManager as needing an update due to managed relation constraints. |
Object | newInstance(Class persistenceCapable) Method to generate an instance of an interface, abstract class, or concrete PC class. |
Object | newObjectId(Class pcClass, Object key) This method returns an object id instance corresponding to the pcClass and key arguments. |
org.jpox.store.query.Query | newQuery() Accessor for a new Query. |
Object | persistObject(Object pc) Method to persist the passed object. |
Object | persistObjectInternal(Object pc, FieldValues preInsertChanges, StateManager ownerSM, int ownerFieldNum, int objectType) Method to persist the passed object (internally). |
public void | postBegin() Method called during the begin process, after the actual begin. |
void | postClose() Method called during the close process. |
public void | postCommit() Method called during the commit process, after the actual datastore commit. |
public void | preCommit() Method called during the commit process, before the actual datastore commit. |
public void | preRollback() Method called during the rollback process, after the actual datastore rollback. |
void | putObjectIntoCache(StateManager sm, boolean level1, boolean level2) Method to put a Persistable object associated to the StateManager into the respective cache(s). |
void | refreshAllObjects() |
void | refreshObject(Object pc) Method to refresh the passed object. |
void | removeListener(Object listener) Method to remove a currently registered listener. |
void | removeObjectFromCache(Object pc, Object id, boolean level1, boolean level2) Method to remove an object from the respective cache(s). |
void | removeStateManager(StateManager sm) Method to remove the object managed by the specified StateManager from the cache. |
void | replaceObjectId(Object pc, Object oldID, Object newID) |
void | retrieveObject(Object pc, boolean fgOnly) Method to retrieve the passed object. |
public void | setCopyOnAttach(boolean flag) Method whether to copy on attaching. |
public void | setDetachAllOnCommit(boolean flag) Method to set DetachAllOnCommit. |
void | setDetachOnClose(boolean flag) Method to set DetachOnClose. |
public void | setIgnoreCache(boolean ignore) Method to set whether to ignore the L1 cache. |
public void | setMultithreaded(boolean multi) |