Method Summary |
|
public void | addListener(Object listener, Class[] classes) Method to register a listener for instances of the specified classes. |
public synchronized void | addStateManager(StateManager sm) Method to add the object managed by the specified StateManager to the cache. |
protected void | assertActiveTransaction() Method to assert if the current transaction is active. |
protected void | assertActiveTransactionOrNontransactionRead(String operation) Method to assert if no active transaction and nontransactionalRead is not set. |
public void | assertClassPersistable(Class cls) Method to assert if the specified class is Persistence Capable. |
protected void | assertDetachable(Object object) Method to assert if the specified object is Detachable. |
protected void | assertHasImplementationCreator() Validates that an ImplementationCreator instance is accessible. |
protected void | assertIsOpen() Method to assert if this Object Manager is open. |
protected void | assertNotDetached(Object object) Method to assert if the specified object is detached. |
protected void | assertWritable() Method to assert if the current transaction is active or non transactional
writes are allowed. |
public synchronized void | attachObject(Object pc, boolean sco) Method to attach a persistent detached object. |
public synchronized Object | attachObjectCopy(Object pc, boolean sco) Method to attach a persistent detached object returning an attached copy of the object. |
public synchronized void | clearDirty(StateManager sm) Method to clear an object from the list of dirty objects. |
public synchronized void | clearDirty() Method to clear all objects marked as dirty (whether directly or indirectly). |
public synchronized void | close() Method to close the Persistence Manager. |
public void | deleteObject(Object obj) Method to delete an object from the datastore.
NOT to be called by internal JPOX methods. |
public void | deleteObjectInternal(Object obj) Method to delete an object from persistence which should be called from internal calls only. |
public void | deleteObjects(Object[] objs) Method to delete an array of objects from the datastore. |
public void | deleteObjects(Collection objs) Method to delete an array of objects from the datastore. |
public void | detachAll() Method to detach all objects in the ObjectManager. |
public synchronized void | detachObject(Object obj, FetchPlanState state) Method to detach a persistent object without making a copy. |
public Object | detachObjectCopy(Object pc, FetchPlanState state) Detach a copy of the passed persistent object using the provided detach state. |
public void | disconnectLifecycleListener() |
public void | disconnectSMCache() |
public synchronized void | enlistInTransaction(StateManager sm) Method to enlist the specified StateManager in the current transaction. |
public synchronized void | evictAllObjects() Method to evict all current objects from L1 cache. |
public synchronized void | evictFromTransaction(StateManager sm) Method to evict the specified StateManager from the current transaction. |
public void | evictObject(Object obj) Internal method to evict an object from L1 cache. |
public void | evictObjects(Class cls, boolean subclasses) Method to evict all objects of the specified type (and optionaly its subclasses). |
public boolean | exists(Object obj) Method to return if the specified object exists in the datastore. |
public synchronized Object | findObject(Object id, FieldValues fv, Class cls, boolean ignoreCache) Accessor for an object given the object id. |
public synchronized Object | findObject(Object id, FieldValues fv) Accessor for an object given the object id. |
public synchronized Object | findObject(Object id, boolean validate, boolean checkInheritance, String objectClassName) Accessor for an object given the object id. |
public synchronized Object | findObjectUsingAID(Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance) Accessor for the StateManager of an object given the object AID.
Parameters: pcClass - The class of the PC object Parameters: fv - The field values to be loaded Parameters: ignoreCache - true if it must ignore the cache Parameters: checkInheritance - Whether look to the database to determine whichclass this object is. |
public synchronized StateManager | findStateManager(Object pc) Method to find the StateManager for an object.
Parameters: pc - The object we require the StateManager for. |
public void | flush() Method callable from external APIs for user-management of flushing. |
public synchronized void | flushInternal(boolean flushToDatastore) This method flushes all dirty, new, and deleted instances to the
datastore. |
public ApiAdapter | getApiAdapter() Accessor for the API adapter. |
public CallbackHandler | getCallbackHandler() Retrieve the callback handler for this ObjectManager. |
public ClassLoaderResolver | getClassLoaderResolver() |
public boolean | getCopyOnAttach() Accessor for whether to copy on attaching. |
public boolean | getDetachAllOnCommit() Accessor for whether to detach all objects on commit of the transaction. |
public boolean | getDetachOnClose() Accessor for whether to detach objects on close of the ObjectManager. |
public synchronized Extent | getExtent(Class pcClass, boolean subclasses) Extents are collections of datastore objects managed by the datastore,
not by explicit user operations on collections. |
public FetchPlan | getFetchPlan() |
public boolean | getIgnoreCache() Accessor for whether to ignore the cache. |
public Set | getManagedObjects() Accessor for the currently managed objects for the current transaction. |
public Set | getManagedObjects(Class[] classes) Accessor for the currently managed objects for the current transaction. |
public Set | getManagedObjects(String[] states) Accessor for the currently managed objects for the current transaction. |
public Set | getManagedObjects(String[] states, Class[] classes) Accessor for the currently managed objects for the current transaction. |
public MetaDataManager | getMetaDataManager() Accessor for the MetaDataManager for this ObjectManager (and its factory). |
public boolean | getMultithreaded() Accessor for whether the Persistence Manager is multithreaded. |
public OMFContext | getOMFContext() |
public synchronized Object | getObjectFromCache(Object id) Convenience method to access an object in the cache. |
public Object | getOwner() Method to return the owner PM/EM object. |
public synchronized StateManager | getStateManagerById(Object id) Accessor for the StateManager of an object given the object id.
Parameters: id - Id of the object. |
public StoreManager | getStoreManager() Accessor for the Store Manager. |
protected ThreadContextInfo | getThreadContextInfo() Accessor for the thread context information, for the current thread. |
public Transaction | getTransaction() Accessor for the current transaction. |
public boolean | hasPersistenceInformationForClass(Class cls) Utility method to check if the specified class has reachable metadata or annotations. |
public synchronized void | hereIsStateManager(StateManager sm, Object pc) Method to add the StateManager for an object to this ObjectManager's list. |
protected void | initialiseLevel1Cache() Method to initialise the L1 cache. |
public boolean | isClosed() Accessor for whether this ObjectManager is closed. |
public boolean | isDelayDatastoreOperationsEnabled() Whether the datastore operations are delayed until commit/flush. |
public boolean | isEnlistedInTransaction(Object id) Method to return if an object is enlisted in the current transaction. |
public boolean | isFlushing() Returns whether the ObjectManager is in the process of flushing. |
public boolean | isInserted(Object pc, int fieldNumber) Convenience method to find if the specified field of the specified object has been inserted yet. |
public boolean | isInserted(Object pc, String className) Convenience method to find if the specified object is inserted down to the specified class level yet. |
public boolean | isInserting(Object pc) Tests whether this persistable object is in the process of being inserted. |
public boolean | isManagingRelations() Returns whether this ObjectManager is currently performing the manage relationships task. |
public boolean | isRunningDetachAllOnCommit() Accessor for whether this ObjectManager is currently running detachAllOnCommit. |
public void | makeObjectNontransactional(Object obj) Method to make an object nontransactional. |
public void | makeObjectTransactional(Object obj) Method to make an object transactional. |
public synchronized void | makeObjectTransient(Object obj, FetchPlanState state) Method to migrate an object to transient state. |
public synchronized void | markDirty(StateManager sm, boolean directUpdate) Method to mark an object (StateManager) as dirty. |
public void | markManagedRelationDirty(StateManager sm) Method to mark the specified StateManager as needing an update due to managed relation constraints. |
public Object | newInstance(Class cls) Method to generate an instance of an interface, abstract class, or concrete PC class. |
public Object | newObjectId(Class pcClass, Object key) This method returns an object id instance corresponding to the pcClass and key arguments. |
public synchronized Query | newQuery() Construct an empty query instance. |
protected void | performManagedRelationships() Method to perform managed relationships tasks. |
public Object | persistObject(Object obj) Method to make an object persistent.
NOT to be called by internal JPOX methods. |
public Object | persistObjectInternal(Object obj, FieldValues preInsertChanges, StateManager ownerSM, int ownerFieldNum, int objectType) Method to make an object persistent which should be called from internal calls only. |
public synchronized void | postBegin() Method to perform any post-begin checks. |
public void | postClose() |
public synchronized void | postCommit() Commit any changes made to objects managed by the persistence manager to the database. |
public synchronized void | preCommit() Method to perform any pre-commit checks. |
public synchronized void | preRollback() Rollback any changes made to objects managed by the persistence manager
to the database. |
public synchronized void | putObjectIntoCache(StateManager sm, boolean level1, boolean level2) Convenience method to add an object to the cache(s). |
public synchronized void | refreshAllObjects() Method to do a refresh of all objects. |
public void | refreshObject(Object obj) Method to do a refresh of an object, updating it from its
datastore representation. |
public void | removeAllInstanceLifecycleListeners() This method removes all previously registered lifecycle listeners. |
public void | removeListener(Object listener) Method to remove a currently registered listener. |
public synchronized void | removeObjectFromCache(Object pc, Object id, boolean level1, boolean level2) Convenience method to evict an object from the cache(s). |
public synchronized void | removeStateManager(StateManager sm) Method to remove the object managed by the specified StateManager from the cache. |
protected void | removeThreadContextInfo() Method to remove the current thread context info for the current thread. |
public synchronized void | replaceObjectId(Object pc, Object oldID, Object newID) Replace the previous object id for a persistable object with a new one. |
public void | retrieveObject(Object obj, boolean fgOnly) Method to retrieve an object. |
public void | setCopyOnAttach(boolean flag) Mutator for whether to copy on attaching. |
public void | setDetachAllOnCommit(boolean flag) Mutator for whether to detach all objects on commit of the transaction. |
public void | setDetachOnClose(boolean flag) Mutator for whether to detach objects on close of the ObjectManager. |
public void | setIgnoreCache(boolean flag) Mutator for whether to ignore the cache. |
public void | setMultithreaded(boolean flag) Mutator for whether the Persistence Manager is multithreaded. |