Class EntityManagerImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addLifecycleListener​(java.lang.Object listener, java.lang.Class... classes)
      Register a listener for lifecycle-related events on the specified classes.
      void addTransactionListener​(java.lang.Object listener)
      Register a listener for transaction-related events.
      protected void assertNotCloseInvoked()
      Throw appropriate exception if close has been invoked but the broker is still open.
      void begin()  
      void beginStore()
      Begins a store transaction if one isn't already started.
      boolean cancelAll()
      Cancel all pending data store statements.
      void clear()  
      void close()  
      void commit()  
      void commitAndResume()
      Issue a commit and then start a new transaction.
      boolean contains​(java.lang.Object entity)  
      boolean containsAll​(java.lang.Object... entities)
      Whether the given objects are managed.
      boolean containsAll​(java.util.Collection entities)
      Whether the given objects are managed.
      OpenJPAQuery createDynamicQuery​(QueryDefinition qdef)
      Create an executable query from a dynamically defined query.
      <T> jakarta.persistence.EntityGraph<T> createEntityGraph​(java.lang.Class<T> rootType)  
      jakarta.persistence.EntityGraph<?> createEntityGraph​(java.lang.String graphName)  
      <T> Extent<T> createExtent​(java.lang.Class<T> cls, boolean subclasses)
      Return an extent of the given class, optionally including subclasses.
      <T> T createInstance​(java.lang.Class<T> cls)
      Create a new instance of type cls.
      OpenJPAQuery createNamedQuery​(java.lang.String name)  
      <T> jakarta.persistence.TypedQuery<T> createNamedQuery​(java.lang.String name, java.lang.Class<T> resultClass)  
      jakarta.persistence.StoredProcedureQuery createNamedStoredProcedureQuery​(java.lang.String name)  
      OpenJPAQuery createNativeQuery​(java.lang.String query)  
      OpenJPAQuery createNativeQuery​(java.lang.String query, java.lang.Class cls)  
      OpenJPAQuery createNativeQuery​(java.lang.String query, java.lang.String mappingName)  
      jakarta.persistence.Query createQuery​(jakarta.persistence.criteria.CriteriaDelete deleteQuery)  
      <T> jakarta.persistence.TypedQuery<T> createQuery​(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
      Create a query from the given CritriaQuery.
      jakarta.persistence.Query createQuery​(jakarta.persistence.criteria.CriteriaUpdate updateQuery)  
      OpenJPAQuery createQuery​(jakarta.persistence.Query query)
      Create a new query from the given one.
      OpenJPAQuery createQuery​(java.lang.String query)  
      <T> jakarta.persistence.TypedQuery<T> createQuery​(java.lang.String query, java.lang.Class<T> resultClass)  
      OpenJPAQuery createQuery​(java.lang.String language, java.lang.String query)
      Create a new query in the given language.
      jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName)  
      jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName, java.lang.Class... resultClasses)  
      jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName, java.lang.String... resultSetMappings)  
      void detach​(java.lang.Object entity)  
      java.lang.Object[] detachAll​(java.lang.Object... entities)
      Detach the specified objects from the entity manager.
      java.util.Collection detachAll​(java.util.Collection entities)
      Detach the specified objects from the entity manager.
      <T> T detachCopy​(T entity)
      Detach the specified object from the entity manager, detaching based on the AutoDetach value specified and returning a copy of the detached entity.
      void dirty​(java.lang.Object o, java.lang.String field)
      Make the named field of the given object dirty.
      void dirtyClass​(java.lang.Class cls)
      Mark the given class as dirty within the current transaction.
      boolean equals​(java.lang.Object other)  
      void evict​(java.lang.Object entity)
      Evict the given object.
      void evictAll()
      Evict all clean objects.
      void evictAll​(java.lang.Class cls)
      Evict all persistent-clean and persistent-nontransactional instances in the extent of the given class (including subclasses).
      void evictAll​(java.lang.Object... entities)
      Evict the given objects.
      void evictAll​(java.util.Collection entities)
      Evict the given objects.
      void evictAll​(Extent extent)
      Evict all persistent-clean and persistent-nontransactional instances in the given Extent.
      <T> T find​(java.lang.Class<T> cls, java.lang.Object oid)  
      <T> T find​(java.lang.Class<T> cls, java.lang.Object oid, jakarta.persistence.LockModeType mode)  
      <T> T find​(java.lang.Class<T> cls, java.lang.Object oid, jakarta.persistence.LockModeType mode, java.util.Map<java.lang.String,​java.lang.Object> properties)  
      <T> T find​(java.lang.Class<T> cls, java.lang.Object oid, java.util.Map<java.lang.String,​java.lang.Object> properties)  
      <T> T[] findAll​(java.lang.Class<T> cls, java.lang.Object... oids)
      Return the objects with the given oids.
      <T> java.util.Collection<T> findAll​(java.lang.Class<T> cls, java.util.Collection oids)
      Return the objects with the given oids.
      <T> T findCached​(java.lang.Class<T> cls, java.lang.Object oid)
      Return the cached instance for the given oid/object, or null if not cached.
      void flush()  
      AutoClearType getAutoClear()
      Whether to clear state when entering a transaction.
      java.util.EnumSet<AutoDetachType> getAutoDetach()
      AutoDetachType values which indicate when persistent managed objects should be automatically detached in-place.
      Broker getBroker()
      Broker delegate.
      java.lang.ClassLoader getClassLoader()
      Return the current thread's class loader at the time this entity manager was obtained from the factory.
      OpenJPAConfiguration getConfiguration()
      Return the configuration associated with this entity manager.
      java.lang.Object getConnection()
      Return the connection in use by the entity manager, or a new connection if none.
      java.lang.String getConnectionPassword()
      Return the connection password.
      ConnectionRetainMode getConnectionRetainMode()
      Return the connection retain mode for this entity manager.
      java.lang.String getConnectionUserName()
      Return the connection user name.
      OpenJPACriteriaBuilder getCriteriaBuilder()
      Gets the QueryBuilder with OpenJPA-extended capabilities.
      java.lang.Object getDelegate()  
      DetachStateType getDetachState()
      Detach mode constant to determine which fields are part of the detached graph.
      java.util.Collection getDirtyObjects()
      Return a set of current dirty instances.
      jakarta.persistence.EntityGraph<?> getEntityGraph​(java.lang.String graphName)  
      <T> java.util.List<jakarta.persistence.EntityGraph<? super T>> getEntityGraphs​(java.lang.Class<T> entityClass)  
      OpenJPAEntityManagerFactory getEntityManagerFactory()
      Return the factory that produced this entity manager.
      boolean getEvictFromStoreCache()
      Whether to also evict an object from the store cache when it is evicted through this entity manager.
      FetchPlan getFetchPlan()
      Return the (mutable) fetch plan for loading objects from this entity manager.
      Generator getFieldGenerator​(java.lang.Class forClass, java.lang.String fieldName)
      Returns a Generator for the generated values of the specified type, or null if the field is not generated.
      jakarta.persistence.FlushModeType getFlushMode()  
      Generator getIdGenerator​(java.lang.Class forClass)
      Returns a Generator for the datastore identity values of the specified type, or null if the type is unmanaged or its identity cannot be represented by a sequence.
      boolean getIgnoreChanges()
      Whether to take into account changes in the transaction when executing a query or iterating an extent.
      int getLifecycleListenerCallbackMode()  
      java.util.EnumSet<CallbackMode> getLifecycleListenerCallbackModes()
      The CallbackMode flags for handling lifecycle listener exceptions.
      jakarta.persistence.LockModeType getLockMode​(java.lang.Object entity)
      Return the lock mode of the given instance, or null if not locked.
      java.util.Collection getManagedObjects()
      Return a set of all managed instances.
      ManagedRuntime getManagedRuntime()
      Return the managed runtime in use.
      jakarta.persistence.metamodel.Metamodel getMetamodel()  
      boolean getMultithreaded()
      Whether the entity manager or its managed instances are used in a multithreaded environment.
      Generator getNamedGenerator​(java.lang.String name)
      Return the named generator defined in the metadata.
      boolean getNontransactionalRead()
      Whether to allow nontransactional access to persistent state.
      boolean getNontransactionalWrite()
      Whether to allow nontransactional changes to persistent state.
      java.lang.Object getObjectId​(java.lang.Object o)
      Return the oid of the given instance.
      java.lang.Class getObjectIdClass​(java.lang.Class cls)
      Return the application identity class the given persistent class uses for object ids, or null if not a type that uses application identity.
      boolean getOptimistic()
      Whether to use optimistic transactional semantics.
      boolean getOrderDirtyObjects()
      Whether dirty objects will be returned in the order they were dirtied.
      java.util.Collection getPendingTransactionalObjects()
      Return a set of instances which will become transactional upon the next transaction.
      java.util.Collection<java.lang.Class> getPersistedClasses()
      Return the set of classes that have been made persistent in the current transaction.
      boolean getPopulateStoreCache()
      Whether objects accessed during this transaction will be added to the store cache.
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      Get the properties used currently by this entity manager.
      boolean getQuerySQLCache()
      Affirms if this receiver is caching database queries.
      <T> T getReference​(java.lang.Class<T> cls, java.lang.Object oid)  
      java.util.Collection<java.lang.Class> getRemovedClasses()
      Return the set of classes that have been deleted in the current transaction.
      RestoreStateType getRestoreState()
      Whether to restore an object's original state on rollback.
      boolean getRetainState()
      Whether objects retain their persistent state on transaction commit.
      java.lang.Throwable getRollbackCause()
      Returns the Throwable that caused the transaction to be marked for rollback.
      boolean getRollbackOnly()  
      java.util.Set<java.lang.String> getSupportedProperties()
      Get the properties supported by this runtime.
      boolean getSyncWithManagedTransactions()
      Whether to check for a global transaction upon every managed, non-transactional operation.
      OpenJPAEntityTransaction getTransaction()  
      java.util.Collection getTransactionalObjects()
      Return a set of current transaction instances.
      int getTransactionListenerCallbackMode()  
      java.util.EnumSet<CallbackMode> getTransactionListenerCallbackModes()
      The CallbackMode flags for handling transaction listener exceptions.
      java.util.Collection<java.lang.Class> getUpdatedClasses()
      Return the set of classes for objects that have been modified in the current transaction.
      java.lang.Object getUserObject​(java.lang.Object key)
      Get the value for the specified key from the map of user objects.
      java.lang.Object getVersion​(java.lang.Object o)
      Returns the current version indicator for o.
      int hashCode()  
      boolean isActive()  
      boolean isDetached​(java.lang.Object entity)
      Returns true if pc is a detached object (one that can be reattached to a EntityManager via a call to EntityManager.merge(T)); otherwise returns false.
      boolean isDirty​(java.lang.Object o)
      Return whether the given object is dirty.
      boolean isJoinedToTransaction()  
      boolean isLargeTransaction()  
      boolean isManaged()  
      boolean isNewlyPersistent​(java.lang.Object o)
      Return whether the given object was made persistent in the current transaction.
      boolean isOpen()  
      boolean isPersistent​(java.lang.Object o)
      Return whether the given object is persistent.
      boolean isRemoved​(java.lang.Object o)
      Return whether the given object is deleted.
      boolean isStoreActive()
      Whether a store transaction is active.
      boolean isTrackChangesByType()
      Whether memory usage is reduced during this transaction at the expense of tracking changes at the type level instead of the instance level, resulting in more aggressive cache invalidation.
      boolean isTransactional​(java.lang.Object o)
      Return whether the given object is transactional.
      boolean isTransactionManaged()
      Whether this entity manager is using managed transactions.
      void joinTransaction()  
      void lock​(java.lang.Object entity)
      Ensure that the given instance is locked at the current lock level, as set in the FetchPlan for the entity manager.
      void lock​(java.lang.Object entity, jakarta.persistence.LockModeType mode)  
      void lock​(java.lang.Object entity, jakarta.persistence.LockModeType mode, int timeout)
      Ensure that the given instance is locked at the given lock level.
      void lock​(java.lang.Object entity, jakarta.persistence.LockModeType mode, java.util.Map<java.lang.String,​java.lang.Object> properties)  
      void lockAll​(java.lang.Object... entities)
      Ensure that the given instances are locked at the current lock level, as set in the FetchPlan for the entity manager.
      void lockAll​(java.lang.Object[] entities, jakarta.persistence.LockModeType mode, int timeout)
      Ensure that the given instances are locked at the given lock level.
      void lockAll​(java.util.Collection entities)
      Ensure that the given instances are locked at the current lock level, as set in the FetchPlan for the entity manager.
      void lockAll​(java.util.Collection entities, jakarta.persistence.LockModeType mode, int timeout)
      Ensure that the given instances are locked at the given lock level.
      <T> T merge​(T entity)  
      java.lang.Object[] mergeAll​(java.lang.Object... entities)
      Merge the specified objects into the entity manager.
      java.util.Collection mergeAll​(java.util.Collection entities)
      Merge the specified detached objects into the entity manager.
      protected <T> QueryImpl<T> newQueryImpl​(Query kernelQuery)  
      protected <T> QueryImpl<T> newQueryImpl​(Query kernelQuery, QueryMetaData qmd)  
      void nontransactional​(java.lang.Object entity)
      Make the given object nontransactional.
      void nontransactionalAll​(java.lang.Object[] objs)
      Make the given objects nontransactional.
      void nontransactionalAll​(java.util.Collection objs)
      Make the given objects nontransactional.
      void persist​(java.lang.Object entity)  
      void persistAll​(java.lang.Object... entities)
      Persist the given objects.
      void persistAll​(java.util.Collection entities)
      Persist the given objects.
      void popFetchPlan()
      Pops the fetch plan from the top of the stack, making the next one down the active one.
      void preFlush()
      Run pre-flush actions on transactional objects, including persistence-by-reachability, inverse relationship management, deletion of dependent instances, and instance callbacks.
      void prepareForPooling()
      Deprecated.
      - use clear() instead.
      int processArgument​(int op, java.lang.Object obj, OpenJPAStateManager sm)
      Process operation argument.
      java.lang.Object processArgument​(java.lang.Object arg)
      Process find argument.
      java.lang.Object processReturn​(java.lang.Object oid, OpenJPAStateManager sm)
      Process operation return value.
      FetchPlan pushFetchPlan()
      Pushes a new fetch plan that inherits from the current fetch plan onto a stack, and makes the new plan the active one.
      FetchPlan pushFetchPlan​(FetchConfiguration fc)  
      java.lang.Object putUserObject​(java.lang.Object key, java.lang.Object val)
      Put the specified key-value pair into the map of user objects.
      void readExternal​(java.io.ObjectInput in)  
      void refresh​(java.lang.Object entity)  
      void refresh​(java.lang.Object entity, jakarta.persistence.LockModeType mode)  
      void refresh​(java.lang.Object entity, jakarta.persistence.LockModeType mode, java.util.Map<java.lang.String,​java.lang.Object> properties)  
      void refresh​(java.lang.Object entity, java.util.Map<java.lang.String,​java.lang.Object> properties)  
      void refreshAll()
      Refresh all transactional objects.
      void refreshAll​(java.lang.Object... entities)
      Refresh the state of the given objects.
      void refreshAll​(java.util.Collection entities)
      Refresh the state of the given objects.
      void release​(java.lang.Object entity)
      Release the given object from management.
      void releaseAll​(java.lang.Object... entities)
      Release the given object from management.
      void releaseAll​(java.util.Collection entities)
      Release the given objects from management.
      void releaseSavepoint()
      Release the last set savepoint and any resources associated with it.
      void releaseSavepoint​(java.lang.String name)
      Release the savepoint and any resources associated with it.
      void remove​(java.lang.Object entity)  
      void removeAll​(java.lang.Object... entities)
      Delete the given persistent objects.
      void removeAll​(java.util.Collection entities)
      Delete the given persistent objects.
      void removeLifecycleListener​(java.lang.Object listener)
      Remove a listener for lifecycle-related events.
      void removeTransactionListener​(java.lang.Object listener)
      Remove a listener for transaction-related events.
      void retrieve​(java.lang.Object entity)
      Immediately load the given object's persistent fields.
      void retrieveAll​(java.lang.Object... entities)
      Retrieve the persistent state of the given objects.
      void retrieveAll​(java.util.Collection entities)
      Retrieve the persistent state of the given objects.
      void rollback()  
      void rollbackAndResume()
      Issue a rollback and then start a new transaction.
      void rollbackToSavepoint()
      Rollback the current transaction to the last savepoint.
      void rollbackToSavepoint​(java.lang.String name)
      Rollback the current transaction to the given savepoint name.
      void setAutoClear​(int autoClear)  
      void setAutoClear​(AutoClearType val)
      Whether to clear state when entering a transaction.
      void setAutoDetach​(int autoDetachFlags)  
      void setAutoDetach​(int flag, boolean on)  
      void setAutoDetach​(java.util.EnumSet<AutoDetachType> flags)
      AutoDetachType values which indicate when persistent managed objects should be automatically detached in-place.
      void setAutoDetach​(AutoDetachType flag)
      AutoDetachType values which indicate when persistent managed objects should be automatically detached in-place.
      void setAutoDetach​(AutoDetachType value, boolean on)
      Bit flags marked in AutoDetachType which indicate when persistent managed objects should be automatically detached in-place.
      void setDetachState​(int detach)  
      void setDetachState​(DetachStateType type)
      Detach mode constant to determine which fields are part of the detached graph.
      void setEvictFromStoreCache​(boolean evict)
      Whether to also evict an object from the store cache when it is evicted through this entity manager.
      void setFlushMode​(jakarta.persistence.FlushModeType flushMode)  
      void setIgnoreChanges​(boolean val)
      Whether to take into account changes in the transaction when executing a query or iterating an extent.
      void setLargeTransaction​(boolean value)  
      void setLifecycleListenerCallbackMode​(int callbackMode)  
      void setLifecycleListenerCallbackMode​(java.util.EnumSet<CallbackMode> modes)
      The CallbackMode flags for handling lifecycle listener exceptions.
      void setLifecycleListenerCallbackMode​(CallbackMode mode)
      The CallbackMode flag for handling lifecycle listener exceptions.
      void setMultithreaded​(boolean multithreaded)
      Whether the entity manager or its managed instances are used in a multithreaded environment.
      void setNontransactionalRead​(boolean val)
      Whether to allow nontransactional access to persistent state.
      void setNontransactionalWrite​(boolean val)
      Whether to allow nontransactional changes to persistent state.
      void setOptimistic​(boolean val)
      Whether to use optimistic transactional semantics.
      void setOrderDirtyObjects​(boolean order)
      Whether dirty objects will be returned in the order they were dirtied.
      void setPopulateStoreCache​(boolean cache)
      Whether to populate the store cache with objects used by this transaction.
      void setProperties​(java.util.Map<java.lang.String,​java.lang.Object> emEmptyPropsProperties)  
      void setProperty​(java.lang.String prop, java.lang.Object value)
      Sets the given property to the given value, reflectively.
      void setQuerySQLCache​(boolean flag)
      Sets whether this receiver will cache database queries during its lifetime.
      void setRestoreState​(int restore)  
      void setRestoreState​(RestoreStateType val)
      Whether to restore an object's original state on rollback.
      void setRetainState​(boolean val)
      Whether objects retain their persistent state on transaction commit.
      void setRollbackOnly()  
      void setRollbackOnly​(java.lang.Throwable cause)
      Mark the current transaction for rollback with the specified cause of the rollback.
      void setSavepoint​(java.lang.String name)
      Set a transactional savepoint where operations after this savepoint will be rolled back.
      void setSyncWithManagedTransactions​(boolean sync)
      Whether to check for a global transaction upon every managed, non-transactional operation.
      void setTrackChangesByType​(boolean trackByType)
      If a large number of objects will be created, modified, or deleted during this transaction setting this option to true will reduce memory usage if you perform periodic flushes by tracking changes at the type level instead of the instance level, resulting in more aggressive cache invalidation.
      void setTransactionListenerCallbackMode​(int callbackMode)  
      void setTransactionListenerCallbackMode​(java.util.EnumSet<CallbackMode> modes)
      The CallbackMode flags for handling transaction listener exceptions.
      void setTransactionListenerCallbackMode​(CallbackMode mode)
      The CallbackMode flag for handling transaction listener exceptions.
      void transactional​(java.lang.Object entity, boolean updateVersion)
      Make the given object transactional.
      void transactionalAll​(java.lang.Object[] objs, boolean updateVersion)
      Make the given objects transactional.
      void transactionalAll​(java.util.Collection objs, boolean updateVersion)
      Make the given objects transactional.
      <T> T unwrap​(java.lang.Class<T> cls)
      Unwraps this receiver to an instance of the given class, if possible.
      void validateChanges()
      Validate the changes made in this transaction, reporting any optimistic violations, constraint violations, etc.
      protected void validateSQL​(java.lang.String query)
      Validate that the user provided SQL.
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EntityManagerImpl

        public EntityManagerImpl()
    • Method Detail

      • getBroker

        public Broker getBroker()
        Broker delegate.
      • pushFetchPlan

        public FetchPlan pushFetchPlan()
        Description copied from interface: OpenJPAEntityManager
        Pushes a new fetch plan that inherits from the current fetch plan onto a stack, and makes the new plan the active one.
        Specified by:
        pushFetchPlan in interface OpenJPAEntityManager
        Returns:
        the new fetch plan
      • popFetchPlan

        public void popFetchPlan()
        Description copied from interface: OpenJPAEntityManager
        Pops the fetch plan from the top of the stack, making the next one down the active one. This returns void to avoid confusion, since fetch plans tend to be used in method-chaining patterns often.
        Specified by:
        popFetchPlan in interface OpenJPAEntityManager
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Description copied from interface: OpenJPAEntityManager
        Return the current thread's class loader at the time this entity manager was obtained from the factory.
        Specified by:
        getClassLoader in interface OpenJPAEntityManager
      • setMultithreaded

        public void setMultithreaded​(boolean multithreaded)
        Description copied from interface: OpenJPAEntityManager
        Whether the entity manager or its managed instances are used in a multithreaded environment.
        Specified by:
        setMultithreaded in interface OpenJPAEntityManager
      • getIgnoreChanges

        public boolean getIgnoreChanges()
        Description copied from interface: OpenJPAEntityManager
        Whether to take into account changes in the transaction when executing a query or iterating an extent.
        Specified by:
        getIgnoreChanges in interface OpenJPAEntityManager
      • setIgnoreChanges

        public void setIgnoreChanges​(boolean val)
        Description copied from interface: OpenJPAEntityManager
        Whether to take into account changes in the transaction when executing a query or iterating an extent.
        Specified by:
        setIgnoreChanges in interface OpenJPAEntityManager
      • setEvictFromStoreCache

        public void setEvictFromStoreCache​(boolean evict)
        Description copied from interface: OpenJPAEntityManager
        Whether to also evict an object from the store cache when it is evicted through this entity manager.
        Specified by:
        setEvictFromStoreCache in interface OpenJPAEntityManager
      • isTrackChangesByType

        public boolean isTrackChangesByType()
        Description copied from interface: OpenJPAEntityManager
        Whether memory usage is reduced during this transaction at the expense of tracking changes at the type level instead of the instance level, resulting in more aggressive cache invalidation.
        Specified by:
        isTrackChangesByType in interface OpenJPAEntityManager
      • setTrackChangesByType

        public void setTrackChangesByType​(boolean trackByType)
        Description copied from interface: OpenJPAEntityManager
        If a large number of objects will be created, modified, or deleted during this transaction setting this option to true will reduce memory usage if you perform periodic flushes by tracking changes at the type level instead of the instance level, resulting in more aggressive cache invalidation.
        Specified by:
        setTrackChangesByType in interface OpenJPAEntityManager
      • getUserObject

        public java.lang.Object getUserObject​(java.lang.Object key)
        Description copied from interface: OpenJPAEntityManager
        Get the value for the specified key from the map of user objects.
        Specified by:
        getUserObject in interface OpenJPAEntityManager
      • putUserObject

        public java.lang.Object putUserObject​(java.lang.Object key,
                                              java.lang.Object val)
        Description copied from interface: OpenJPAEntityManager
        Put the specified key-value pair into the map of user objects. Use a value of null to remove the key.
        Specified by:
        putUserObject in interface OpenJPAEntityManager
      • getReference

        public <T> T getReference​(java.lang.Class<T> cls,
                                  java.lang.Object oid)
        Specified by:
        getReference in interface jakarta.persistence.EntityManager
      • find

        public <T> T find​(java.lang.Class<T> cls,
                          java.lang.Object oid)
        Specified by:
        find in interface jakarta.persistence.EntityManager
      • find

        public <T> T find​(java.lang.Class<T> cls,
                          java.lang.Object oid,
                          jakarta.persistence.LockModeType mode)
        Specified by:
        find in interface jakarta.persistence.EntityManager
      • find

        public <T> T find​(java.lang.Class<T> cls,
                          java.lang.Object oid,
                          java.util.Map<java.lang.String,​java.lang.Object> properties)
        Specified by:
        find in interface jakarta.persistence.EntityManager
      • find

        public <T> T find​(java.lang.Class<T> cls,
                          java.lang.Object oid,
                          jakarta.persistence.LockModeType mode,
                          java.util.Map<java.lang.String,​java.lang.Object> properties)
        Specified by:
        find in interface jakarta.persistence.EntityManager
      • findAll

        public <T> T[] findAll​(java.lang.Class<T> cls,
                               java.lang.Object... oids)
        Description copied from interface: OpenJPAEntityManager
        Return the objects with the given oids.
        Specified by:
        findAll in interface OpenJPAEntityManager
        oids - the oids of the objects to return
        Returns:
        the objects that were looked up, in the same order as the oids parameter.
        See Also:
        EntityManager.find(Class,Object)
      • findAll

        public <T> java.util.Collection<T> findAll​(java.lang.Class<T> cls,
                                                   java.util.Collection oids)
        Description copied from interface: OpenJPAEntityManager
        Return the objects with the given oids.
        Specified by:
        findAll in interface OpenJPAEntityManager
        oids - the oids of the objects to return
        Returns:
        the objects that were looked up, in the same order as the oids parameter.
        See Also:
        EntityManager.find(Class,Object)
      • findCached

        public <T> T findCached​(java.lang.Class<T> cls,
                                java.lang.Object oid)
        Description copied from interface: OpenJPAEntityManager
        Return the cached instance for the given oid/object, or null if not cached.
        Specified by:
        findCached in interface OpenJPAEntityManager
        oid - the object's id
        Returns:
        the cached object, or null if not cached
      • getObjectIdClass

        public java.lang.Class getObjectIdClass​(java.lang.Class cls)
        Description copied from interface: OpenJPAEntityManager
        Return the application identity class the given persistent class uses for object ids, or null if not a type that uses application identity.
        Specified by:
        getObjectIdClass in interface OpenJPAEntityManager
      • joinTransaction

        public void joinTransaction()
        Specified by:
        joinTransaction in interface jakarta.persistence.EntityManager
      • isJoinedToTransaction

        public boolean isJoinedToTransaction()
        Specified by:
        isJoinedToTransaction in interface jakarta.persistence.EntityManager
      • begin

        public void begin()
        Specified by:
        begin in interface jakarta.persistence.EntityTransaction
        Specified by:
        begin in interface OpenJPAEntityManager
      • commit

        public void commit()
        Specified by:
        commit in interface jakarta.persistence.EntityTransaction
        Specified by:
        commit in interface OpenJPAEntityManager
      • rollback

        public void rollback()
        Specified by:
        rollback in interface jakarta.persistence.EntityTransaction
        Specified by:
        rollback in interface OpenJPAEntityManager
      • commitAndResume

        public void commitAndResume()
        Description copied from interface: OpenJPAEntityTransaction
        Issue a commit and then start a new transaction. This is identical to:
         manager.commit (); manager.begin ();
         
        except that the entity manager's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
        Specified by:
        commitAndResume in interface OpenJPAEntityManager
        Specified by:
        commitAndResume in interface OpenJPAEntityTransaction
        See Also:
        EntityTransaction.commit(), EntityTransaction.begin()
      • rollbackAndResume

        public void rollbackAndResume()
        Description copied from interface: OpenJPAEntityTransaction
        Issue a rollback and then start a new transaction. This is identical to:
         manager.rollback (); manager.begin ();
         
        except that the entity manager's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
        Specified by:
        rollbackAndResume in interface OpenJPAEntityManager
        Specified by:
        rollbackAndResume in interface OpenJPAEntityTransaction
        See Also:
        EntityTransaction.rollback(), EntityTransaction.begin()
      • getRollbackOnly

        public boolean getRollbackOnly()
        Specified by:
        getRollbackOnly in interface jakarta.persistence.EntityTransaction
        Specified by:
        getRollbackOnly in interface OpenJPAEntityManager
      • setRollbackOnly

        public void setRollbackOnly()
        Specified by:
        setRollbackOnly in interface jakarta.persistence.EntityTransaction
        Specified by:
        setRollbackOnly in interface OpenJPAEntityManager
      • setSavepoint

        public void setSavepoint​(java.lang.String name)
        Description copied from interface: OpenJPAEntityManager
        Set a transactional savepoint where operations after this savepoint will be rolled back.
        Specified by:
        setSavepoint in interface OpenJPAEntityManager
      • rollbackToSavepoint

        public void rollbackToSavepoint​(java.lang.String name)
        Description copied from interface: OpenJPAEntityManager
        Rollback the current transaction to the given savepoint name. Savepoints set after this one will become invalid.
        Specified by:
        rollbackToSavepoint in interface OpenJPAEntityManager
      • releaseSavepoint

        public void releaseSavepoint()
        Description copied from interface: OpenJPAEntityManager
        Release the last set savepoint and any resources associated with it. The given savepoint and any set after it will become invalid.
        Specified by:
        releaseSavepoint in interface OpenJPAEntityManager
      • releaseSavepoint

        public void releaseSavepoint​(java.lang.String name)
        Description copied from interface: OpenJPAEntityManager
        Release the savepoint and any resources associated with it. The given savepoint and any set after it will become invalid.
        Specified by:
        releaseSavepoint in interface OpenJPAEntityManager
      • flush

        public void flush()
        Specified by:
        flush in interface jakarta.persistence.EntityManager
      • preFlush

        public void preFlush()
        Description copied from interface: OpenJPAEntityManager
        Run pre-flush actions on transactional objects, including persistence-by-reachability, inverse relationship management, deletion of dependent instances, and instance callbacks. Transaction listeners are not invoked.
        Specified by:
        preFlush in interface OpenJPAEntityManager
      • validateChanges

        public void validateChanges()
        Description copied from interface: OpenJPAEntityManager
        Validate the changes made in this transaction, reporting any optimistic violations, constraint violations, etc. In a datastore transaction or a flushed optimistic transaction, this method will act just like EntityManager.flush(). In an optimistic transaction that has not yet begun a datastore-level transaction, however, it will only report exceptions that would occur on flush, without retaining any datastore resources.
        Specified by:
        validateChanges in interface OpenJPAEntityManager
      • isActive

        public boolean isActive()
        Specified by:
        isActive in interface jakarta.persistence.EntityTransaction
        Specified by:
        isActive in interface OpenJPAEntityManager
      • beginStore

        public void beginStore()
        Description copied from interface: OpenJPAEntityManager
        Begins a store transaction if one isn't already started. The entity manager must already be in a logical transaction.
        Specified by:
        beginStore in interface OpenJPAEntityManager
      • contains

        public boolean contains​(java.lang.Object entity)
        Specified by:
        contains in interface jakarta.persistence.EntityManager
      • persist

        public void persist​(java.lang.Object entity)
        Specified by:
        persist in interface jakarta.persistence.EntityManager
      • remove

        public void remove​(java.lang.Object entity)
        Specified by:
        remove in interface jakarta.persistence.EntityManager
      • release

        public void release​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager
        Release the given object from management. This operation is not recursive.
        Specified by:
        release in interface OpenJPAEntityManager
      • releaseAll

        public void releaseAll​(java.util.Collection entities)
        Description copied from interface: OpenJPAEntityManager
        Release the given objects from management. This operation is not recursive.
        Specified by:
        releaseAll in interface OpenJPAEntityManager
      • releaseAll

        public void releaseAll​(java.lang.Object... entities)
        Description copied from interface: OpenJPAEntityManager
        Release the given object from management. This operation is not recursive.
        Specified by:
        releaseAll in interface OpenJPAEntityManager
      • refresh

        public void refresh​(java.lang.Object entity)
        Specified by:
        refresh in interface jakarta.persistence.EntityManager
      • refresh

        public void refresh​(java.lang.Object entity,
                            jakarta.persistence.LockModeType mode)
        Specified by:
        refresh in interface jakarta.persistence.EntityManager
      • refresh

        public void refresh​(java.lang.Object entity,
                            java.util.Map<java.lang.String,​java.lang.Object> properties)
        Specified by:
        refresh in interface jakarta.persistence.EntityManager
      • refresh

        public void refresh​(java.lang.Object entity,
                            jakarta.persistence.LockModeType mode,
                            java.util.Map<java.lang.String,​java.lang.Object> properties)
        Specified by:
        refresh in interface jakarta.persistence.EntityManager
      • retrieve

        public void retrieve​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager
        Immediately load the given object's persistent fields. One might use this action to make sure that an instance's fields are loaded before transitioning it to transient. Note that this action is not recursive. Any related objects that are loaded will not necessarily have their fields loaded.
        Specified by:
        retrieve in interface OpenJPAEntityManager
      • evict

        public void evict​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager

        Evict the given object.

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evict in interface OpenJPAEntityManager
        Parameters:
        entity - A persistent class which will be evicted
      • evictAll

        public void evictAll​(java.util.Collection entities)
        Description copied from interface: OpenJPAEntityManager

        Evict the given objects.

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evictAll in interface OpenJPAEntityManager
        Parameters:
        entities - A collection of persistent classes which will be evicted.
      • evictAll

        public void evictAll​(java.lang.Object... entities)
        Description copied from interface: OpenJPAEntityManager

        Evict the given objects.

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evictAll in interface OpenJPAEntityManager
        Parameters:
        entities - The persistent classes which will be evicted
      • evictAll

        public void evictAll()
        Description copied from interface: OpenJPAEntityManager

        Evict all clean objects.

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evictAll in interface OpenJPAEntityManager
      • evictAll

        public void evictAll​(java.lang.Class cls)
        Description copied from interface: OpenJPAEntityManager

        Evict all persistent-clean and persistent-nontransactional instances in the extent of the given class (including subclasses).

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evictAll in interface OpenJPAEntityManager
        Parameters:
        cls - All clean instances of this class will be evicted.
      • evictAll

        public void evictAll​(Extent extent)
        Description copied from interface: OpenJPAEntityManager

        Evict all persistent-clean and persistent-nontransactional instances in the given Extent.

        Eviction acts as a hint to the persistence provider, and indicates that the persistent object is no longer needed by the application and may be garbage collected. It does not remove the object from the L1 cache and only affects objects which are managed and unmodified.

        Specified by:
        evictAll in interface OpenJPAEntityManager
        Parameters:
        extent - Extend which contains the persistent classes to evict.
      • detachCopy

        public <T> T detachCopy​(T entity)
        Description copied from interface: OpenJPAEntityManager
        Detach the specified object from the entity manager, detaching based on the AutoDetach value specified and returning a copy of the detached entity.
        Specified by:
        detachCopy in interface OpenJPAEntityManager
        Parameters:
        entity - the instance to detach
        Returns:
        the detached instance
      • detachAll

        public java.lang.Object[] detachAll​(java.lang.Object... entities)
        Description copied from interface: OpenJPAEntityManager
        Detach the specified objects from the entity manager.
        Specified by:
        detachAll in interface OpenJPAEntityManager
        Parameters:
        entities - the instances to detach
        Returns:
        the detached instances
      • detachAll

        public java.util.Collection detachAll​(java.util.Collection entities)
        Description copied from interface: OpenJPAEntityManager
        Detach the specified objects from the entity manager.
        Specified by:
        detachAll in interface OpenJPAEntityManager
        Parameters:
        entities - the instances to detach
        Returns:
        the detached instances
      • merge

        public <T> T merge​(T entity)
        Specified by:
        merge in interface jakarta.persistence.EntityManager
      • mergeAll

        public java.lang.Object[] mergeAll​(java.lang.Object... entities)
        Description copied from interface: OpenJPAEntityManager
        Merge the specified objects into the entity manager.
        Specified by:
        mergeAll in interface OpenJPAEntityManager
        Parameters:
        entities - instances to import
        Returns:
        the re-attached instances
      • mergeAll

        public java.util.Collection mergeAll​(java.util.Collection entities)
        Description copied from interface: OpenJPAEntityManager
        Merge the specified detached objects into the entity manager.
        Specified by:
        mergeAll in interface OpenJPAEntityManager
        Parameters:
        entities - Collection of instances to import
        Returns:
        the re-attached instances
      • transactional

        public void transactional​(java.lang.Object entity,
                                  boolean updateVersion)
        Description copied from interface: OpenJPAEntityManager
        Make the given object transactional.
        Specified by:
        transactional in interface OpenJPAEntityManager
        Parameters:
        entity - instance to make transactional
        updateVersion - if true, the instance's version will be incremented at the next flush
      • transactionalAll

        public void transactionalAll​(java.util.Collection objs,
                                     boolean updateVersion)
        Description copied from interface: OpenJPAEntityManager
        Make the given objects transactional.
        Specified by:
        transactionalAll in interface OpenJPAEntityManager
        Parameters:
        objs - instances to make transactional
        updateVersion - if true, the instance's version will be incremented at the next flush
      • transactionalAll

        public void transactionalAll​(java.lang.Object[] objs,
                                     boolean updateVersion)
        Description copied from interface: OpenJPAEntityManager
        Make the given objects transactional.
        Specified by:
        transactionalAll in interface OpenJPAEntityManager
        Parameters:
        objs - instances to make transactional
        updateVersion - if true, the instance's version will be incremented at the next flush
      • getIdGenerator

        public Generator getIdGenerator​(java.lang.Class forClass)
        Description copied from interface: OpenJPAEntityManager
        Returns a Generator for the datastore identity values of the specified type, or null if the type is unmanaged or its identity cannot be represented by a sequence.
        Specified by:
        getIdGenerator in interface OpenJPAEntityManager
      • createExtent

        public <T> Extent<T> createExtent​(java.lang.Class<T> cls,
                                          boolean subclasses)
        Description copied from interface: OpenJPAEntityManager
        Return an extent of the given class, optionally including subclasses.
        Specified by:
        createExtent in interface OpenJPAEntityManager
      • createQuery

        public <T> jakarta.persistence.TypedQuery<T> createQuery​(java.lang.String query,
                                                                 java.lang.Class<T> resultClass)
        Specified by:
        createQuery in interface jakarta.persistence.EntityManager
      • createNamedQuery

        public <T> jakarta.persistence.TypedQuery<T> createNamedQuery​(java.lang.String name,
                                                                      java.lang.Class<T> resultClass)
        Specified by:
        createNamedQuery in interface jakarta.persistence.EntityManager
      • createNativeQuery

        public OpenJPAQuery createNativeQuery​(java.lang.String query,
                                              java.lang.Class cls)
        Specified by:
        createNativeQuery in interface jakarta.persistence.EntityManager
        Specified by:
        createNativeQuery in interface OpenJPAEntityManager
      • createNativeQuery

        public OpenJPAQuery createNativeQuery​(java.lang.String query,
                                              java.lang.String mappingName)
        Specified by:
        createNativeQuery in interface jakarta.persistence.EntityManager
        Specified by:
        createNativeQuery in interface OpenJPAEntityManager
      • createNamedStoredProcedureQuery

        public jakarta.persistence.StoredProcedureQuery createNamedStoredProcedureQuery​(java.lang.String name)
        Specified by:
        createNamedStoredProcedureQuery in interface jakarta.persistence.EntityManager
      • createStoredProcedureQuery

        public jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName)
        Specified by:
        createStoredProcedureQuery in interface jakarta.persistence.EntityManager
      • createStoredProcedureQuery

        public jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName,
                                                                                   java.lang.Class... resultClasses)
        Specified by:
        createStoredProcedureQuery in interface jakarta.persistence.EntityManager
      • createStoredProcedureQuery

        public jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery​(java.lang.String procedureName,
                                                                                   java.lang.String... resultSetMappings)
        Specified by:
        createStoredProcedureQuery in interface jakarta.persistence.EntityManager
      • newQueryImpl

        protected <T> QueryImpl<T> newQueryImpl​(Query kernelQuery)
      • validateSQL

        protected void validateSQL​(java.lang.String query)
        Validate that the user provided SQL.
      • setFlushMode

        public void setFlushMode​(jakarta.persistence.FlushModeType flushMode)
        Specified by:
        setFlushMode in interface jakarta.persistence.EntityManager
      • getFlushMode

        public jakarta.persistence.FlushModeType getFlushMode()
        Specified by:
        getFlushMode in interface jakarta.persistence.EntityManager
      • prepareForPooling

        @Deprecated
        public void prepareForPooling()
        Deprecated.
        - use clear() instead.
        Used by Java EE Containers that wish to pool OpenJPA EntityManagers. The specification doesn't allow the closing of connections with the clear() method. By introducing this new method, we can do additional processing (and maybe more efficient processing) to properly prepare an EM for pooling.
      • clear

        public void clear()
        Specified by:
        clear in interface jakarta.persistence.EntityManager
      • getDelegate

        public java.lang.Object getDelegate()
        Specified by:
        getDelegate in interface jakarta.persistence.EntityManager
      • getLockMode

        public jakarta.persistence.LockModeType getLockMode​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager
        Return the lock mode of the given instance, or null if not locked.
        Specified by:
        getLockMode in interface jakarta.persistence.EntityManager
        Specified by:
        getLockMode in interface OpenJPAEntityManager
      • lock

        public void lock​(java.lang.Object entity,
                         jakarta.persistence.LockModeType mode)
        Specified by:
        lock in interface jakarta.persistence.EntityManager
      • lock

        public void lock​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instance is locked at the current lock level, as set in the FetchPlan for the entity manager.
        Specified by:
        lock in interface OpenJPAEntityManager
      • lock

        public void lock​(java.lang.Object entity,
                         jakarta.persistence.LockModeType mode,
                         int timeout)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instance is locked at the given lock level.
        Specified by:
        lock in interface OpenJPAEntityManager
        Parameters:
        entity - the object to lock
        mode - the lock level to use
        timeout - the number of milliseconds to wait for the lock before giving up, or -1 for no limit
      • lock

        public void lock​(java.lang.Object entity,
                         jakarta.persistence.LockModeType mode,
                         java.util.Map<java.lang.String,​java.lang.Object> properties)
        Specified by:
        lock in interface jakarta.persistence.EntityManager
      • lockAll

        public void lockAll​(java.util.Collection entities)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instances are locked at the current lock level, as set in the FetchPlan for the entity manager.
        Specified by:
        lockAll in interface OpenJPAEntityManager
      • lockAll

        public void lockAll​(java.util.Collection entities,
                            jakarta.persistence.LockModeType mode,
                            int timeout)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instances are locked at the given lock level.
        Specified by:
        lockAll in interface OpenJPAEntityManager
        Parameters:
        entities - the objects to lock
        mode - the lock level to use
        timeout - the number of milliseconds to wait for the lock before giving up, or -1 for no limit
      • lockAll

        public void lockAll​(java.lang.Object... entities)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instances are locked at the current lock level, as set in the FetchPlan for the entity manager.
        Specified by:
        lockAll in interface OpenJPAEntityManager
      • lockAll

        public void lockAll​(java.lang.Object[] entities,
                            jakarta.persistence.LockModeType mode,
                            int timeout)
        Description copied from interface: OpenJPAEntityManager
        Ensure that the given instances are locked at the given lock level.
        Specified by:
        lockAll in interface OpenJPAEntityManager
        Parameters:
        entities - the objects to lock
        mode - the lock level to use
        timeout - the number of milliseconds to wait for the lock before giving up, or -1 for no limit
      • cancelAll

        public boolean cancelAll()
        Description copied from interface: OpenJPAEntityManager
        Cancel all pending data store statements. If statements are cancelled while a flush is in progress, the transaction rollback only flag will be set.
        Specified by:
        cancelAll in interface OpenJPAEntityManager
        Returns:
        true if any statements were cancelled, false otherwise
      • getOrderDirtyObjects

        public boolean getOrderDirtyObjects()
        Description copied from interface: OpenJPAEntityManager
        Whether dirty objects will be returned in the order they were dirtied. Default is determined by the store manager.
        Specified by:
        getOrderDirtyObjects in interface OpenJPAEntityManager
      • setOrderDirtyObjects

        public void setOrderDirtyObjects​(boolean order)
        Description copied from interface: OpenJPAEntityManager
        Whether dirty objects will be returned in the order they were dirtied. Default is determined by the store manager.
        Specified by:
        setOrderDirtyObjects in interface OpenJPAEntityManager
      • getPersistedClasses

        public java.util.Collection<java.lang.Class> getPersistedClasses()
        Description copied from interface: OpenJPAEntityManager
        Return the set of classes that have been made persistent in the current transaction.
        Specified by:
        getPersistedClasses in interface OpenJPAEntityManager
      • getUpdatedClasses

        public java.util.Collection<java.lang.Class> getUpdatedClasses()
        Description copied from interface: OpenJPAEntityManager
        Return the set of classes for objects that have been modified in the current transaction.
        Specified by:
        getUpdatedClasses in interface OpenJPAEntityManager
      • getRemovedClasses

        public java.util.Collection<java.lang.Class> getRemovedClasses()
        Description copied from interface: OpenJPAEntityManager
        Return the set of classes that have been deleted in the current transaction.
        Specified by:
        getRemovedClasses in interface OpenJPAEntityManager
      • createInstance

        public <T> T createInstance​(java.lang.Class<T> cls)
        Description copied from interface: OpenJPAEntityManager
        Create a new instance of type cls. If cls is an interface or an abstract class whose abstract methods follow the JavaBeans convention, this method will create a concrete implementation according to the metadata that defines the class. If cls is a non-final concrete type that has metadata but does not implement PersistenceCapable, this method will create a subclass of the type that does implement PersistenceCapable, and will attempt to redefine the methods in cls to enable persistent attribute tracking. Otherwise, if cls is a managed type, this will return an instance of the specified class.
        Specified by:
        createInstance in interface OpenJPAEntityManager
      • close

        public void close()
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface jakarta.persistence.EntityManager
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface jakarta.persistence.EntityManager
      • dirty

        public void dirty​(java.lang.Object o,
                          java.lang.String field)
        Description copied from interface: OpenJPAEntityManager
        Make the named field of the given object dirty.
        Specified by:
        dirty in interface OpenJPAEntityManager
      • isDetached

        public boolean isDetached​(java.lang.Object entity)
        Description copied from interface: OpenJPAEntityManager
        Returns true if pc is a detached object (one that can be reattached to a EntityManager via a call to EntityManager.merge(T)); otherwise returns false.
        Specified by:
        isDetached in interface OpenJPAEntityManager
      • assertNotCloseInvoked

        protected void assertNotCloseInvoked()
        Throw appropriate exception if close has been invoked but the broker is still open. We test only for this because if the broker is already closed, it will throw its own more informative exception when we delegate the pending operation to it.
      • processArgument

        public java.lang.Object processArgument​(java.lang.Object arg)
        Description copied from interface: FindCallbacks
        Process find argument. Throw proper OpenJPAException for illegal value.
        Specified by:
        processArgument in interface FindCallbacks
        Returns:
        the id to look up, or null to ignore this argument
      • processArgument

        public int processArgument​(int op,
                                   java.lang.Object obj,
                                   OpenJPAStateManager sm)
        Description copied from interface: OpCallbacks
        Process operation argument. Throw proper OpenJPAException for illegal value.
        Specified by:
        processArgument in interface OpCallbacks
        Parameters:
        op - the operation constant
        obj - the object passed to the operation
        sm - the argument's state manager, or null if none
        Returns:
        the action to take on the argument
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • setProperties

        public void setProperties​(java.util.Map<java.lang.String,​java.lang.Object> emEmptyPropsProperties)
      • detach

        public void detach​(java.lang.Object entity)
        Specified by:
        detach in interface jakarta.persistence.EntityManager
      • createQuery

        public <T> jakarta.persistence.TypedQuery<T> createQuery​(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
        Create a query from the given CritriaQuery. Compile to register the parameters in this query.
        Specified by:
        createQuery in interface jakarta.persistence.EntityManager
      • createQuery

        public jakarta.persistence.Query createQuery​(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
        Specified by:
        createQuery in interface jakarta.persistence.EntityManager
      • createQuery

        public jakarta.persistence.Query createQuery​(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
        Specified by:
        createQuery in interface jakarta.persistence.EntityManager
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        Get the properties used currently by this entity manager. The property keys and their values are harvested from kernel artifacts namely the Broker and FetchPlan by reflection. These property keys and values that denote the bean properties/values of the kernel artifacts are converted to the original keys/values that user used to set the properties.
        Specified by:
        getProperties in interface jakarta.persistence.EntityManager
      • unwrap

        public <T> T unwrap​(java.lang.Class<T> cls)
        Unwraps this receiver to an instance of the given class, if possible.
        Specified by:
        unwrap in interface jakarta.persistence.EntityManager
      • setQuerySQLCache

        public void setQuerySQLCache​(boolean flag)
        Description copied from interface: OpenJPAEntityManagerSPI
        Sets whether this receiver will cache database queries during its lifetime. The cache configured at BrokerFactory level is not affected by setting it inactive for this receiver.
        Specified by:
        setQuerySQLCache in interface OpenJPAEntityManagerSPI
      • getMetamodel

        public jakarta.persistence.metamodel.Metamodel getMetamodel()
        Specified by:
        getMetamodel in interface jakarta.persistence.EntityManager
      • createEntityGraph

        public <T> jakarta.persistence.EntityGraph<T> createEntityGraph​(java.lang.Class<T> rootType)
        Specified by:
        createEntityGraph in interface jakarta.persistence.EntityManager
      • createEntityGraph

        public jakarta.persistence.EntityGraph<?> createEntityGraph​(java.lang.String graphName)
        Specified by:
        createEntityGraph in interface jakarta.persistence.EntityManager
      • getEntityGraph

        public jakarta.persistence.EntityGraph<?> getEntityGraph​(java.lang.String graphName)
        Specified by:
        getEntityGraph in interface jakarta.persistence.EntityManager
      • getEntityGraphs

        public <T> java.util.List<jakarta.persistence.EntityGraph<? super T>> getEntityGraphs​(java.lang.Class<T> entityClass)
        Specified by:
        getEntityGraphs in interface jakarta.persistence.EntityManager
      • setProperty

        public void setProperty​(java.lang.String prop,
                                java.lang.Object value)
        Sets the given property to the given value, reflectively. The property key is transposed to a bean-style property. The value is converted to a type consumable by the kernel. After requisite transformation, if the value can not be set on either this instance or its fetch plan by reflection, then an warning message (not an exception as per JPA specification) is issued.
        Specified by:
        setProperty in interface jakarta.persistence.EntityManager