Java Doc for AbstractPersistenceManager.java in  » Database-ORM » JPOX » org » jpox » jdo » 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.jdo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.jdo.AbstractPersistenceManager

All known Subclasses:   org.jpox.jdo.JDOPersistenceManager,
AbstractPersistenceManager
abstract public class AbstractPersistenceManager implements javax.jdo.PersistenceManager(Code)
Provide the basics of a JDO PersistenceManager using an underlying ObjectManager to perform the actual persistence.
version:
   $Revision: 1.4 $


Field Summary
final protected static  LocaliserLOCALISER
    
protected  AbstractPersistenceManagerFactoryapmf
     Owning PersistenceManagerFactory.
protected  JDOFetchPlanfetchPlan
     JDO Fetch Plan.
protected  javax.jdo.Transactionjdotx
    
protected  ObjectManagerobjectMgr
     Backing ObjectManager for this PersistenceManager.

Constructor Summary
public  AbstractPersistenceManager(AbstractPersistenceManagerFactory apmf, String userName, String password)
     Constructor.

Method Summary
public  voidaddInstanceLifecycleListener(InstanceLifecycleListener listener, Class[] classes)
     Method to register a lifecycle listener as per JDO 2.0 spec 12.15.
protected  voidassertActiveTransaction()
     Method to assert if the current transaction is active.
protected  voidassertIsOpen()
     Method to assert if this Persistence Manager is open.
protected  voidassertReadable(String operation)
     Method to assert if no active transaction and nontransactionalRead is not set.
protected  voidassertWritable()
     Method to assert if the current transaction is active or non transactional writes are allowed.
public  voidcheckConsistency()
     This method validates the cache with the datastore.
public synchronized  voidclose()
     Method to close the Persistence Manager.
public  javax.jdo.TransactioncurrentTransaction()
     Accessor for the current transaction.
public synchronized  voiddeletePersistent(Object obj)
     JDO method to delete an object from the datastore.
public synchronized  voiddeletePersistentAll(Object[] pcs)
     JDO method to delete an array of objects from the datastore.
public synchronized  voiddeletePersistentAll(Collection pcs)
     JDO method to delete a collection of objects from the datastore.
public synchronized  ObjectdetachCopy(Object pc)
     JDO method to detach a persistent object.
public synchronized  Object[]detachCopyAll(Object[] pcs)
     Detach the specified objects from the PersistenceManager.
public synchronized  CollectiondetachCopyAll(Collection pcs)
     Detach the specified objects from the PersistenceManager.
public synchronized  voidevict(Object obj)
     Method to evict an object from L1 cache.
public synchronized  voidevictAll(Class cls, boolean subclasses)
     Method to evict all objects of the specified type (and optionaly its subclasses).
public synchronized  voidevictAll(boolean subclasses, Class cls)
     Method to evict all objects of the specified type (and optionaly its subclasses).
public synchronized  voidevictAll(Object[] pcs)
     Method to evict an array of objects from L1 cache.
public synchronized  voidevictAll(Collection pcs)
     Method to evict a collection of objects from L1 cache.
public synchronized  voidevictAll()
     Method to evict all current objects from L1 cache.
public synchronized  voidflush()
     This method flushes all dirty, new, and deleted instances to the datastore.
public  AbstractPersistenceManagerFactorygetAbstractPersistenceManagerFactory()
     Accessor for the PersistenceManager Factory.
public  booleangetCopyOnAttach()
     Accessor for whether to copy objects on attaching.
public  JDOConnectiongetDataStoreConnection()
     Accessor for a connection on the datastore.
public  booleangetDetachAllOnCommit()
     Accessor for whether to detach all objects on commit of the transaction.
public synchronized  ExtentgetExtent(Class pcClass, boolean subclasses)
     Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections.
public synchronized  ExtentgetExtent(Class pcClass)
     Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections.
public  FetchPlangetFetchPlan()
    
public  booleangetIgnoreCache()
     Accessor for whether to ignore the cache.
public  SetgetManagedObjects()
     Accessor for the objects currently managed by this PM in the current transaction.
public  SetgetManagedObjects(Class[] classes)
     Accessor for the objects currently managed by this PM in the current transaction.
public  SetgetManagedObjects(EnumSet states)
     Accessor for the objects currently managed by this PM in the current transaction.
public  SetgetManagedObjects(EnumSet states, Class[] classes)
     Accessor for the objects currently managed by this PM in the current transaction.
public  booleangetMultithreaded()
     Accessor for whether the Persistence Manager is multithreaded.
public synchronized  ObjectgetObjectById(Object id)
     Accessor for an object given the object id.
Parameters:
  id - Id of the object.
public synchronized  ObjectgetObjectById(Object id, boolean validate)
     Accessor for an object given the object id.
public  ObjectgetObjectById(Class cls, Object key)
     Convenience method that exactly matches the behavior of calling pm.getObjectById (pm.newObjectIdInstance (cls, key), true).
public  ObjectgetObjectId(Object pc)
     Accessor for an object id given the object.
public  ClassgetObjectIdClass(Class cls)
     Accessor for the class of the object id given the class of object.
public  ObjectManagergetObjectManager()
     Convenience accessor for the ObjectManager performing the actual persistence.
public  CollectiongetObjectsById(Collection oids, boolean validate)
     Accessor for the objects given the object ids.
public  Object[]getObjectsById(boolean validate, Object[] oids)
     Accessor for the objects given the object ids.
Parameters:
  validate - Whether to validate the object state
Parameters:
  oids - Ids of the objects.
public  Object[]getObjectsById(Object[] oids, boolean validate)
     Accessor for the objects given the object ids.
public  CollectiongetObjectsById(Collection oids)
     Accessor for the objects given the object ids, validating the objects.
Parameters:
  oids - Ids of the objects.
public  Object[]getObjectsById(Object[] oids)
     Accessor for the objects given the object ids, validating the objects.
Parameters:
  oids - Ids of the objects.
public  PersistenceManagerFactorygetPersistenceManagerFactory()
     Accessor for the PersistenceManager Factory.
public  SequencegetSequence(String sequenceName)
     Method to retrieve a sequence by name.
public  DategetServerDate()
     Accessor for the date on the datastore.
public  ObjectgetTransactionalObjectId(Object pc)
     Accessor for the object id of a transactional object given the object.
public synchronized  ObjectgetUserObject(Object key)
     Method to get a user object from the PersistenceManager.
public synchronized  ObjectgetUserObject()
     The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes.
protected  booleanhasPersistenceInformationForClass(Class cls)
     Utility method to check if the specified class has reachable metadata/annotations.
public  booleanisClosed()
     Accessor for whether this ObjectManager is closed.
public synchronized  voidmakeNontransactional(Object pc)
     Method to make nontransactional an object.
public synchronized  voidmakeNontransactionalAll(Object[] pcs)
     Method to make nontransactional an array of objects.
public synchronized  voidmakeNontransactionalAll(Collection pcs)
     Method to make nontransactional a collection of objects.
public synchronized  ObjectmakePersistent(Object obj)
     JDO method to persist an object.
public synchronized  Object[]makePersistentAll(Object[] pcs)
     JDO method to make persistent an array of objects.
public synchronized  CollectionmakePersistentAll(Collection pcs)
     JDO method to make persistent a collection of objects.
public synchronized  voidmakeTransactional(Object pc)
     Method to make transactional an object.
public synchronized  voidmakeTransactionalAll(Object[] pcs)
     Method to make transactional an array of objects.
public synchronized  voidmakeTransactionalAll(Collection pcs)
     Method to make transactional a collection of objects.
public synchronized  voidmakeTransient(Object pc, boolean useFetchPlan)
     Method to make transient an object allowing fetching using the fetch plan.
public synchronized  voidmakeTransient(Object pc)
     Method to make transient an object.
public synchronized  voidmakeTransientAll(Object[] pcs)
     Method to make transient an array of objects.
public synchronized  voidmakeTransientAll(Object[] pcs, boolean includeFetchPlan)
     Method to make transient an array of objects.
public synchronized  voidmakeTransientAll(boolean includeFetchPlan, Object[] pcs)
     Method to make transient an array of objects.
public synchronized  voidmakeTransientAll(Collection pcs, boolean useFetchPlan)
     Method to make transient a collection of objects.
public synchronized  voidmakeTransientAll(Collection pcs)
     Method to make transient a collection of objects.
public  ObjectnewInstance(Class persistenceCapable)
     Method to generate an instance of an interface, abstract class, or concrete PC class.
public synchronized  QuerynewNamedQuery(Class cls, String queryName)
     Construct a query instance with the candidate class and the query name.
Parameters:
  cls - The class to query
Parameters:
  queryName - Name of the query.
public  ObjectnewObjectIdInstance(Class pcClass, Object key)
     This method returns an object id instance corresponding to the pcClass and key arguments. It has 2 modes of operation.
public synchronized  QuerynewQuery()
     Construct an empty query instance.
public synchronized  QuerynewQuery(Object obj)
     Construct a query instance from another query.
public synchronized  QuerynewQuery(String query)
     Construct a query instance using the specified Single-String query.
public synchronized  QuerynewQuery(String language, Object query)
     Construct a query instance using the specified language and the specified query.
public synchronized  QuerynewQuery(Class cls)
     Construct a query instance with the candidate class specified.
public synchronized  QuerynewQuery(Extent cln)
     Construct a query instance with the candidate Extent specified; the candidate class is taken from the Extent.
public synchronized  QuerynewQuery(Class cls, Collection cln)
     Construct a query instance with the candidate class and candidate Collection specified.
public synchronized  QuerynewQuery(Class cls, String filter)
     Construct a query instance with the candidate class and filter specified.
public synchronized  QuerynewQuery(Class cls, Collection cln, String filter)
     Construct a query instance with the candidate class, the candidate Collection, and filter specified.
public synchronized  QuerynewQuery(Extent cln, String filter)
     Construct a query instance with the candidate Extent and filter specified.
public synchronized  ObjectputUserObject(Object key, Object value)
     Method to put a user object into the PersistenceManager.
public synchronized  voidrefresh(Object obj)
     Method to do a refresh of an object.
public synchronized  voidrefreshAll(Object[] pcs)
     Method to do a refresh of an array of objects.
public synchronized  voidrefreshAll(Collection pcs)
     Method to do a refresh of a collection of objects.
public synchronized  voidrefreshAll()
     Method to do a refresh of all objects.
public synchronized  voidrefreshAll(JDOException exc)
     Method to do a refresh of objects that failed verification in the exception.
public  voidremoveInstanceLifecycleListener(InstanceLifecycleListener listener)
     Method to remove a currently registered lifecycle listener, as per JDO 2.0 spec 12.15.
public synchronized  ObjectremoveUserObject(Object key)
     Method to remove a user object from the PersistenceManager.
public synchronized  voidretrieve(Object pc, boolean fgOnly)
     Method to retrieve the fields of an object.
public synchronized  voidretrieve(Object pc)
     Method to retrieve the fields of an object.
public synchronized  voidretrieveAll(Object[] pcs)
     Method to retrieve an array of objects.
public  voidretrieveAll(Object[] pcs, boolean fgOnly)
     Retrieve field values of instances from the store.
public  voidretrieveAll(boolean fgOnly, Object[] pcs)
     Retrieve field values of instances from the store.
public  voidretrieveAll(Collection pcs, boolean fgOnly)
     Retrieve field values of instances from the store.
public synchronized  voidretrieveAll(Collection pcs)
     Method to retrieve a collection of objects.
public  voidsetCopyOnAttach(boolean flag)
     Mutator for whether to copy objects on attach.
public  voidsetDetachAllOnCommit(boolean flag)
     Mutator for whether to detach all objects on commit of the transaction.
public  voidsetIgnoreCache(boolean flag)
     Mutator for whether to ignore the cache.
public  voidsetMultithreaded(boolean flag)
     Mutator for whether the Persistence Manager is multithreaded.
protected  voidsetTransaction(org.jpox.Transaction tx)
     Method to allow setting of the transaction by a superclass.
public synchronized  voidsetUserObject(Object userObject)
     The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes.

Field Detail
LOCALISER
final protected static Localiser LOCALISER(Code)
Localisation utility for output messages



apmf
protected AbstractPersistenceManagerFactory apmf(Code)
Owning PersistenceManagerFactory.



fetchPlan
protected JDOFetchPlan fetchPlan(Code)
JDO Fetch Plan.



jdotx
protected javax.jdo.Transaction jdotx(Code)



objectMgr
protected ObjectManager objectMgr(Code)
Backing ObjectManager for this PersistenceManager.




Constructor Detail
AbstractPersistenceManager
public AbstractPersistenceManager(AbstractPersistenceManagerFactory apmf, String userName, String password)(Code)
Constructor.
Parameters:
  apmf - Persistence Manager Factory
Parameters:
  userName - Username for the datastore
Parameters:
  password - Password for the datastore




Method Detail
addInstanceLifecycleListener
public void addInstanceLifecycleListener(InstanceLifecycleListener listener, Class[] classes)(Code)
Method to register a lifecycle listener as per JDO 2.0 spec 12.15.
Parameters:
  listener - The instance lifecycle listener to sends events to
Parameters:
  classes - The classes that it is interested in
since:
   1.1



assertActiveTransaction
protected void assertActiveTransaction()(Code)
Method to assert if the current transaction is active. Throws a TransactionNotActiveException if not active.



assertIsOpen
protected void assertIsOpen()(Code)
Method to assert if this Persistence Manager is open.
throws:
  JDOFatalUserException - if the PM is closed.



assertReadable
protected void assertReadable(String operation)(Code)
Method to assert if no active transaction and nontransactionalRead is not set.
throws:
  JDOUserException - if the tx is not active and no non-transactional read is available



assertWritable
protected void assertWritable()(Code)
Method to assert if the current transaction is active or non transactional writes are allowed.
throws:
  a - TransactionNotActiveException if not active and non transactional writes are disabled



checkConsistency
public void checkConsistency()(Code)
This method validates the cache with the datastore. It has no effect if a transaction is not active. If a datastore transaction is active, this method verifies the consistency of instances in the cache against the datastore. An implementation might flush instances as if flush() were called, but it is not required to do so. If an optimistic transaction is active, this method obtains a datastore connection and verifies the consistency of the instances in the cache against the datastore. If any inconsistencies are detected, a JDOOptimisticVerificationException is thrown. This exception contains a nested JDOOptimisticVerificationException for each object that failed the consistency check. No datastore resources acquired during the execution of this method are held beyond the scope of this method.



close
public synchronized void close()(Code)
Method to close the Persistence Manager.



currentTransaction
public javax.jdo.Transaction currentTransaction()(Code)
Accessor for the current transaction. The transaction



deletePersistent
public synchronized void deletePersistent(Object obj)(Code)
JDO method to delete an object from the datastore.
Parameters:
  obj - The object



deletePersistentAll
public synchronized void deletePersistentAll(Object[] pcs)(Code)
JDO method to delete an array of objects from the datastore.
Parameters:
  pcs - The objects



deletePersistentAll
public synchronized void deletePersistentAll(Collection pcs)(Code)
JDO method to delete a collection of objects from the datastore. Throws a JDOUserException if objects could not be deleted.
Parameters:
  pcs - The objects



detachCopy
public synchronized Object detachCopy(Object pc)(Code)
JDO method to detach a persistent object. If the object is of class that is not detachable a transient copy will be returned. If the object is not persistent it will be persisted first before detaching a copy.
Parameters:
  pc - The object The detached object



detachCopyAll
public synchronized Object[] detachCopyAll(Object[] pcs)(Code)
Detach the specified objects from the PersistenceManager. The objects returned can be manipulated and re-attached with AbstractPersistenceManager.makePersistentAll(Object[]) . The detached instances will be unmanaged copies of the specified parameters, and are suitable for serialization and manipulation outside of a JDO environment. When detaching instances, only fields in the current FetchPlan will be traversed. Thus, to detach a graph of objects, relations to other persistent instances must either be in the default-fetch-group, or in the current custom FetchPlan .
Parameters:
  pcs - the instances to detach the detached instances



detachCopyAll
public synchronized Collection detachCopyAll(Collection pcs)(Code)
Detach the specified objects from the PersistenceManager.
Parameters:
  pcs - the instances to detach the detached instances
See Also:   AbstractPersistenceManager.detachCopyAll(Object[])
since:
   JDO 2.0



evict
public synchronized void evict(Object obj)(Code)
Method to evict an object from L1 cache.
Parameters:
  obj - The object
throws:
  JDOUserException - thrown if some instances could not be evicted



evictAll
public synchronized void evictAll(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



evictAll
public synchronized void evictAll(boolean subclasses, Class cls)(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



evictAll
public synchronized void evictAll(Object[] pcs)(Code)
Method to evict an array of objects from L1 cache.
Parameters:
  pcs - The objects



evictAll
public synchronized void evictAll(Collection pcs)(Code)
Method to evict a collection of objects from L1 cache.
Parameters:
  pcs - The objects
throws:
  JDOUserException - thrown if some instances could not be evicted



evictAll
public synchronized void evictAll()(Code)
Method to evict all current objects from L1 cache.



flush
public synchronized void flush()(Code)
This method 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.



getAbstractPersistenceManagerFactory
public AbstractPersistenceManagerFactory getAbstractPersistenceManagerFactory()(Code)
Accessor for the PersistenceManager Factory. The PersistenceManagerFactory



getCopyOnAttach
public boolean getCopyOnAttach()(Code)
Accessor for whether to copy objects on attaching. Whether to copy objects on attaching.



getDataStoreConnection
public JDOConnection getDataStoreConnection()(Code)
Accessor for a connection on the datastore. See JDO 2.0 spec section 12.16 The JDO connection to the datastore
See Also:   javax.jdo.PersistenceManager.getDataStoreConnection
since:
   1.1



getDetachAllOnCommit
public boolean getDetachAllOnCommit()(Code)
Accessor for whether to detach all objects on commit of the transaction. Whether to detach all on commit.



getExtent
public synchronized Extent getExtent(Class pcClass, boolean subclasses)(Code)
Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections. Extent capability is a boolean property of classes that are persistence capable. If an instance of a class that has a managed extent is made persistent via reachability, the instance is put into the extent implicitly.
Parameters:
  pcClass - The class to query
Parameters:
  subclasses - Whether to include subclasses in the query. returns an Extent that contains all of the instances in theparameter class, and if the subclasses flag is true, all of the instancesof the parameter class and its subclasses.



getExtent
public synchronized Extent getExtent(Class pcClass)(Code)
Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections. Extent capability is a boolean property of classes that are persistence capable. If an instance of a class that has a managed extent is made persistent via reachability, the instance is put into the extent implicitly.
Parameters:
  pcClass - The class to query returns an Extent that contains all of the instances in theparameter class, and all of the instances of the parameter class and itssubclasses.
since:
   1.1



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



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



getManagedObjects
public Set getManagedObjects()(Code)
Accessor for the objects currently managed by this PM in the current transaction. The managed objects



getManagedObjects
public Set getManagedObjects(Class[] classes)(Code)
Accessor for the objects currently managed by this PM in the current transaction.
Parameters:
  classes - Classes that we want objects for The managed objects



getManagedObjects
public Set getManagedObjects(EnumSet states)(Code)
Accessor for the objects currently managed by this PM in the current transaction.
Parameters:
  states - States that we want objects for The managed objects



getManagedObjects
public Set getManagedObjects(EnumSet states, Class[] classes)(Code)
Accessor for the objects currently managed by this PM in the current transaction.
Parameters:
  states - States that we want objects for
Parameters:
  classes - Classes that we want objects for The managed objects



getMultithreaded
public boolean getMultithreaded()(Code)
Accessor for whether the Persistence Manager is multithreaded. Whether to run multithreaded.



getObjectById
public synchronized Object getObjectById(Object id)(Code)
Accessor for an object given the object id.
Parameters:
  id - Id of the object. The Object
since:
   1.1



getObjectById
public synchronized Object getObjectById(Object id, boolean validate)(Code)
Accessor for an object given the object id.
Parameters:
  id - Id of the object.
Parameters:
  validate - Whether to validate the object state The Object



getObjectById
public Object getObjectById(Class cls, Object key)(Code)
Convenience method that exactly matches the behavior of calling pm.getObjectById (pm.newObjectIdInstance (cls, key), true).
Parameters:
  cls - Class of the PersistenceCapable
Parameters:
  key - Value of the key field for SingleFieldIdentity, or the string value of the key otherwise The object for this id.
since:
   1.1



getObjectId
public Object getObjectId(Object pc)(Code)
Accessor for an object id given the object.
Parameters:
  pc - The object The Object id



getObjectIdClass
public Class getObjectIdClass(Class cls)(Code)
Accessor for the class of the object id given the class of object.
Parameters:
  cls - The class name of the object The class name of the object id



getObjectManager
public ObjectManager getObjectManager()(Code)
Convenience accessor for the ObjectManager performing the actual persistence. The ObjectManager



getObjectsById
public Collection getObjectsById(Collection oids, boolean validate)(Code)
Accessor for the objects given the object ids.
Parameters:
  oids - Ids of the objects.
Parameters:
  validate - Whether to validate the object state The Objects with these ids (in the same order)
since:
   1.1



getObjectsById
public Object[] getObjectsById(boolean validate, Object[] oids)(Code)
Accessor for the objects given the object ids.
Parameters:
  validate - Whether to validate the object state
Parameters:
  oids - Ids of the objects. The Objects with these ids (in the same order)
since:
   1.2



getObjectsById
public Object[] getObjectsById(Object[] oids, boolean validate)(Code)
Accessor for the objects given the object ids.
Parameters:
  oids - Ids of the objects.
Parameters:
  validate - Whether to validate the object state The Objects with these ids (in the same order)
since:
   1.1



getObjectsById
public Collection getObjectsById(Collection oids)(Code)
Accessor for the objects given the object ids, validating the objects.
Parameters:
  oids - Ids of the objects. The Objects with these ids (in the same order)
since:
   1.1



getObjectsById
public Object[] getObjectsById(Object[] oids)(Code)
Accessor for the objects given the object ids, validating the objects.
Parameters:
  oids - Ids of the objects. The Objects with these ids (in the same order)
since:
   1.1



getPersistenceManagerFactory
public PersistenceManagerFactory getPersistenceManagerFactory()(Code)
Accessor for the PersistenceManager Factory. The PersistenceManagerFactory



getSequence
public Sequence getSequence(String sequenceName)(Code)
Method to retrieve a sequence by name. As per JDO2 spec section 12.14. If the named sequence is not known, throws a JDOUserException.
Parameters:
  sequenceName - Fully qualified name of the sequence The sequence



getServerDate
public Date getServerDate()(Code)
Accessor for the date on the datastore. Date on the datastore



getTransactionalObjectId
public Object getTransactionalObjectId(Object pc)(Code)
Accessor for the object id of a transactional object given the object.
Parameters:
  pc - The object The Object id



getUserObject
public synchronized Object getUserObject(Object key)(Code)
Method to get a user object from the PersistenceManager. This is for user objects which are stored under a key. The parameter is not inspected or used in any way by the JDO implementation.
Parameters:
  key - The key to store the user object under The user object for that key
since:
   1.1



getUserObject
public synchronized Object getUserObject()(Code)
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. These methods allow the user to manage the associated object. The parameter is not inspected or used in any way by the JDO implementation. The user object



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



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



makeNontransactional
public synchronized void makeNontransactional(Object pc)(Code)
Method to make nontransactional an object.
Parameters:
  pc - The object



makeNontransactionalAll
public synchronized void makeNontransactionalAll(Object[] pcs)(Code)
Method to make nontransactional an array of objects.
Parameters:
  pcs - The objects.



makeNontransactionalAll
public synchronized void makeNontransactionalAll(Collection pcs)(Code)
Method to make nontransactional a collection of objects.
Parameters:
  pcs - The objects.
throws:
  JDOUserException - thrown if objects could not be made nontransactional



makePersistent
public synchronized Object makePersistent(Object obj)(Code)
JDO method to persist an object. Will also attach a previously detached object.
Parameters:
  obj - The object The persisted object



makePersistentAll
public synchronized Object[] makePersistentAll(Object[] pcs)(Code)
JDO method to make persistent an array of objects.
Parameters:
  pcs - The objects to persist



makePersistentAll
public synchronized Collection makePersistentAll(Collection pcs)(Code)
JDO method to make persistent a collection of objects. Throws a JDOUserException if objects could not be made persistent.
Parameters:
  pcs - The objects to persist



makeTransactional
public synchronized void makeTransactional(Object pc)(Code)
Method to make transactional an object.
Parameters:
  pc - The object



makeTransactionalAll
public synchronized void makeTransactionalAll(Object[] pcs)(Code)
Method to make transactional an array of objects.
Parameters:
  pcs - The objects



makeTransactionalAll
public synchronized void makeTransactionalAll(Collection pcs)(Code)
Method to make transactional a collection of objects.
Parameters:
  pcs - The objects
throws:
  JDOUserException - thrown if objects could not be made transactional



makeTransient
public synchronized void makeTransient(Object pc, boolean useFetchPlan)(Code)
Method to make transient an object allowing fetching using the fetch plan.
Parameters:
  pc - The object
Parameters:
  useFetchPlan - Whether to make transient all objects in the fetch plan



makeTransient
public synchronized void makeTransient(Object pc)(Code)
Method to make transient an object. This doesn't use the fetch plan and just makes the specified object transient.
Parameters:
  pc - The object



makeTransientAll
public synchronized void makeTransientAll(Object[] pcs)(Code)
Method to make transient an array of objects.
Parameters:
  pcs - The objects



makeTransientAll
public synchronized void makeTransientAll(Object[] pcs, boolean includeFetchPlan)(Code)
Method to make transient an array of objects.
Parameters:
  pcs - The objects
Parameters:
  includeFetchPlan - Whether to make transient all objects in the fetch plan



makeTransientAll
public synchronized void makeTransientAll(boolean includeFetchPlan, Object[] pcs)(Code)
Method to make transient an array of objects.
Parameters:
  includeFetchPlan - Whether to make transient all objects in the fetch plan
Parameters:
  pcs - The objects



makeTransientAll
public synchronized void makeTransientAll(Collection pcs, boolean useFetchPlan)(Code)
Method to make transient a collection of objects.
Parameters:
  pcs - The objects
Parameters:
  useFetchPlan - Whether to use the fetch plan when making transient
throws:
  JDOUserException - thrown if objects could not be made transient.



makeTransientAll
public synchronized void makeTransientAll(Collection pcs)(Code)
Method to make transient a collection of objects.
Parameters:
  pcs - The objects
throws:
  JDOUserException - thrown if objects could not be made transient.



newInstance
public 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



newNamedQuery
public synchronized Query newNamedQuery(Class cls, String queryName)(Code)
Construct a query instance with the candidate class and the query name.
Parameters:
  cls - The class to query
Parameters:
  queryName - Name of the query. The query



newObjectIdInstance
public Object newObjectIdInstance(Class pcClass, Object key)(Code)
This method returns an object id instance corresponding to the pcClass and key arguments. It has 2 modes of operation. Where SingleFieldIdentity is being used the key is the value of the key field. For all other cases the key is the String form of the object id instance.
Parameters:
  pcClass - Class of the PersistenceCapable to create the OID for.
Parameters:
  key - Value of the key for SingleFieldIdentity, or toString() for other cases The new object-id instance



newQuery
public synchronized Query newQuery()(Code)
Construct an empty query instance. The query



newQuery
public synchronized Query newQuery(Object obj)(Code)
Construct a query instance from another query. The parameter might be a serialized/restored Query instance from the same JDO vendor but a different execution environment, or the parameter might be currently bound to a PersistenceManager from the same JDO vendor. Any of the elements Class, Filter, IgnoreCache flag, Import declarations, Variable declarations, Parameter declarations, and Ordering from the parameter Query are copied to the new Query instance, but a candidate Collection or Extent element is discarded.
Parameters:
  obj - The object to use in the query The query



newQuery
public synchronized Query newQuery(String query)(Code)
Construct a query instance using the specified Single-String query.
Parameters:
  query - The single-string query The Query



newQuery
public synchronized Query newQuery(String language, Object query)(Code)
Construct a query instance using the specified language and the specified query. The query instance will be of a class defined by the query language.
Parameters:
  language - The language parameter for the JDO Query language. This is by default "javax.jdo.query.JDOQL", but in JDO 2.0 can also be "javax.jdo.query.SQL", or vendor provided languages.
Parameters:
  query - The query object The query



newQuery
public synchronized Query newQuery(Class cls)(Code)
Construct a query instance with the candidate class specified.
Parameters:
  cls - The class to query The query



newQuery
public synchronized Query newQuery(Extent cln)(Code)
Construct a query instance with the candidate Extent specified; the candidate class is taken from the Extent.
Parameters:
  cln - The extent to query The query



newQuery
public synchronized Query newQuery(Class cls, Collection cln)(Code)
Construct a query instance with the candidate class and candidate Collection specified.
Parameters:
  cls - The class to query
Parameters:
  cln - The collection The query



newQuery
public synchronized Query newQuery(Class cls, String filter)(Code)
Construct a query instance with the candidate class and filter specified.
Parameters:
  cls - The class to query
Parameters:
  filter - A filter to apply The query



newQuery
public synchronized Query newQuery(Class cls, Collection cln, String filter)(Code)
Construct a query instance with the candidate class, the candidate Collection, and filter specified.
Parameters:
  cls - The class to query
Parameters:
  cln - A collection
Parameters:
  filter - A filter to apply The query



newQuery
public synchronized Query newQuery(Extent cln, String filter)(Code)
Construct a query instance with the candidate Extent and filter specified. The candidate class is taken from the Extent.
Parameters:
  cln - The extent to query
Parameters:
  filter - A filter to apply The query



putUserObject
public synchronized Object putUserObject(Object key, Object value)(Code)
Method to put a user object into the PersistenceManager. This is so that multiple users can each have a user object for example. The parameter is not inspected or used in any way by the JDO implementation.
Parameters:
  key - The key to store the user object under
Parameters:
  value - The object to store The previous value for this key
since:
   1.1



refresh
public synchronized void refresh(Object obj)(Code)
Method to do a refresh of an object.
Parameters:
  obj - The Object
throws:
  JDOUserException - thrown if the object could not be refreshed



refreshAll
public synchronized void refreshAll(Object[] pcs)(Code)
Method to do a refresh of an array of objects.
Parameters:
  pcs - The Objects



refreshAll
public synchronized void refreshAll(Collection pcs)(Code)
Method to do a refresh of a collection of objects.
Parameters:
  pcs - The Objects
throws:
  JDOUserException - thrown if instances could not be refreshed.



refreshAll
public synchronized void refreshAll()(Code)
Method to do a refresh of all objects.
throws:
  JDOUserException - thrown if instances could not be refreshed.



refreshAll
public synchronized void refreshAll(JDOException exc)(Code)
Method to do a refresh of objects that failed verification in the exception.
Parameters:
  exc - The JDO exception containing the objects that failed
since:
   1.1



removeInstanceLifecycleListener
public void removeInstanceLifecycleListener(InstanceLifecycleListener listener)(Code)
Method to remove a currently registered lifecycle listener, as per JDO 2.0 spec 12.15.
Parameters:
  listener - The instance lifecycle listener to remove.
since:
   1.1



removeUserObject
public synchronized Object removeUserObject(Object key)(Code)
Method to remove a user object from the PersistenceManager. This is for user objects which are stored under a key. The parameter is not inspected or used in any way by the JDO implementation.
Parameters:
  key - The key whose uder object is to be removed. The user object that was removed
since:
   1.1



retrieve
public synchronized void retrieve(Object pc, boolean fgOnly)(Code)
Method to retrieve the fields of an object.
Parameters:
  pc - The object
Parameters:
  fgOnly - Whether to retrieve the current fetch group fields only



retrieve
public synchronized void retrieve(Object pc)(Code)
Method to retrieve the fields of an object.
Parameters:
  pc - The object



retrieveAll
public synchronized void retrieveAll(Object[] pcs)(Code)
Method to retrieve an array of objects.
Parameters:
  pcs - The objects



retrieveAll
public void retrieveAll(Object[] pcs, boolean fgOnly)(Code)
Retrieve field values of instances from the store. This tells the PersistenceManager that the application intends to use the instances, and their field values should be retrieved. The fields in the current fetch group must be retrieved, and the implementation might retrieve more fields than the current fetch group.

The PersistenceManager might use policy information about the class to retrieve associated instances.
Parameters:
  pcs - the instances
Parameters:
  fgOnly - whether to retrieve only the current fetch group fields




retrieveAll
public void retrieveAll(boolean fgOnly, Object[] pcs)(Code)
Retrieve field values of instances from the store. As the equivalent method but arguments reversed for JDK1.5+.
Parameters:
  fgOnly - whether to retrieve only the current fetch group fields
Parameters:
  pcs - the instances
since:
   1.2



retrieveAll
public void retrieveAll(Collection pcs, boolean fgOnly)(Code)
Retrieve field values of instances from the store. This tells the PersistenceManager that the application intends to use the instances, and their field values should be retrieved. The fields in the current fetch group must be retrieved, and the implementation might retrieve more fields than the current fetch group.

The PersistenceManager might use policy information about the class to retrieve associated instances.
Parameters:
  pcs - the instances
Parameters:
  fgOnly - whether to retrieve only the current fetch-group fields




retrieveAll
public synchronized void retrieveAll(Collection pcs)(Code)
Method to retrieve a collection of objects. Throws a JDOUserException if instances could not be retrieved.
Parameters:
  pcs - The objects



setCopyOnAttach
public void setCopyOnAttach(boolean flag)(Code)
Mutator for whether to copy objects on attach.
Parameters:
  flag - Whether to copy on attaching



setDetachAllOnCommit
public void setDetachAllOnCommit(boolean flag)(Code)
Mutator for whether to detach all objects on commit of the transaction.
Parameters:
  flag - Whether to detach all on commit.



setIgnoreCache
public void setIgnoreCache(boolean flag)(Code)
Mutator for whether to ignore the cache.
Parameters:
  flag - Whether to ignore the cache.



setMultithreaded
public void setMultithreaded(boolean flag)(Code)
Mutator for whether the Persistence Manager is multithreaded.
Parameters:
  flag - Whether to run multithreaded.



setTransaction
protected void setTransaction(org.jpox.Transaction tx)(Code)
Method to allow setting of the transaction by a superclass.
Parameters:
  tx - The transaction



setUserObject
public synchronized void setUserObject(Object userObject)(Code)
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. These methods allow the user to manage the associated object. The parameter is not inspected or used in any way by the JDO implementation.
Parameters:
  userObject - The object



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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