Class PersistenceManagerImpl

  • All Implemented Interfaces:
    AutoCloseable, javax.jdo.PersistenceManager, javax.resource.cci.Connection

    public class PersistenceManagerImpl
    extends Object
    implements javax.resource.cci.Connection, javax.jdo.PersistenceManager
    Implementation of the PersistenceManager for use in JCA environments. An application handle associated with the ManagedConnectionImpl.
    • Field Detail

      • LOGGER

        public static final org.datanucleus.util.NucleusLogger LOGGER
        Logger for JCA.
    • Constructor Detail

      • PersistenceManagerImpl

        public PersistenceManagerImpl​(ManagedConnectionImpl mc)
        Constructor.
        Parameters:
        mc - The connection implementation.
    • Method Detail

      • getJDOPersistenceManager

        public org.datanucleus.api.jdo.JDOPersistenceManager getJDOPersistenceManager()
      • getLocalTransaction

        public javax.resource.cci.LocalTransaction getLocalTransaction()
                                                                throws javax.resource.ResourceException
        Specified by:
        getLocalTransaction in interface javax.resource.cci.Connection
        Throws:
        javax.resource.ResourceException
      • getMetaData

        public javax.resource.cci.ConnectionMetaData getMetaData()
                                                          throws javax.resource.ResourceException
        Specified by:
        getMetaData in interface javax.resource.cci.Connection
        Throws:
        javax.resource.ResourceException
      • createInteraction

        public javax.resource.cci.Interaction createInteraction()
                                                         throws javax.resource.ResourceException
        Specified by:
        createInteraction in interface javax.resource.cci.Connection
        Throws:
        javax.resource.ResourceException
      • getResultSetInfo

        public javax.resource.cci.ResultSetInfo getResultSetInfo()
                                                          throws javax.resource.ResourceException
        Specified by:
        getResultSetInfo in interface javax.resource.cci.Connection
        Throws:
        javax.resource.ResourceException
      • close

        public void close()
        Method to close the Persistence Manager. This is invoked by the application server if this handle is not closed
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface javax.resource.cci.Connection
        Specified by:
        close in interface javax.jdo.PersistenceManager
      • isClosed

        public boolean isClosed()
        Accessor for whether the Persistence Manager is closed.
        Specified by:
        isClosed in interface javax.jdo.PersistenceManager
        Returns:
        Whether the Persistence Manager is closed.
      • setDetachAllOnCommit

        public void setDetachAllOnCommit​(boolean detach)
        Mutator for whether to detach all objects on commit of the txn.
        Specified by:
        setDetachAllOnCommit in interface javax.jdo.PersistenceManager
        Parameters:
        detach - Whether to detach objects on commit of the txn.
      • getDetachAllOnCommit

        public boolean getDetachAllOnCommit()
        Accessor for whether to detach objects on commit of the txn.
        Specified by:
        getDetachAllOnCommit in interface javax.jdo.PersistenceManager
        Returns:
        Whether to detach objects on commit of the txn.
      • refresh

        public void refresh​(Object o)
        Method to refresh an object
        Specified by:
        refresh in interface javax.jdo.PersistenceManager
        Parameters:
        o - Object to refresh
      • retrieve

        public void retrieve​(Object o,
                             boolean fgOnly)
        Method to retrieve an object
        Specified by:
        retrieve in interface javax.jdo.PersistenceManager
        Parameters:
        o - Object to retrieve
        fgOnly - Whether to include only fields in current fetch group
      • retrieve

        public void retrieve​(Object o)
        Method to retrieve an object
        Specified by:
        retrieve in interface javax.jdo.PersistenceManager
        Parameters:
        o - Object to retrieve
      • retrieveAll

        public void retrieveAll​(Collection pcs)
        Retrieve a Collection of Persistence-Capable objects
        Specified by:
        retrieveAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence-Capable objects
      • retrieveAll

        public void retrieveAll​(Object... pcs)
        Retrieve an array of Persistence-Capable objects
        Specified by:
        retrieveAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistence-Capable objects
      • retrieveAll

        public void retrieveAll​(Object[] pcs,
                                boolean fgOnly)
        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
        fgOnly - whether to retrieve only the current fetch-group fields
        Since:
        JDO 1.0.1
      • retrieveAll

        public void retrieveAll​(boolean fgOnly,
                                Object... pcs)
        Retrieve field values of instances from the store.
        Specified by:
        retrieveAll in interface javax.jdo.PersistenceManager
        Parameters:
        fgOnly - whether to retrieve only the current fetch-group fields
        pcs - the instances
        Since:
        JDO 2.1
      • retrieveAll

        public void retrieveAll​(Collection pcs,
                                boolean fgOnly)
        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.

        Specified by:
        retrieveAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - the instances
        fgOnly - whether to retrieve only the current fetch group fields
        Since:
        JDO 1.0.1
      • currentTransaction

        public javax.jdo.Transaction currentTransaction()
        Accessor for the current transaction
        Specified by:
        currentTransaction in interface javax.jdo.PersistenceManager
        Returns:
        The current transaction
      • evict

        public void evict​(Object o)
        Method to evict an object
        Specified by:
        evict in interface javax.jdo.PersistenceManager
        Parameters:
        o - Object to evict
      • evictAll

        public void evictAll​(Object... os)
        Method to evict an array of objects
        Specified by:
        evictAll in interface javax.jdo.PersistenceManager
        Parameters:
        os - Array of objects to evict
      • evictAll

        public void evictAll​(Collection os)
        Method to evict all of the specified objects from the PM.
        Specified by:
        evictAll in interface javax.jdo.PersistenceManager
        Parameters:
        os - Collection of objects to evict
      • evictAll

        public void evictAll​(Class cls,
                             boolean subclasses)
        Method to evict all objects of the specified type (and optionally its subclasses).
        Parameters:
        cls - Type of persistable object
        subclasses - Whether to include subclasses
      • evictAll

        public void evictAll​(boolean subclasses,
                             Class cls)
        Method to evict all objects of the specified type (and optionally its subclasses).
        Specified by:
        evictAll in interface javax.jdo.PersistenceManager
        Parameters:
        subclasses - Whether to include subclasses
        cls - Type of persistable object
      • evictAll

        public void evictAll()
        Method to evict all objects from the PM.
        Specified by:
        evictAll in interface javax.jdo.PersistenceManager
      • refreshAll

        public void refreshAll​(Object... os)
        Method to refresh an array of objects.
        Specified by:
        refreshAll in interface javax.jdo.PersistenceManager
        Parameters:
        os - Array of objects to refresh
      • refreshAll

        public void refreshAll​(Collection os)
        Method to refresh a collection of objects.
        Specified by:
        refreshAll in interface javax.jdo.PersistenceManager
        Parameters:
        os - Collection of objects to refresh
      • refreshAll

        public void refreshAll​(javax.jdo.JDOException exc)
        Method to refresh objects that failed verification in a JDOException
        Specified by:
        refreshAll in interface javax.jdo.PersistenceManager
        Parameters:
        exc - Exception containing objects that failed verification
      • refreshAll

        public void refreshAll()
        Method to refresh all objects in the Persistence Manager.
        Specified by:
        refreshAll in interface javax.jdo.PersistenceManager
      • newQuery

        public javax.jdo.Query newQuery()
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Returns:
        The query.
      • newQuery

        public javax.jdo.Query newQuery​(Object obj)
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        obj - object
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(String query)
        Accessor for a single-string query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        query - The single-string query
        Returns:
        The Query
      • newQuery

        public javax.jdo.Query newQuery​(String language,
                                        Object query)
        Accessor for a new query in the specified query language etc.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        language - The query language
        query - The query definition
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(Class cls)
        Accessor for a new query using this candidate class.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class to use.
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(javax.jdo.Extent ext)
        Accessor for a new query based on the provided extent.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        ext - The extent to use
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(Class cls,
                                        Collection cln)
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class.
        cln - The collection to use.
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(Class cls,
                                        String filter)
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class
        filter - The filter to use
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(Class cls,
                                        Collection cln,
                                        String filter)
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class
        cln - The collection
        filter - The filter to use
        Returns:
        The new query
      • newQuery

        public javax.jdo.Query newQuery​(javax.jdo.Extent cln,
                                        String filter)
        Accessor for a new query.
        Specified by:
        newQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cln - The collection
        filter - The filter to use
        Returns:
        The new query
      • newJDOQLTypedQuery

        public <T> javax.jdo.JDOQLTypedQuery<T> newJDOQLTypedQuery​(Class<T> cls)
        Specified by:
        newJDOQLTypedQuery in interface javax.jdo.PersistenceManager
      • newNamedQuery

        public javax.jdo.Query newNamedQuery​(Class cls,
                                             String queryName)
        Accessor for a new named query.
        Specified by:
        newNamedQuery in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class
        queryName - The name of the query
        Returns:
        The new query
      • getExtent

        public javax.jdo.Extent getExtent​(Class cls,
                                          boolean subclasses)
        Accessor for the extent of a candidate class.
        Specified by:
        getExtent in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class
        subclasses - Whether to include subclasses
        Returns:
        The extent for these classes
      • getExtent

        public javax.jdo.Extent getExtent​(Class cls)
        Accessor for the extent of a candidate class.
        Specified by:
        getExtent in interface javax.jdo.PersistenceManager
        Parameters:
        cls - The candidate class
        Returns:
        The extent for these classes
      • getFetchPlan

        public javax.jdo.FetchPlan getFetchPlan()
        Accessor for the current FetchPlan
        Specified by:
        getFetchPlan in interface javax.jdo.PersistenceManager
        Returns:
        FetchPlan
      • getObjectById

        public Object getObjectById​(Object id)
        Accessor for an object given its id.
        Specified by:
        getObjectById in interface javax.jdo.PersistenceManager
        Parameters:
        id - Id of the object.
        Returns:
        The object with this id
      • getObjectById

        public Object getObjectById​(Object id,
                                    boolean validate)
        Accessor for an object given its id.
        Specified by:
        getObjectById in interface javax.jdo.PersistenceManager
        Parameters:
        id - Id of the object.
        validate - Whether to validate the object before returning it
        Returns:
        The object with this id
      • getObjectsById

        public Collection getObjectsById​(Collection oids)
        Specified by:
        getObjectsById in interface javax.jdo.PersistenceManager
      • getObjectsById

        public Object[] getObjectsById​(Object... oids)
        Specified by:
        getObjectsById in interface javax.jdo.PersistenceManager
      • getObjectsById

        public Collection getObjectsById​(Collection oids,
                                         boolean validate)
        Specified by:
        getObjectsById in interface javax.jdo.PersistenceManager
      • getObjectsById

        public Object[] getObjectsById​(Object[] oids,
                                       boolean validate)
      • getObjectsById

        public Object[] getObjectsById​(boolean validate,
                                       Object... oids)
        Specified by:
        getObjectsById in interface javax.jdo.PersistenceManager
      • getObjectById

        public Object getObjectById​(Class cls,
                                    Object key)
        Specified by:
        getObjectById in interface javax.jdo.PersistenceManager
      • newObjectIdInstance

        public Object newObjectIdInstance​(Class pcClass,
                                          Object key)
        Specified by:
        newObjectIdInstance in interface javax.jdo.PersistenceManager
      • getObjectId

        public Object getObjectId​(Object pc)
        Accessor for the id of an object.
        Specified by:
        getObjectId in interface javax.jdo.PersistenceManager
        Parameters:
        pc - The object
        Returns:
        The objects id
      • getTransactionalObjectId

        public Object getTransactionalObjectId​(Object pc)
        Specified by:
        getTransactionalObjectId in interface javax.jdo.PersistenceManager
      • newObjectIdInstance

        public Object newObjectIdInstance​(Class clazz,
                                          String str)
      • newInstance

        public Object newInstance​(Class pc)
        Method to create an instance of an interface or abstract class
        Specified by:
        newInstance in interface javax.jdo.PersistenceManager
        Parameters:
        pc - interface/abstract class declared in metadata
        Returns:
        Instance of the interface / abstract class
      • makePersistent

        public Object makePersistent​(Object pc)
        Method to make an object persistent.
        Specified by:
        makePersistent in interface javax.jdo.PersistenceManager
        Parameters:
        pc - The object to persist
      • makePersistentAll

        public Object[] makePersistentAll​(Object... pcs)
        Make an array of Persistent Capable objects persistent
        Specified by:
        makePersistentAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistent Capable objects
      • makePersistentAll

        public Collection makePersistentAll​(Collection pcs)
        Make a Collection of Persistence Capable objects persistent
        Specified by:
        makePersistentAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence Capable objects
      • deletePersistent

        public void deletePersistent​(Object pc)
        JDO method to delete a Persistence Capable object
        Specified by:
        deletePersistent in interface javax.jdo.PersistenceManager
        Parameters:
        pc - Persistence Capable object
      • deletePersistentAll

        public void deletePersistentAll​(Object... pcs)
        JDO method to delete an array of Persistence Capable objects
        Specified by:
        deletePersistentAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistence Capable objects
      • deletePersistentAll

        public void deletePersistentAll​(Collection pcs)
        JDO method to delete a Collection of Persistence Capable objects
        Specified by:
        deletePersistentAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence Capable objects
      • makeTransient

        public void makeTransient​(Object pc,
                                  boolean useFetchPlan)
        Make a Persistence-Capable object transient , optionally using the fetch plan.
        Specified by:
        makeTransient in interface javax.jdo.PersistenceManager
        Parameters:
        pc - Persistence-Capable object
        useFetchPlan - Whether to use the fetch plan
      • makeTransientAll

        public void makeTransientAll​(Object[] pcs,
                                     boolean useFetchPlan)
        Make an array of Persistence-Capable objects transient
        Parameters:
        pcs - Array of Persistence-Capable objects
        useFetchPlan - Whether to use the fetch plan
      • makeTransientAll

        public void makeTransientAll​(boolean useFetchPlan,
                                     Object... pcs)
        Make an array of Persistence-Capable objects transient
        Specified by:
        makeTransientAll in interface javax.jdo.PersistenceManager
        Parameters:
        useFetchPlan - Whether to use the fetch plan
        pcs - Array of Persistence-Capable objects
        Since:
        JDO 2.1
      • makeTransientAll

        public void makeTransientAll​(Collection pcs,
                                     boolean useFetchPlan)
        Make a Collection of Persistence-Capable objects transient
        Specified by:
        makeTransientAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence-Capable objects
        useFetchPlan - Whether to use the fetch plan
      • makeTransient

        public void makeTransient​(Object pc)
        Make a Persistence-Capable object transient
        Specified by:
        makeTransient in interface javax.jdo.PersistenceManager
        Parameters:
        pc - Persistence-Capable object
      • makeTransientAll

        public void makeTransientAll​(Object... pcs)
        Make an array of Persistence-Capable objects transient
        Specified by:
        makeTransientAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistence-Capable objects
      • makeTransientAll

        public void makeTransientAll​(Collection pcs)
        Make a Collection of Persistence-Capable objects transient
        Specified by:
        makeTransientAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence-Capable objects
      • makeTransactional

        public void makeTransactional​(Object pc)
        Make a Persistence-Capable object transient
        Specified by:
        makeTransactional in interface javax.jdo.PersistenceManager
        Parameters:
        pc - Persistence-Capable object
      • makeTransactionalAll

        public void makeTransactionalAll​(Object... pcs)
        Make an array of Persistence-Capable objects transactional
        Specified by:
        makeTransactionalAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistence-Capable objects
      • makeTransactionalAll

        public void makeTransactionalAll​(Collection pcs)
        Make a collection of persistable objects transactional
        Specified by:
        makeTransactionalAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of persistable objects
      • makeNontransactional

        public void makeNontransactional​(Object pc)
        Make a Persistence-Capable object non-transactional
        Specified by:
        makeNontransactional in interface javax.jdo.PersistenceManager
        Parameters:
        pc - Persistence-Capable object
      • makeNontransactionalAll

        public void makeNontransactionalAll​(Object... pcs)
        Make an array of Persistence-Capable objects non-transactional
        Specified by:
        makeNontransactionalAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Array of Persistence-Capable objects
      • makeNontransactionalAll

        public void makeNontransactionalAll​(Collection pcs)
        Make a Collection of Persistence-Capable objects non-transactional
        Specified by:
        makeNontransactionalAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - Collection of Persistence-Capable objects
      • detachCopy

        public Object detachCopy​(Object pc)
        Detach the specified object from the PersistenceManager.
        Specified by:
        detachCopy in interface javax.jdo.PersistenceManager
        Parameters:
        pc - the instance to detach
        Returns:
        the detached instance
        Since:
        JDO 2.0
        See Also:
        detachCopyAll(Object[])
      • detachCopyAll

        public Object[] detachCopyAll​(Object... pcs)
        Detach the specified objects from the PersistenceManager. The objects returned can be manipulated and re-attached with 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.
        Specified by:
        detachCopyAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - the instances to detach
        Returns:
        the detached instances
        Throws:
        javax.jdo.JDOUserException - if any of the instances do not
        See Also:
        makePersistentAll(Object[]), getFetchPlan()
      • detachCopyAll

        public Collection detachCopyAll​(Collection pcs)
        Detach the specified objects from the PersistenceManager.
        Specified by:
        detachCopyAll in interface javax.jdo.PersistenceManager
        Parameters:
        pcs - the instances to detach
        Returns:
        the detached instances
        See Also:
        detachCopyAll(Object[])
      • putUserObject

        public Object putUserObject​(Object key,
                                    Object value)
        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.
        Specified by:
        putUserObject in interface javax.jdo.PersistenceManager
        Parameters:
        key - The key to store the user object under
        value - The object to store
        Returns:
        The previous value for this key
        Since:
        1.1
      • getUserObject

        public Object getUserObject​(Object key)
        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.
        Specified by:
        getUserObject in interface javax.jdo.PersistenceManager
        Parameters:
        key - The key to store the user object under
        Returns:
        The user object for that key
        Since:
        1.1
      • removeUserObject

        public Object removeUserObject​(Object key)
        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.
        Specified by:
        removeUserObject in interface javax.jdo.PersistenceManager
        Parameters:
        key - The key whose user object is to be removed.
        Returns:
        The user object that was removed
        Since:
        1.1
      • setUserObject

        public void setUserObject​(Object obj)
        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.
        Specified by:
        setUserObject in interface javax.jdo.PersistenceManager
        Parameters:
        obj - User Object
      • getUserObject

        public Object getUserObject()
        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.*
        Specified by:
        getUserObject in interface javax.jdo.PersistenceManager
        Returns:
        User object
      • getPersistenceManagerFactory

        public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
        Retrieve the PersistenceManagerFactory for this manager
        Specified by:
        getPersistenceManagerFactory in interface javax.jdo.PersistenceManager
        Returns:
        The PersistenceManagerFactory
      • getObjectIdClass

        public Class getObjectIdClass​(Class clazz)
        Retrieve the class for the objectid
        Specified by:
        getObjectIdClass in interface javax.jdo.PersistenceManager
        Parameters:
        clazz - The class to retrieve
        Returns:
        The Class of the ObjectId
      • setMultithreaded

        public void setMultithreaded​(boolean multithreaded)
        Mutator for the multithreaded capability of the manager
        Specified by:
        setMultithreaded in interface javax.jdo.PersistenceManager
        Parameters:
        multithreaded - Whether to run multithreaded or not
      • getMultithreaded

        public boolean getMultithreaded()
        Accessor for the multithreaded capability of the manager
        Specified by:
        getMultithreaded in interface javax.jdo.PersistenceManager
        Returns:
        Whether the PersistenceManager is multithreaded or not
      • setIgnoreCache

        public void setIgnoreCache​(boolean ignore)
        Mutator for whether to ignore the cache or not
        Specified by:
        setIgnoreCache in interface javax.jdo.PersistenceManager
        Parameters:
        ignore - Whether to ignore the cache or not
      • getIgnoreCache

        public boolean getIgnoreCache()
        Accessor for whether to ignore the cache or not
        Specified by:
        getIgnoreCache in interface javax.jdo.PersistenceManager
        Returns:
        Whether to ignore the cache or not
      • flush

        public void flush()
        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.
        Specified by:
        flush in interface javax.jdo.PersistenceManager
      • checkConsistency

        public void checkConsistency()
        Method to check the consistency of the cache.
        Specified by:
        checkConsistency in interface javax.jdo.PersistenceManager
      • getDataStoreConnection

        public javax.jdo.datastore.JDOConnection getDataStoreConnection()
        (non-Javadoc)
        Specified by:
        getDataStoreConnection in interface javax.jdo.PersistenceManager
        Since:
        1.1
        See Also:
        PersistenceManager.getDataStoreConnection()
      • getSequence

        public javax.jdo.datastore.Sequence getSequence​(String sequenceName)
        Accessor for a Sequence.
        Specified by:
        getSequence in interface javax.jdo.PersistenceManager
        Parameters:
        sequenceName - Name of the sequence
        Returns:
        The sequence
      • addInstanceLifecycleListener

        public void addInstanceLifecycleListener​(javax.jdo.listener.InstanceLifecycleListener listener,
                                                 Class... classes)
        JDO 2.0 spec 12.15 "LifecycleListeners".
        Specified by:
        addInstanceLifecycleListener in interface javax.jdo.PersistenceManager
        Parameters:
        listener - The instance lifecycle listener to sends events to
        classes - The classes that it is interested in
        Since:
        1.1
      • removeInstanceLifecycleListener

        public void removeInstanceLifecycleListener​(javax.jdo.listener.InstanceLifecycleListener listener)
        JDO 2.0 spec 12.15 "LifecycleListeners".
        Specified by:
        removeInstanceLifecycleListener in interface javax.jdo.PersistenceManager
        Parameters:
        listener - The instance lifecycle listener to remove.
        Since:
        1.1
      • getServerDate

        public Date getServerDate()
        Accessor for the server date/time.
        Specified by:
        getServerDate in interface javax.jdo.PersistenceManager
        Returns:
        The server date/time
      • getCopyOnAttach

        public boolean getCopyOnAttach()
        Specified by:
        getCopyOnAttach in interface javax.jdo.PersistenceManager
      • setCopyOnAttach

        public void setCopyOnAttach​(boolean flag)
        Specified by:
        setCopyOnAttach in interface javax.jdo.PersistenceManager
      • getManagedObjects

        public Set getManagedObjects()
        Specified by:
        getManagedObjects in interface javax.jdo.PersistenceManager
      • getManagedObjects

        public Set getManagedObjects​(Class... classes)
        Specified by:
        getManagedObjects in interface javax.jdo.PersistenceManager
      • getManagedObjects

        public Set getManagedObjects​(EnumSet states)
        Specified by:
        getManagedObjects in interface javax.jdo.PersistenceManager
      • getManagedObjects

        public Set getManagedObjects​(EnumSet states,
                                     Class... classes)
        Specified by:
        getManagedObjects in interface javax.jdo.PersistenceManager
      • getFetchGroup

        public javax.jdo.FetchGroup getFetchGroup​(Class cls,
                                                  String name)
        Specified by:
        getFetchGroup in interface javax.jdo.PersistenceManager
      • getDatastoreReadTimeoutMillis

        public Integer getDatastoreReadTimeoutMillis()
        Specified by:
        getDatastoreReadTimeoutMillis in interface javax.jdo.PersistenceManager
      • setDatastoreReadTimeoutMillis

        public void setDatastoreReadTimeoutMillis​(Integer intvl)
        Specified by:
        setDatastoreReadTimeoutMillis in interface javax.jdo.PersistenceManager
      • getDatastoreWriteTimeoutMillis

        public Integer getDatastoreWriteTimeoutMillis()
        Specified by:
        getDatastoreWriteTimeoutMillis in interface javax.jdo.PersistenceManager
      • setDatastoreWriteTimeoutMillis

        public void setDatastoreWriteTimeoutMillis​(Integer intvl)
        Specified by:
        setDatastoreWriteTimeoutMillis in interface javax.jdo.PersistenceManager
      • getProperties

        public Map<String,​Object> getProperties()
        Specified by:
        getProperties in interface javax.jdo.PersistenceManager
      • getSupportedProperties

        public Set<String> getSupportedProperties()
        Specified by:
        getSupportedProperties in interface javax.jdo.PersistenceManager
      • setProperty

        public void setProperty​(String propertyName,
                                Object value)
        Specified by:
        setProperty in interface javax.jdo.PersistenceManager