Java Doc for ObjectManager.java in  » Database-ORM » JPOX » org » jpox » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » JPOX » org.jpox 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jpox.ObjectManager

All known Subclasses:   org.jpox.ObjectManagerImpl,
ObjectManager
public interface ObjectManager (Code)
Definition of an ObjectManager. Provides the basics of object persistence within JPOX Core, upon which are built javax.jdo.PersistenceManager and javax.persistence.EntityManager.
version:
   $Revision: 1.40 $

Inner Class :public interface ObjectManagerListener



Method Summary
 voidaddListener(Object listener, Class[] classes)
     Method to register a listener for instances of the specified classes.
 voidaddStateManager(StateManager sm)
     Method to add the object managed by the specified StateManager to the cache.
 voidassertClassPersistable(Class cls)
     Convenience method to assert if the passed class is not persistable.
 voidattachObject(Object pc, boolean sco)
     Method to attach the passed object (and related objects).
 ObjectattachObjectCopy(Object pc, boolean sco)
     Method to attach a copy of the passed object (and related objects).
 voidclearDirty(StateManager sm)
     Mark the specified StateManager as clean.
 voidclearDirty()
     Method to mark as clean all StateManagers of dirty objects.
 voidclose()
     Method to close the ObjectManager.
 voiddeleteObject(Object obj)
     Method to delete an object from the datastore.
 voiddeleteObjectInternal(Object pc)
     Method to delete the passed object (internally).
 voiddeleteObjects(Object[] objs)
     Method to delete an array of objects from the datastore.
 voiddeleteObjects(Collection objs)
     Method to delete a collection of objects from the datastore.
 voiddetachAll()
     Method to detach all objects in the PM.
 voiddetachObject(Object pc, FetchPlanState state)
     Method to detach the passed object.
 ObjectdetachObjectCopy(Object pc, FetchPlanState state)
     Method to detach a copy of the passed object using the provided state.
public  voiddisconnectLifecycleListener()
    
public  voiddisconnectSMCache()
    
 voidenlistInTransaction(StateManager sm)
     Method to enlist the specified StateManager in the current transaction.
 voidevictAllObjects()
    
 voidevictFromTransaction(StateManager sm)
     Method to evict the specified StateManager from the current transaction.
 voidevictObject(Object pc)
     Method to evict the passed object.
 voidevictObjects(Class cls, boolean subclasses)
     Method to evict all objects of the specified type (and optionaly its subclasses).
 booleanexists(Object obj)
     Method to return if the specified object exists in the datastore.
 ObjectfindObject(Object id, FieldValues fv)
     Accessor for an object given the object id.
 ObjectfindObject(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.
 ObjectfindObject(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.
 ObjectfindObjectUsingAID(Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance)
     Accessor for an object given the object id.
 StateManagerfindStateManager(Object pc)
     Method to find the StateManager for the passed persistable object when it is managed by this manager.
 voidflush()
     Method callable from external APIs for user-management of flushing.
 voidflushInternal(boolean flushToDatastore)
     Method to flushes all dirty, new, and deleted instances to the datastore. It has no effect if a transaction is not active.
 ApiAdaptergetApiAdapter()
     Accessor for the API adapter.
 CallbackHandlergetCallbackHandler()
    
 ClassLoaderResolvergetClassLoaderResolver()
     Accessor for the ClassLoader resolver to use in class loading issues.
public  booleangetCopyOnAttach()
     Accessor for whether the ObjectManager should copy on attaching.
public  booleangetDetachAllOnCommit()
    
 org.jpox.store.ExtentgetExtent(Class candidateClass, boolean includeSubclasses)
     Accessor for the Extent for a class (and optionally its subclasses).
 FetchPlangetFetchPlan()
    
 booleangetIgnoreCache()
     Accessor for whether to ignore the cache.
 SetgetManagedObjects()
     Accessor for the currently managed objects for the current transaction.
 SetgetManagedObjects(Class[] classes)
     Accessor for the currently managed objects for the current transaction.
 SetgetManagedObjects(String[] states)
     Accessor for the currently managed objects for the current transaction.
 SetgetManagedObjects(String[] states, Class[] classes)
     Accessor for the currently managed objects for the current transaction.
 MetaDataManagergetMetaDataManager()
     Accessor for the MetaData Manager.
public  booleangetMultithreaded()
    
 OMFContextgetOMFContext()
     Accessor for the context in which this ObjectManager is running.
public  ObjectgetObjectFromCache(Object id)
     Convenience method to access an object in the cache.
 ObjectgetOwner()
     Method to return the owner object.
 StateManagergetStateManagerById(Object myID)
     Accessor for the StateManager of an object given the object id.
Parameters:
  myID - Id of the object.
 StoreManagergetStoreManager()
     Accessor for the Store Manager.
 TransactiongetTransaction()
     Accessor for the current transaction for this ObjectManager.
public  booleanhasPersistenceInformationForClass(Class cls)
     Utility method to check if the specified class has reachable metadata or annotations.
 voidhereIsStateManager(StateManager sm, Object pc)
     Method to register the StateManager as being for the passed object.
 booleanisClosed()
     Accessor for whether this ObjectManager is closed.
 booleanisDelayDatastoreOperationsEnabled()
     Whether the datastore operations are delayed until commit.
 booleanisEnlistedInTransaction(Object id)
     Method to return if an object is enlisted in the current transaction.
 booleanisFlushing()
     Accessor for whether the ObjectManager is flushing changes to the datastore.
 booleanisInserted(Object pc, int fieldNumber)
     Convenience method to find if the specified field of the specified object has been inserted yet.
 booleanisInserted(Object pc, String className)
     Convenience method to find if the specified object is inserted down to the specified class level yet.
 booleanisInserting(Object pc)
     Tests whether this persistable object is being inserted.
 booleanisManagingRelations()
     Returns whether this ObjectManager is currently performing the manage relationships task.
 booleanisRunningDetachAllOnCommit()
     Accessor for whether this ObjectManager is currently running detachAllOnCommit.
 voidmakeObjectNontransactional(Object pc)
     Method to make the passed object nontransactional.
 voidmakeObjectTransactional(Object pc)
     Method to make the passed object transactional.
 voidmakeObjectTransient(Object pc, FetchPlanState state)
     Method to make transient the passed object.
 voidmarkDirty(StateManager sm, boolean directUpdate)
    
 voidmarkManagedRelationDirty(StateManager sm)
     Method to mark the specified StateManager as needing an update due to managed relation constraints.
 ObjectnewInstance(Class persistenceCapable)
     Method to generate an instance of an interface, abstract class, or concrete PC class.
 ObjectnewObjectId(Class pcClass, Object key)
     This method returns an object id instance corresponding to the pcClass and key arguments.
 org.jpox.store.query.QuerynewQuery()
     Accessor for a new Query.
 ObjectpersistObject(Object pc)
     Method to persist the passed object.
 ObjectpersistObjectInternal(Object pc, FieldValues preInsertChanges, StateManager ownerSM, int ownerFieldNum, int objectType)
     Method to persist the passed object (internally).
public  voidpostBegin()
     Method called during the begin process, after the actual begin.
 voidpostClose()
     Method called during the close process.
public  voidpostCommit()
     Method called during the commit process, after the actual datastore commit.
public  voidpreCommit()
     Method called during the commit process, before the actual datastore commit.
public  voidpreRollback()
     Method called during the rollback process, after the actual datastore rollback.
 voidputObjectIntoCache(StateManager sm, boolean level1, boolean level2)
     Method to put a Persistable object associated to the StateManager into the respective cache(s).
 voidrefreshAllObjects()
    
 voidrefreshObject(Object pc)
     Method to refresh the passed object.
 voidremoveListener(Object listener)
     Method to remove a currently registered listener.
 voidremoveObjectFromCache(Object pc, Object id, boolean level1, boolean level2)
     Method to remove an object from the respective cache(s).
 voidremoveStateManager(StateManager sm)
     Method to remove the object managed by the specified StateManager from the cache.
 voidreplaceObjectId(Object pc, Object oldID, Object newID)
    
 voidretrieveObject(Object pc, boolean fgOnly)
     Method to retrieve the passed object.
public  voidsetCopyOnAttach(boolean flag)
     Method whether to copy on attaching.
public  voidsetDetachAllOnCommit(boolean flag)
     Method to set DetachAllOnCommit.
 voidsetDetachOnClose(boolean flag)
     Method to set DetachOnClose.
public  voidsetIgnoreCache(boolean ignore)
     Method to set whether to ignore the L1 cache.
public  voidsetMultithreaded(boolean multi)
    



Method Detail
addListener
void addListener(Object listener, Class[] classes)(Code)
Method to register a listener for instances of the specified classes.
Parameters:
  listener - The listener to sends events to
Parameters:
  classes - The classes that it is interested in



addStateManager
void addStateManager(StateManager sm)(Code)
Method to add the object managed by the specified StateManager to the cache.
Parameters:
  sm - The StateManager



assertClassPersistable
void assertClassPersistable(Class cls)(Code)
Convenience method to assert if the passed class is not persistable.
Parameters:
  cls - The class of which we want to persist objects
throws:
  ClassNotPersistableException - When the class is not persistable
throws:
  NoPersistenceInformationException - When the class has no available persistence information



attachObject
void attachObject(Object pc, boolean sco)(Code)
Method to attach the passed object (and related objects). Throws an exception if another (persistent) object with the same id exists in the L1 cache already.
Parameters:
  pc - The (detached) object
Parameters:
  sco - Whether the object has no identity (embedded or serialised)



attachObjectCopy
Object attachObjectCopy(Object pc, boolean sco)(Code)
Method to attach a copy of the passed object (and related objects).
Parameters:
  pc - The object
Parameters:
  sco - Whether it has no identity (second-class object) The attached copy of the input object



clearDirty
void clearDirty(StateManager sm)(Code)
Mark the specified StateManager as clean.
Parameters:
  sm - The StateManager



clearDirty
void clearDirty()(Code)
Method to mark as clean all StateManagers of dirty objects.



close
void close()(Code)
Method to close the ObjectManager.



deleteObject
void deleteObject(Object obj)(Code)
Method to delete an object from the datastore.
Parameters:
  obj - The object



deleteObjectInternal
void deleteObjectInternal(Object pc)(Code)
Method to delete the passed object (internally).
Parameters:
  pc - The object



deleteObjects
void deleteObjects(Object[] objs)(Code)
Method to delete an array of objects from the datastore.
Parameters:
  objs - The objects to delete



deleteObjects
void deleteObjects(Collection objs)(Code)
Method to delete a collection of objects from the datastore.
Parameters:
  objs - The objects to delete



detachAll
void detachAll()(Code)
Method to detach all objects in the PM.



detachObject
void detachObject(Object pc, FetchPlanState state)(Code)
Method to detach the passed object.
Parameters:
  pc - The object to detach
Parameters:
  state - State for the detachment process.



detachObjectCopy
Object detachObjectCopy(Object pc, FetchPlanState state)(Code)
Method to detach a copy of the passed object using the provided state.
Parameters:
  pc - The object
Parameters:
  state - State for the detachment process The detached copy of the object



disconnectLifecycleListener
public void disconnectLifecycleListener()(Code)
Disconnect the registered LifecycleListener



disconnectSMCache
public void disconnectSMCache()(Code)
Disconnect SM instances, clear cache and reset settings



enlistInTransaction
void enlistInTransaction(StateManager sm)(Code)
Method to enlist the specified StateManager in the current transaction.
Parameters:
  sm - The StateManager



evictAllObjects
void evictAllObjects()(Code)
Method to evict all L1 cache objects



evictFromTransaction
void evictFromTransaction(StateManager sm)(Code)
Method to evict the specified StateManager from the current transaction.
Parameters:
  sm - The StateManager



evictObject
void evictObject(Object pc)(Code)
Method to evict the passed object.
Parameters:
  pc - The object



evictObjects
void evictObjects(Class cls, boolean subclasses)(Code)
Method to evict all objects of the specified type (and optionaly its subclasses).
Parameters:
  cls - Type of persistable object
Parameters:
  subclasses - Whether to include subclasses



exists
boolean exists(Object obj)(Code)
Method to return if the specified object exists in the datastore.
Parameters:
  obj - The (persistable) object Whether it exists



findObject
Object findObject(Object id, FieldValues fv)(Code)
Accessor for an object given the object id.
Parameters:
  id - Id of the object.
Parameters:
  fv - the FieldValues the Object



findObject
Object findObject(Object id, boolean validate, boolean checkInheritance, String objectClassName)(Code)
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. This parameter is a hint. Set false, if it'salready determined the correct pcClass for this pc "object" in a certainlevel in the hierarchy. Set to true and it will look to the database.
Parameters:
  objectClassName - Class name for the object with this id (if known, optional) The Object



findObject
Object findObject(Object id, FieldValues fv, Class pcClass, boolean ignoreCache)(Code)
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. This type will be used to instanciat the object
Parameters:
  ignoreCache - true if the cache is ignored the Object



findObjectUsingAID
Object findObjectUsingAID(Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance)(Code)
Accessor for an object given the object id. The object uses application identity
Parameters:
  fv - the FieldValues containing at minimum the primary key fields
Parameters:
  pcClass - the type which the object is
Parameters:
  ignoreCache - true if the cache is ignored
Parameters:
  checkInheritance - true if the cache is ignored the Object



findStateManager
StateManager findStateManager(Object pc)(Code)
Method to find the StateManager for the passed persistable object when it is managed by this manager.
Parameters:
  pc - The persistable object The StateManager



flush
void flush()(Code)
Method callable from external APIs for user-management of flushing. Called by JDO PM.flush, or JPA EM.flush(). Performs management of relations, prior to performing internal flush of all dirty/new/deleted instances to the datastore.



flushInternal
void flushInternal(boolean flushToDatastore)(Code)
Method to flushes all dirty, new, and deleted instances to the datastore. It has no effect if a transaction is not active. If a datastore transaction is active, this method synchronizes the cache with the datastore and reports any exceptions. If an optimistic transaction is active, this method obtains a datastore connection and synchronizes the cache with the datastore using this connection. The connection obtained by this method is held until the end of the transaction.
Parameters:
  flushToDatastore - Whether to ensure any changes reach the datastoreOtherwise they will be flushed to the datastore manager and leave it todecide the opportune moment to actually flush them to teh datastore
throws:
  JPOXOptimisticException - when optimistic locking error(s) occur



getApiAdapter
ApiAdapter getApiAdapter()(Code)
Accessor for the API adapter. API adapter.



getCallbackHandler
CallbackHandler getCallbackHandler()(Code)
Retrieve the callback handler for this PM the callback handler



getClassLoaderResolver
ClassLoaderResolver getClassLoaderResolver()(Code)
Accessor for the ClassLoader resolver to use in class loading issues. The ClassLoader resolver



getCopyOnAttach
public boolean getCopyOnAttach()(Code)
Accessor for whether the ObjectManager should copy on attaching. Whether we copy on attaching



getDetachAllOnCommit
public boolean getDetachAllOnCommit()(Code)
Accessor for whether the ObjectManager will detach all objects on commit Whether we detach all on commit



getExtent
org.jpox.store.Extent getExtent(Class candidateClass, boolean includeSubclasses)(Code)
Accessor for the Extent for a class (and optionally its subclasses).
Parameters:
  candidateClass - The class
Parameters:
  includeSubclasses - Whether to include subclasses The Extent



getFetchPlan
FetchPlan getFetchPlan()(Code)
Acessor for the current FetchPlan FetchPlan



getIgnoreCache
boolean getIgnoreCache()(Code)
Accessor for whether to ignore the cache. Whether to ignore the cache.



getManagedObjects
Set getManagedObjects()(Code)
Accessor for the currently managed objects for the current transaction. If the transaction is not active this returns null. Collection of managed objects enlisted in the current transaction



getManagedObjects
Set getManagedObjects(Class[] classes)(Code)
Accessor for the currently managed objects for the current transaction. If the transaction is not active this returns null.
Parameters:
  classes - Classes that we want the objects for Collection of managed objects enlisted in the current transaction



getManagedObjects
Set getManagedObjects(String[] states)(Code)
Accessor for the currently managed objects for the current transaction. If the transaction is not active this returns null.
Parameters:
  states - States that we want the objects for Collection of managed objects enlisted in the current transaction



getManagedObjects
Set getManagedObjects(String[] states, Class[] classes)(Code)
Accessor for the currently managed objects for the current transaction. If the transaction is not active this returns null.
Parameters:
  states - States that we want the objects for
Parameters:
  classes - Classes that we want the objects for Collection of managed objects enlisted in the current transaction



getMetaDataManager
MetaDataManager getMetaDataManager()(Code)
Accessor for the MetaData Manager. The MetaData Manager



getMultithreaded
public boolean getMultithreaded()(Code)
Accessor for whether the ObjectManager is multithreaded Whether the ObjectManager is multithreaded



getOMFContext
OMFContext getOMFContext()(Code)
Accessor for the context in which this ObjectManager is running. Returns the context.



getObjectFromCache
public Object getObjectFromCache(Object id)(Code)
Convenience method to access an object in the cache. Firstly looks in the L1 cache for this PM, and if not found looks in the L2 cache.
Parameters:
  id - Id of the object Persistable object (with connected StateManager).



getOwner
Object getOwner()(Code)
Method to return the owner object. For JDO this will return the PersistenceManager owning this ObjectManager. For JPA this will return the EntityManager owning this ObjectManager. The owner manager object



getStateManagerById
StateManager getStateManagerById(Object myID)(Code)
Accessor for the StateManager of an object given the object id.
Parameters:
  myID - Id of the object. The StateManager



getStoreManager
StoreManager getStoreManager()(Code)
Accessor for the Store Manager. Store Manager



getTransaction
Transaction getTransaction()(Code)
Accessor for the current transaction for this ObjectManager. The current transaction



hasPersistenceInformationForClass
public boolean hasPersistenceInformationForClass(Class cls)(Code)
Utility method to check if the specified class has reachable metadata or annotations.
Parameters:
  cls - The class to check Whether the class has reachable metadata or annotations



hereIsStateManager
void hereIsStateManager(StateManager sm, Object pc)(Code)
Method to register the StateManager as being for the passed object. Used during the process of identifying StateManager for persistable object.
Parameters:
  sm - The StateManager
Parameters:
  pc - The object managed by the StateManager



isClosed
boolean isClosed()(Code)
Accessor for whether this ObjectManager is closed. Whether this manager is closed.



isDelayDatastoreOperationsEnabled
boolean isDelayDatastoreOperationsEnabled()(Code)
Whether the datastore operations are delayed until commit. In optimistic transactions this is automatically enabled. true if datastore operations are delayed until commit



isEnlistedInTransaction
boolean isEnlistedInTransaction(Object id)(Code)
Method to return if an object is enlisted in the current transaction.
Parameters:
  id - Identity for the object Whether it is enlisted in the current transaction



isFlushing
boolean isFlushing()(Code)
Accessor for whether the ObjectManager is flushing changes to the datastore. Whether it is currently flushing



isInserted
boolean isInserted(Object pc, int fieldNumber)(Code)
Convenience method to find if the specified field of the specified object has been inserted yet.
Parameters:
  pc - The object
Parameters:
  fieldNumber - The absolute field number Whether it has been inserted into the datastore



isInserted
boolean isInserted(Object pc, String className)(Code)
Convenience method to find if the specified object is inserted down to the specified class level yet.
Parameters:
  pc - The object
Parameters:
  className - Name of the class that we want to check the insertion level to Whether it has been inserted into the datastore



isInserting
boolean isInserting(Object pc)(Code)
Tests whether this persistable object is being inserted.
Parameters:
  pc - the object to verify the status true if this instance is inserting.



isManagingRelations
boolean isManagingRelations()(Code)
Returns whether this ObjectManager is currently performing the manage relationships task. Whether in the process of managing relations



isRunningDetachAllOnCommit
boolean isRunningDetachAllOnCommit()(Code)
Accessor for whether this ObjectManager is currently running detachAllOnCommit. Whether running detachAllOnCommit



makeObjectNontransactional
void makeObjectNontransactional(Object pc)(Code)
Method to make the passed object nontransactional.
Parameters:
  pc - The object



makeObjectTransactional
void makeObjectTransactional(Object pc)(Code)
Method to make the passed object transactional.
Parameters:
  pc - The object



makeObjectTransient
void makeObjectTransient(Object pc, FetchPlanState state)(Code)
Method to make transient the passed object.
Parameters:
  pc - The object
Parameters:
  state - Object containing the state of the fetchplan processing



markDirty
void markDirty(StateManager sm, boolean directUpdate)(Code)
Mark the specified StateManager as dirty
Parameters:
  sm - The StateManager
Parameters:
  directUpdate - Whether the object has had a direct update made on it (if known)



markManagedRelationDirty
void markManagedRelationDirty(StateManager sm)(Code)
Method to mark the specified StateManager as needing an update due to managed relation constraints.
Parameters:
  sm - The StateManager



newInstance
Object newInstance(Class persistenceCapable)(Code)
Method to generate an instance of an interface, abstract class, or concrete PC class.
Parameters:
  persistenceCapable - The class of the interface or abstract class, or concrete class defined in MetaData The instance of this type



newObjectId
Object newObjectId(Class pcClass, Object key)(Code)
This method returns an object id instance corresponding to the pcClass and key arguments. Operates in 2 modes :-
  • The class uses SingleFieldIdentity and the key is the value of the key field
  • In all other cases the key is the String form of the object id instance

Parameters:
  pcClass - Class of the PersistenceCapable to create the identity for
Parameters:
  key - Value of the key for SingleFieldIdentity (or the toString value) The new object-id instance



newQuery
org.jpox.store.query.Query newQuery()(Code)
Accessor for a new Query. The new Query



persistObject
Object persistObject(Object pc)(Code)
Method to persist the passed object.
Parameters:
  pc - The object The persisted object



persistObjectInternal
Object persistObjectInternal(Object pc, FieldValues preInsertChanges, StateManager ownerSM, int ownerFieldNum, int objectType)(Code)
Method to persist the passed object (internally).
Parameters:
  pc - The object
Parameters:
  preInsertChanges - Changes to be made before inserting
Parameters:
  ownerSM - StateManager of the owner when embedded
Parameters:
  ownerFieldNum - Field number in the owner where this is embedded (or -1 if not embedded)
Parameters:
  objectType - Type of object (see org.jpox.StateManager, e.g StateManager.PC) The persisted object



postBegin
public void postBegin()(Code)
Method called during the begin process, after the actual begin.



postClose
void postClose()(Code)
Method called during the close process.



postCommit
public void postCommit()(Code)
Method called during the commit process, after the actual datastore commit.



preCommit
public void preCommit()(Code)
Method called during the commit process, before the actual datastore commit.



preRollback
public void preRollback()(Code)
Method called during the rollback process, after the actual datastore rollback.



putObjectIntoCache
void putObjectIntoCache(StateManager sm, boolean level1, boolean level2)(Code)
Method to put a Persistable object associated to the StateManager into the respective cache(s).
Parameters:
  sm - The State Manager
Parameters:
  level1 - Whether to put in the L1 cache
Parameters:
  level2 - Whether to put in the L2 cache



refreshAllObjects
void refreshAllObjects()(Code)
Method to refresh all L1 cache objects



refreshObject
void refreshObject(Object pc)(Code)
Method to refresh the passed object.
Parameters:
  pc - The object



removeListener
void removeListener(Object listener)(Code)
Method to remove a currently registered listener.
Parameters:
  listener - The instance lifecycle listener to remove.



removeObjectFromCache
void removeObjectFromCache(Object pc, Object id, boolean level1, boolean level2)(Code)
Method to remove an object from the respective cache(s).
Parameters:
  pc - The object
Parameters:
  id - The id of the object
Parameters:
  level1 - Whether to remove from the L1 cache
Parameters:
  level2 - Whether to remove from the L2 cache



removeStateManager
void removeStateManager(StateManager sm)(Code)
Method to remove the object managed by the specified StateManager from the cache.
Parameters:
  sm - The StateManager



replaceObjectId
void replaceObjectId(Object pc, Object oldID, Object newID)(Code)
Replace the previous object id for a PC object to a new
Parameters:
  pc - The Persistable object
Parameters:
  oldID - the old id
Parameters:
  newID - the new id



retrieveObject
void retrieveObject(Object pc, boolean fgOnly)(Code)
Method to retrieve the passed object.
Parameters:
  pc - The object
Parameters:
  fgOnly - Just retrieve the current fetch group



setCopyOnAttach
public void setCopyOnAttach(boolean flag)(Code)
Method whether to copy on attaching.
Parameters:
  flag - Whether to copy on attaching.



setDetachAllOnCommit
public void setDetachAllOnCommit(boolean flag)(Code)
Method to set DetachAllOnCommit.
Parameters:
  flag - Whether to detach all objects on commit of the transaction.



setDetachOnClose
void setDetachOnClose(boolean flag)(Code)
Method to set DetachOnClose.
Parameters:
  flag - Whether to detach all objects on close of the ObjectManager.



setIgnoreCache
public void setIgnoreCache(boolean ignore)(Code)
Method to set whether to ignore the L1 cache.
Parameters:
  ignore - Whether to ignore the L1 cache



setMultithreaded
public void setMultithreaded(boolean multi)(Code)
Method to set whether the ObjectManager should operate multithreaded
Parameters:
  multi - Whether to operate multithreaded



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.