com.orientechnologies.jdo
Class oPersistenceManagerST

java.lang.Object
  extended bycom.orientechnologies.jdo.oPersistenceManagerST
All Implemented Interfaces:
oPersistenceManager, PersistenceManager, java.io.Serializable

public class oPersistenceManagerST
extends java.lang.Object
implements java.io.Serializable, oPersistenceManager

Orient JDO implementation of PersistenceManager interface, the most important one for the user application. This class works without sychronization. Use oPersistenceManagerMT if you want to use the same persistence manager by more threads cuncurrently. To create a oPersistenceManagerST object you had to use the factory class: oPersistenceManagerFactory.getPersistenceManager() setting single-thread mode.

See Also:
oPersistenceManagerFactory, oPersistenceManagerMT, Serialized Form

Constructor Summary
protected oPersistenceManagerST(PersistenceManagerFactory iFactory, com.orientechnologies.jdo.engine.oEngineLoader iEngine, oOrientURL iUrl, java.lang.String iUserName, java.lang.String iUserPasswd, java.util.Properties iDefProp)
          Create a persistence manager based on Orient datastore.
 
Method Summary
 void bindObject(java.lang.String iName, java.lang.Object iObject)
          Bind an object to the database's dictionary assigning a unique name.
 void close()
          Close the connection with datastore.
 oOID createStreamById(java.lang.String iClassName, oBinary iObject)
          Create a new persistent object in the datastore, returning the OID of new object created.
 Transaction currentTransaction()
          Get current transaction.
 void deleteObjectById(java.lang.Object iOid)
          Delete an object by OID.
protected  void deletePersistent_i(java.lang.Object iObj)
           
 void deletePersistent(java.lang.Object iObj)
          Delete a persistent object from datastore.
 void deletePersistentAll(java.util.Collection iObjColl)
          Delete a set of persistent objects from datastore.
 void deletePersistentAll(java.lang.Object[] iObjArray)
          Delete an array of persistent objects from datastore.
 void evict(java.lang.Object parm1)
          Mark an instance as no longer needed in the cache.
 void evictAll()
          Mark all persistent-nontransactional instances as no longer needed in the cache.
 void evictAll(java.util.Collection parm1)
          Mark a Collection of instances as no longer needed in the cache.
 void evictAll(java.lang.Object[] parm1)
          Mark an array of instances as no longer needed in the cache.
 int getConnectionId()
           
 int getDatabaseId()
           
 java.lang.String getDatabaseName()
           
 java.text.DateFormat getDateFormat()
           
 java.lang.String getDateFormatString()
           
 d_Dictionary getDictionary()
           
 oSysFolder getDirectory()
           
 com.orientechnologies.jdo.interfaces.oDomain getDomain()
           
 com.orientechnologies.jdo.engine.oEngineLoader getEngine()
           
 Extent getExtent(java.lang.Class parm1, boolean parm2)
          The PersistenceManager manages a collection of instances in the data store based on the class of the instances.
 boolean getIgnoreCache()
          Get the ignoreCache setting for queries.
 boolean getMultithreaded()
          Return always false, since thread-safe PM class is oPersistenceManagerSTMT
 java.lang.Object getObjectById(java.lang.Object iOid, boolean iValidate)
          Get the object id associated to an object. the object id is of class oOID
 java.lang.Object getObjectId(java.lang.Object iObject)
          Get the object id associated to an object. the object id is of class oOID
 java.lang.Class getObjectIdClass(java.lang.Class parm1)
          Return the Class that implements the JDO Identity for the specified PersistenceCapable class.
 oOrientURL getOrientURL()
           
 PersistenceManagerFactory getPersistenceManagerFactory()
          This method returns the PersistenceManagerFactory used to create this PersistenceManager.
 java.util.Properties getProperties()
           
 oSysDatabase getSchema()
           
 int getSessionId()
           
 oBinary getStreamById(java.lang.Object iOid)
          Get the binary serialized content of object passing an OID.
 java.lang.Object getTransactionalObjectId(java.lang.Object p0)
          The ObjectId returned by this method represents the JDO identity of the instance.
 java.lang.String getURL()
           
 java.lang.Object getUserObject()
          The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.
 boolean isClosed()
          A PersistenceManager instance can be used until it is closed.
 boolean isUsingDynaObjects()
           
 java.lang.Object lookupObject(java.lang.String iName)
          Get an object by name from the database's dictionary.
 void makeDirty(java.lang.Object iObj)
           
 void makeNontransactional(java.lang.Object parm1)
          Make an instance non-transactional after commit.
 void makeNontransactionalAll(java.util.Collection parm1)
          Make a Collection of instances non-transactional after commit.
 void makeNontransactionalAll(java.lang.Object[] parm1)
          Make an array of instances non-transactional after commit.
protected  void makePersistent_i(java.lang.Object iObj)
           
 void makePersistent(java.lang.Object iObj)
          Make the transient instance persistent in this PersistenceManager.
 void makePersistentAll(java.util.Collection iObjColl)
          Make a Collection of instances persistent.
 void makePersistentAll(java.lang.Object[] iObjArray)
          Make an array of instances persistent.
 void makeTransactional(java.lang.Object parm1)
          Make an instance subject to transactional boundaries.
 void makeTransactionalAll(java.util.Collection parm1)
          Make a Collection of instances subject to transactional boundaries.
 void makeTransactionalAll(java.lang.Object[] parm1)
          Make an array of instances subject to transactional boundaries.
 void makeTransient(java.lang.Object parm1)
          Make an instance transient, removing it from management by this PersistenceManager.
 void makeTransientAll(java.util.Collection parm1)
          Make a Collection of instances transient, removing them from management by this PersistenceManager.
 void makeTransientAll(java.lang.Object[] parm1)
          Make an array of instances transient, removing them from management by this PersistenceManager.
 java.lang.Object newObjectIdInstance(java.lang.Class iClass, java.lang.String iValue)
          Create an OID by a value.
 Query newQuery()
          Create a new Query with no elements.
 Query newQuery(java.lang.Class iClass)
          Create a new Query specifying the Class of the candidate instances.
 Query newQuery(java.lang.Class parm1, java.util.Collection parm2)
          Create a new Query with the candidate Class and Collection.
 Query newQuery(java.lang.Class parm1, java.util.Collection parm2, java.lang.String parm3)
          Create a new Query with the Class of the candidate instances, candidate Collection, and filter.
 Query newQuery(java.lang.Class p0, Extent p1)
           
 Query newQuery(java.lang.Class p0, Extent p1, java.lang.String p2)
           
 Query newQuery(java.lang.Class iClass, java.lang.String iFilter)
          Create a new Query with the Class of the candidate instances and filter.
 Query newQuery(Extent parm1)
          Create a new Query with the Class of the candidate instances and candidate Extent.
 Query newQuery(Extent parm1, java.lang.String parm2)
          Create a new Query with the candidate Extent and filter; the class is taken from the Extent.
 Query newQuery(java.lang.Object parm1)
          Create a new Query using elements from another Query.
 Query newQuery(java.lang.String p0, java.lang.Object p1)
          Create a new Query using the specified language.
 Query newQuery(java.lang.String iClassName, java.lang.String iFilter)
           
 void refresh(java.lang.Object parm1)
          Refresh the state of the instance from the data store.
 void refreshAll()
          Refresh the state of all applicable instances from the data store.
 void refreshAll(java.util.Collection parm1)
          Refresh the state of a Collection of instances from the data store.
 void refreshAll(java.lang.Object[] parm1)
          Refresh the state of an array of instances from the data store.
 void reopen()
           
 void retrieve(java.lang.Object iObject)
          Retrieve field values of an instance from the store.
 void retrieveAll(java.util.Collection iObjects)
          Retrieve field values of instances from the store.
 void retrieveAll(java.util.Collection iObjects, boolean iDFGOnly)
          Retrieve field values of instances from the store.
 void retrieveAll(java.lang.Object[] iObjects)
          Retrieve field values of instances from the store.
 void retrieveAll(java.lang.Object[] iObjects, boolean iDFGOnly)
          Retrieve field values of instances from the store.
 void setConnectionId(int connectionId)
           
 void setDatabaseId(int iDatabaseId)
           
 void setIgnoreCache(boolean iValue)
          Set the ignoreCache parameter for queries.
 void setMultithreaded(boolean iMT)
          Set the Multithreaded flag for this PersistenceManager.
 void setSessionId(int iSessionId)
           
 void setStreamById(java.lang.Object iOid, oBinary iObject)
          Update a persistent object in the datastore.
 void setUserObject(java.lang.Object iObject)
          The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.
 void setUsingDynaObjects(boolean iValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

oPersistenceManagerST

protected oPersistenceManagerST(PersistenceManagerFactory iFactory,
                                com.orientechnologies.jdo.engine.oEngineLoader iEngine,
                                oOrientURL iUrl,
                                java.lang.String iUserName,
                                java.lang.String iUserPasswd,
                                java.util.Properties iDefProp)
                         throws JDOException
Create a persistence manager based on Orient datastore. To create a oPersistenceManagerST object you had to use the factory class: oPersistenceManagerFactory.getPersistenceManager() setting single-thread mode.

Parameters:
iFactory - PersistenceManagerFactory parent instance
iUrl - URL of database to open
iUserName - User name
iUserPasswd - User password
iDefProp - Additional properties for database
See Also:
oPersistenceManagerFactory, oPersistenceManagerMT
Method Detail

close

public void close()
Close the connection with datastore. Invoke always this method to free system resources used by the connection.

Specified by:
close in interface PersistenceManager

currentTransaction

public Transaction currentTransaction()
Get current transaction. Each PM can have only one transaction associated

Specified by:
currentTransaction in interface PersistenceManager
Returns:
Current transaction

deletePersistent

public void deletePersistent(java.lang.Object iObj)
Delete a persistent object from datastore. If a transaction is begun, then the object will be removed at commit time. If the operation is out of an active transaction, then the object is removed inside the call.

Specified by:
deletePersistent in interface PersistenceManager
Parameters:
iObj - Object to delete
See Also:
deletePersistentAll( Collection iObjColl ), deletePersistentAll( Object[] iObjArray )

deletePersistent_i

protected void deletePersistent_i(java.lang.Object iObj)

deletePersistentAll

public void deletePersistentAll(java.util.Collection iObjColl)
Delete a set of persistent objects from datastore. If a transaction is begun, then the objects will be removed at commit time. If the operation is out of an active transaction, then the objects are removed inside the call.

Specified by:
deletePersistentAll in interface PersistenceManager
Parameters:
iObjColl - Collection object containing the objects to delete
See Also:
deletePersistent( Object iObj ), deletePersistentAll( Object[] iObjArray )

deletePersistentAll

public void deletePersistentAll(java.lang.Object[] iObjArray)
Delete an array of persistent objects from datastore. If a transaction is begun, then the objects will be removed at commit time. If the operation is out of an active transaction, then the objects are removed inside the call.

Specified by:
deletePersistentAll in interface PersistenceManager
Parameters:
iObjArray - Array of persistent objects to delete
See Also:
deletePersistent( Object iObj ), deletePersistentAll( Collection iObjColl )

evict

public void evict(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Mark an instance as no longer needed in the cache. Eviction is normally done automatically by the PersistenceManager at transaction completion. This method allows the application to explicitly provide a hint to the PersistenceManager that the instance is no longer needed in the cache.

Specified by:
evict in interface PersistenceManager
Parameters:
parm1 - the instance to evict from the cache.

evictAll

public void evictAll(java.util.Collection parm1)
Description copied from interface: PersistenceManager
Mark a Collection of instances as no longer needed in the cache.

Specified by:
evictAll in interface PersistenceManager
Parameters:
parm1 - the Collection of instances to evict from the cache.
See Also:
PersistenceManager.evict(Object pc)

evictAll

public void evictAll(java.lang.Object[] parm1)
Description copied from interface: PersistenceManager
Mark an array of instances as no longer needed in the cache.

Specified by:
evictAll in interface PersistenceManager
Parameters:
parm1 - the array of instances to evict from the cache.
See Also:
PersistenceManager.evict(Object pc)

evictAll

public void evictAll()
Description copied from interface: PersistenceManager
Mark all persistent-nontransactional instances as no longer needed in the cache. It transitions all persistent-nontransactional instances to hollow. Transactional instances are subject to eviction based on the RetainValues setting.

Specified by:
evictAll in interface PersistenceManager
See Also:
PersistenceManager.evict(Object pc)

getExtent

public Extent getExtent(java.lang.Class parm1,
                        boolean parm2)
Description copied from interface: PersistenceManager
The PersistenceManager manages a collection of instances in the data store based on the class of the instances. This method returns an Extent of instances in the data store that might be iterated or given to a Query. The Extent itself might not reference any instances, but only hold the class name and an indicator as to whether subclasses are included in the Extent.

Note that the Extent might be very large.

Specified by:
getExtent in interface PersistenceManager
Parameters:
parm1 - Class of instances
parm2 - whether to include instances of subclasses
Returns:
an Extent of the specified Class
See Also:
Query

getIgnoreCache

public boolean getIgnoreCache()
Description copied from interface: PersistenceManager
Get the ignoreCache setting for queries.

IgnoreCache set to true specifies that for all Query instances created by this PersistenceManager, the default is the cache should be ignored for queries.

Specified by:
getIgnoreCache in interface PersistenceManager
Returns:
the ignoreCache setting.

getObjectById

public java.lang.Object getObjectById(java.lang.Object iOid,
                                      boolean iValidate)
Get the object id associated to an object. the object id is of class oOID

Specified by:
getObjectById in interface PersistenceManager
Parameters:
iOid -
iValidate -
Returns:
oOID oid identifying the object in the datastore in unique way
See Also:
oOID

getStreamById

public oBinary getStreamById(java.lang.Object iOid)
Get the binary serialized content of object passing an OID. If the object is present in cache, then the object is returned without ask it to the datastore. If the object is not present in cache, then a request is sent to the datastore and the object is available in cache for further requests.

Specified by:
getStreamById in interface oPersistenceManager
Parameters:
iOid - OID of object to read from datastore
Returns:
Binary content of serialized object

setStreamById

public void setStreamById(java.lang.Object iOid,
                          oBinary iObject)
Update a persistent object in the datastore. The object will be updated in the call without wait for transaction commit.

Specified by:
setStreamById in interface oPersistenceManager
Parameters:
iOid - OID of object to update
iObject - Binary content of serialized object

createStreamById

public oOID createStreamById(java.lang.String iClassName,
                             oBinary iObject)
Create a new persistent object in the datastore, returning the OID of new object created. The object will be created in the call without wait for transaction commit.

Specified by:
createStreamById in interface oPersistenceManager
Parameters:
iClassName - Class name of object to create
iObject - Binary content of serialized object
Returns:
OID of persistent object created

deleteObjectById

public void deleteObjectById(java.lang.Object iOid)
Delete an object by OID. The object will be removed in the call without wait for transaction commit.

Specified by:
deleteObjectById in interface oPersistenceManager
Parameters:
iOid - oid of object to delete
See Also:
deletePersistent

newObjectIdInstance

public java.lang.Object newObjectIdInstance(java.lang.Class iClass,
                                            java.lang.String iValue)
Create an OID by a value. Class parameter is ignored, since to build an OID Orient wants the string value of oid.

Specified by:
newObjectIdInstance in interface PersistenceManager
Parameters:
iClass - Ignored, use null or any
iValue - String value of OID to create
Returns:
New oid instance by parsing the string value. Return class is always oOID
See Also:
oOID

getObjectId

public java.lang.Object getObjectId(java.lang.Object iObject)
Get the object id associated to an object. the object id is of class oOID

Specified by:
getObjectId in interface PersistenceManager
Parameters:
iObject - Persistent object to know its oid
Returns:
oOID oid identifying the object in the datastore in unique way
See Also:
oOID

getObjectIdClass

public java.lang.Class getObjectIdClass(java.lang.Class parm1)
Description copied from interface: PersistenceManager
Return the Class that implements the JDO Identity for the specified PersistenceCapable class. The application can use the returned Class to construct a JDO Identity instance for application identity PersistenceCapable classes. This JDO Identity instance can then be used to get an instance of the PersistenceCapable class for use in the application.

In order for the application to construct an instance of the ObjectId class it needs to know the class being used by the JDO implementation.

Specified by:
getObjectIdClass in interface PersistenceManager
Parameters:
parm1 - the PersistenceCapable Class
Returns:
the Class of the ObjectId of the parameter
See Also:
PersistenceManager.getObjectById(java.lang.Object, boolean)

getPersistenceManagerFactory

public PersistenceManagerFactory getPersistenceManagerFactory()
Description copied from interface: PersistenceManager
This method returns the PersistenceManagerFactory used to create this PersistenceManager.

Specified by:
getPersistenceManagerFactory in interface PersistenceManager
Returns:
the PersistenceManagerFactory that created this PersistenceManager

getProperties

public java.util.Properties getProperties()
Specified by:
getProperties in interface oPersistenceManager

getTransactionalObjectId

public java.lang.Object getTransactionalObjectId(java.lang.Object p0)
Description copied from interface: PersistenceManager
The ObjectId returned by this method represents the JDO identity of the instance. The ObjectId is a copy (clone) of the internal state of the instance, and changing it does not affect the JDO identity of the instance.

If the object identity is being changed in the transaction, by the application modifying one or more of the application key fields, then this method returns the current identity in the transaction.

If there is no transaction in progress, or if none of the key fields is being modified, then this method will return the same value as getObjectId.

Specified by:
getTransactionalObjectId in interface PersistenceManager
Parameters:
p0 - a PersistenceCapable instance
Returns:
the ObjectId of the instance
See Also:
PersistenceManager.getObjectId(Object pc), PersistenceManager.getObjectById(Object oid, boolean validate)

isClosed

public boolean isClosed()
A PersistenceManager instance can be used until it is closed.

Specified by:
isClosed in interface PersistenceManager
Returns:
true if this PersistenceManager has been closed
See Also:
close()

makeNontransactional

public void makeNontransactional(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Make an instance non-transactional after commit.

Normally, at transaction completion, instances are evicted from the cache. This method allows an application to identify an instance as not being evicted from the cache at transaction completion. Instead, the instance remains in the cache with nontransactional state.

Specified by:
makeNontransactional in interface PersistenceManager
Parameters:
parm1 - the instance to make nontransactional.

makeNontransactionalAll

public void makeNontransactionalAll(java.util.Collection parm1)
Description copied from interface: PersistenceManager
Make a Collection of instances non-transactional after commit.

Specified by:
makeNontransactionalAll in interface PersistenceManager
Parameters:
parm1 - the Collection of instances to make nontransactional.
See Also:
PersistenceManager.makeNontransactional(Object pc)

makeNontransactionalAll

public void makeNontransactionalAll(java.lang.Object[] parm1)
Description copied from interface: PersistenceManager
Make an array of instances non-transactional after commit.

Specified by:
makeNontransactionalAll in interface PersistenceManager
Parameters:
parm1 - the array of instances to make nontransactional.
See Also:
PersistenceManager.makeNontransactional(Object pc)

makeDirty

public void makeDirty(java.lang.Object iObj)
Specified by:
makeDirty in interface oPersistenceManager

makePersistent_i

protected void makePersistent_i(java.lang.Object iObj)

makePersistent

public void makePersistent(java.lang.Object iObj)
Description copied from interface: PersistenceManager
Make the transient instance persistent in this PersistenceManager. This method must be called in an active transaction. The PersistenceManager assigns an ObjectId to the instance and transitions it to persistent-new. The instance will be managed in the Extent associated with its Class. The instance will be put into the data store at commit. The closure of instances of PersistenceCapable classes reachable from persistent fields will be made persistent at commit. [This is known as persistence by reachability.]

Specified by:
makePersistent in interface PersistenceManager
Parameters:
iObj - a transient instance of a Class that implements PersistenceCapable

makePersistentAll

public void makePersistentAll(java.util.Collection iObjColl)
Description copied from interface: PersistenceManager
Make a Collection of instances persistent.

Specified by:
makePersistentAll in interface PersistenceManager
Parameters:
iObjColl - a Collection of transient instances
See Also:
PersistenceManager.makePersistent(Object pc)

makePersistentAll

public void makePersistentAll(java.lang.Object[] iObjArray)
Description copied from interface: PersistenceManager
Make an array of instances persistent.

Specified by:
makePersistentAll in interface PersistenceManager
Parameters:
iObjArray - an array of transient instances
See Also:
PersistenceManager.makePersistent(Object pc)

makeTransactional

public void makeTransactional(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Make an instance subject to transactional boundaries.

Transient instances normally do not observe transaction boundaries. This method makes transient instances sensitive to transaction completion. If an instance is modified in a transaction, and the transaction rolls back, the state of the instance is restored to the state before the first change in the transaction.

For persistent instances read in optimistic transactions, this method allows the application to make the state of the instance part of the transactional state. At transaction commit, the state of the instance in the cache is compared to the state of the instance in the data store. If they are not the same, then an exception is thrown.

Specified by:
makeTransactional in interface PersistenceManager
Parameters:
parm1 - the instance to make transactional.

makeTransactionalAll

public void makeTransactionalAll(java.util.Collection parm1)
Description copied from interface: PersistenceManager
Make a Collection of instances subject to transactional boundaries.

Specified by:
makeTransactionalAll in interface PersistenceManager
Parameters:
parm1 - the Collection of instances to make transactional.
See Also:
PersistenceManager.makeTransactional(Object pc)

makeTransactionalAll

public void makeTransactionalAll(java.lang.Object[] parm1)
Description copied from interface: PersistenceManager
Make an array of instances subject to transactional boundaries.

Specified by:
makeTransactionalAll in interface PersistenceManager
Parameters:
parm1 - the array of instances to make transactional.
See Also:
PersistenceManager.makeTransactional(Object pc)

makeTransient

public void makeTransient(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Make an instance transient, removing it from management by this PersistenceManager.

The instance loses its JDO identity and it is no longer associated with any PersistenceManager. The state of fields is preserved unchanged.

Specified by:
makeTransient in interface PersistenceManager
Parameters:
parm1 - the instance to make transient.

makeTransientAll

public void makeTransientAll(java.util.Collection parm1)
Description copied from interface: PersistenceManager
Make a Collection of instances transient, removing them from management by this PersistenceManager.

The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.

Specified by:
makeTransientAll in interface PersistenceManager
Parameters:
parm1 - the instances to make transient.

makeTransientAll

public void makeTransientAll(java.lang.Object[] parm1)
Description copied from interface: PersistenceManager
Make an array of instances transient, removing them from management by this PersistenceManager.

The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.

Specified by:
makeTransientAll in interface PersistenceManager
Parameters:
parm1 - the instances to make transient.

newQuery

public Query newQuery()
Description copied from interface: PersistenceManager
Create a new Query with no elements.

Specified by:
newQuery in interface PersistenceManager
Returns:
the new Query.

newQuery

public Query newQuery(java.lang.String p0,
                      java.lang.Object p1)
Description copied from interface: PersistenceManager
Create a new Query using the specified language.

Specified by:
newQuery in interface PersistenceManager
Parameters:
p0 - the language of the query parameter
p1 - the query, which is of a form determined by the language
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class iClass)
Description copied from interface: PersistenceManager
Create a new Query specifying the Class of the candidate instances.

Specified by:
newQuery in interface PersistenceManager
Parameters:
iClass - the Class of the candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class iClass,
                      java.lang.String iFilter)
Description copied from interface: PersistenceManager
Create a new Query with the Class of the candidate instances and filter.

Specified by:
newQuery in interface PersistenceManager
Parameters:
iClass - the Class of results
iFilter - the filter for candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.String iClassName,
                      java.lang.String iFilter)
Specified by:
newQuery in interface oPersistenceManager

newQuery

public Query newQuery(java.lang.Class parm1,
                      java.util.Collection parm2)
Description copied from interface: PersistenceManager
Create a new Query with the candidate Class and Collection.

Specified by:
newQuery in interface PersistenceManager
Parameters:
parm1 - the Class of results
parm2 - the Collection of candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class parm1,
                      java.util.Collection parm2,
                      java.lang.String parm3)
Description copied from interface: PersistenceManager
Create a new Query with the Class of the candidate instances, candidate Collection, and filter.

Specified by:
newQuery in interface PersistenceManager
Parameters:
parm1 - the Class of candidate instances
parm2 - the Collection of candidate instances
parm3 - the filter for candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class p0,
                      Extent p1)

newQuery

public Query newQuery(java.lang.Class p0,
                      Extent p1,
                      java.lang.String p2)

newQuery

public Query newQuery(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Create a new Query using elements from another Query. The other Query must have been created by the same JDO implementation. It might be active in a different PersistenceManager or might have been serialized and restored.

All of the settings of the other Query are copied to this Query, except for the candidate Collection or Extent.

Specified by:
newQuery in interface PersistenceManager
Parameters:
parm1 - another Query from the same JDO implementation
Returns:
the new Query

newQuery

public Query newQuery(Extent parm1)
Description copied from interface: PersistenceManager
Create a new Query with the Class of the candidate instances and candidate Extent.

Specified by:
newQuery in interface PersistenceManager
Parameters:
parm1 - the Extent of candidate instances
Returns:
the new Query

newQuery

public Query newQuery(Extent parm1,
                      java.lang.String parm2)
Description copied from interface: PersistenceManager
Create a new Query with the candidate Extent and filter; the class is taken from the Extent.

Specified by:
newQuery in interface PersistenceManager
Parameters:
parm1 - the Extent of candidate instances
parm2 - the filter for candidate instances
Returns:
the new Query

refresh

public void refresh(java.lang.Object parm1)
Description copied from interface: PersistenceManager
Refresh the state of the instance from the data store.

In an optimistic transaction, the state of instances in the cache might not match the state in the data store. This method is used to reload the state of the instance from the data store so that a subsequent commit is more likely to succeed.

Outside a transaction, this method will refresh nontransactional state.

Specified by:
refresh in interface PersistenceManager
Parameters:
parm1 - the instance to refresh.

refreshAll

public void refreshAll(java.util.Collection parm1)
Description copied from interface: PersistenceManager
Refresh the state of a Collection of instances from the data store.

Specified by:
refreshAll in interface PersistenceManager
Parameters:
parm1 - the Collection of instances to refresh.
See Also:
PersistenceManager.refresh(Object pc)

refreshAll

public void refreshAll(java.lang.Object[] parm1)
Description copied from interface: PersistenceManager
Refresh the state of an array of instances from the data store.

Specified by:
refreshAll in interface PersistenceManager
Parameters:
parm1 - the array of instances to refresh.
See Also:
PersistenceManager.refresh(Object pc)

refreshAll

public void refreshAll()
Description copied from interface: PersistenceManager
Refresh the state of all applicable instances from the data store.

If called with an active transaction, all transactional instances will be refreshed. If called outside an active transaction, all nontransactional instances will be refreshed.

Specified by:
refreshAll in interface PersistenceManager
See Also:
PersistenceManager.refresh(Object pc)

retrieve

public void retrieve(java.lang.Object iObject)
Description copied from interface: PersistenceManager
Retrieve field values of an instance from the store. This tells the PersistenceManager that the application intends to use the instance, and its field values must be retrieved.

The PersistenceManager might use policy information about the class to retrieve associated instances.

Specified by:
retrieve in interface PersistenceManager
Parameters:
iObject - the instance

retrieveAll

public void retrieveAll(java.util.Collection iObjects)
Description copied from interface: PersistenceManager
Retrieve field values of instances from the store. This tells the PersistenceManager that the application intends to use the instances, and all field values must be retrieved.

The PersistenceManager might use policy information about the class to retrieve associated instances.

Specified by:
retrieveAll in interface PersistenceManager
Parameters:
iObjects - the instances

retrieveAll

public void retrieveAll(java.util.Collection iObjects,
                        boolean iDFGOnly)
Description copied from interface: PersistenceManager
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 default fetch group must be retrieved, and the implementation might retrieve more fields than the default fetch group.

The PersistenceManager might use policy information about the class to retrieve associated instances.

Specified by:
retrieveAll in interface PersistenceManager
Parameters:
iObjects - the instances
iDFGOnly - whether to retrieve only the default fetch group fields

retrieveAll

public void retrieveAll(java.lang.Object[] iObjects)
Description copied from interface: PersistenceManager
Retrieve field values of instances from the store. This tells the PersistenceManager that the application intends to use the instances, and all field values must be retrieved.

The PersistenceManager might use policy information about the class to retrieve associated instances.

Specified by:
retrieveAll in interface PersistenceManager
Parameters:
iObjects - the instances

retrieveAll

public void retrieveAll(java.lang.Object[] iObjects,
                        boolean iDFGOnly)
Description copied from interface: PersistenceManager
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 default fetch group must be retrieved, and the implementation might retrieve more fields than the default fetch group.

The PersistenceManager might use policy information about the class to retrieve associated instances.

Specified by:
retrieveAll in interface PersistenceManager
Parameters:
iObjects - the instances
iDFGOnly - whether to retrieve only the default fetch group fields

reopen

public void reopen()
Specified by:
reopen in interface oPersistenceManager

getMultithreaded

public boolean getMultithreaded()
Return always false, since thread-safe PM class is oPersistenceManagerSTMT

Specified by:
getMultithreaded in interface PersistenceManager
Returns:
See Also:
PersistenceManager.setMultithreaded(boolean)

setMultithreaded

public void setMultithreaded(boolean iMT)
Description copied from interface: PersistenceManager
Set the Multithreaded flag for this PersistenceManager. Applications that use multiple threads to invoke methods or access fields from instances managed by this PersistenceManager must set this flag to true. Instances managed by this PersistenceManager include persistent or transactional instances of PersistenceCapable classes, as well as helper instances such as Query, Transaction, or Extent.

Specified by:
setMultithreaded in interface PersistenceManager
Parameters:
iMT - the Multithreaded setting.

setIgnoreCache

public void setIgnoreCache(boolean iValue)
Description copied from interface: PersistenceManager
Set the ignoreCache parameter for queries.

IgnoreCache set to true specifies that for all Query instances created by this PersistenceManager, the default is the cache should be ignored for queries.

Specified by:
setIgnoreCache in interface PersistenceManager
Parameters:
iValue - the ignoreCache setting.

getUserObject

public java.lang.Object getUserObject()
Description copied from interface: PersistenceManager
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.

Specified by:
getUserObject in interface PersistenceManager
Returns:
the user object associated with this PersistenceManager
See Also:
PersistenceManager.setUserObject(java.lang.Object)

setUserObject

public void setUserObject(java.lang.Object iObject)
Description copied from interface: PersistenceManager
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.

Specified by:
setUserObject in interface PersistenceManager
Parameters:
iObject - the user instance to be remembered by the PersistenceManager
See Also:
PersistenceManager.getUserObject()

setUsingDynaObjects

public void setUsingDynaObjects(boolean iValue)
Specified by:
setUsingDynaObjects in interface oPersistenceManager

isUsingDynaObjects

public boolean isUsingDynaObjects()
Specified by:
isUsingDynaObjects in interface oPersistenceManager

lookupObject

public java.lang.Object lookupObject(java.lang.String iName)
Get an object by name from the database's dictionary.

Specified by:
lookupObject in interface oPersistenceManager
Parameters:
iName - Name of object bound in the dictionary
Returns:
Object required if found, else null

bindObject

public void bindObject(java.lang.String iName,
                       java.lang.Object iObject)
Bind an object to the database's dictionary assigning a unique name.

Specified by:
bindObject in interface oPersistenceManager
Parameters:
iName - Name of object bound in the dictionary
iObject - Object to bind

getURL

public java.lang.String getURL()
Specified by:
getURL in interface oPersistenceManager

getOrientURL

public oOrientURL getOrientURL()
Specified by:
getOrientURL in interface oPersistenceManager

getDatabaseName

public java.lang.String getDatabaseName()
Specified by:
getDatabaseName in interface oPersistenceManager

getSchema

public oSysDatabase getSchema()
Specified by:
getSchema in interface oPersistenceManager

getDictionary

public d_Dictionary getDictionary()
Specified by:
getDictionary in interface oPersistenceManager

getDomain

public com.orientechnologies.jdo.interfaces.oDomain getDomain()
Specified by:
getDomain in interface oPersistenceManager

getDirectory

public oSysFolder getDirectory()
Specified by:
getDirectory in interface oPersistenceManager

getDateFormatString

public java.lang.String getDateFormatString()
Specified by:
getDateFormatString in interface oPersistenceManager

getDateFormat

public java.text.DateFormat getDateFormat()
Specified by:
getDateFormat in interface oPersistenceManager

getConnectionId

public int getConnectionId()
Specified by:
getConnectionId in interface oPersistenceManager

setConnectionId

public void setConnectionId(int connectionId)
Specified by:
setConnectionId in interface oPersistenceManager

getDatabaseId

public int getDatabaseId()
Specified by:
getDatabaseId in interface oPersistenceManager

setDatabaseId

public void setDatabaseId(int iDatabaseId)
Specified by:
setDatabaseId in interface oPersistenceManager

getSessionId

public int getSessionId()
Specified by:
getSessionId in interface oPersistenceManager

setSessionId

public void setSessionId(int iSessionId)
Specified by:
setSessionId in interface oPersistenceManager

getEngine

public com.orientechnologies.jdo.engine.oEngineLoader getEngine()
Specified by:
getEngine in interface oPersistenceManager