Class JmixEntityManager

java.lang.Object
io.jmix.eclipselink.impl.JmixEntityManager
All Implemented Interfaces:
jakarta.persistence.EntityManager, AutoCloseable

public class JmixEntityManager extends Object implements jakarta.persistence.EntityManager
  • Constructor Details

    • JmixEntityManager

      public JmixEntityManager(jakarta.persistence.EntityManager delegate, org.springframework.beans.factory.ListableBeanFactory beanFactory)
  • Method Details

    • persist

      public void persist(Object entity)
      Specified by:
      persist in interface jakarta.persistence.EntityManager
    • merge

      public <T> T merge(T object)
      Specified by:
      merge in interface jakarta.persistence.EntityManager
    • remove

      public void remove(Object entity)
      Specified by:
      remove in interface jakarta.persistence.EntityManager
    • find

      @Nullable public <T> T find(Class<T> entityClass, Object primaryKey)
      Specified by:
      find in interface jakarta.persistence.EntityManager
    • find

      @Nullable public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,Object> properties)
      Specified by:
      find in interface jakarta.persistence.EntityManager
    • find

      @Nullable public <T> T find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode)
      Specified by:
      find in interface jakarta.persistence.EntityManager
    • find

      @Nullable public <T> T find(Class<T> entityClass, Object primaryKey, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
      Specified by:
      find in interface jakarta.persistence.EntityManager
    • getReference

      public <T> T getReference(Class<T> entityClass, Object primaryKey)
      Specified by:
      getReference in interface jakarta.persistence.EntityManager
    • flush

      public void flush()
      Specified by:
      flush in interface jakarta.persistence.EntityManager
    • 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
    • lock

      public void lock(Object entity, jakarta.persistence.LockModeType lockMode)
      Specified by:
      lock in interface jakarta.persistence.EntityManager
    • lock

      public void lock(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
      Specified by:
      lock in interface jakarta.persistence.EntityManager
    • refresh

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

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

      public void refresh(Object entity, jakarta.persistence.LockModeType lockMode)
      Specified by:
      refresh in interface jakarta.persistence.EntityManager
    • refresh

      public void refresh(Object entity, jakarta.persistence.LockModeType lockMode, Map<String,Object> properties)
      Specified by:
      refresh in interface jakarta.persistence.EntityManager
    • clear

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

      public void detach(Object entity)
      Specified by:
      detach in interface jakarta.persistence.EntityManager
    • contains

      public boolean contains(Object entity)
      Specified by:
      contains in interface jakarta.persistence.EntityManager
    • getLockMode

      public jakarta.persistence.LockModeType getLockMode(Object entity)
      Specified by:
      getLockMode in interface jakarta.persistence.EntityManager
    • setProperty

      public void setProperty(String propertyName, @Nullable Object value)
      Specified by:
      setProperty in interface jakarta.persistence.EntityManager
    • getProperties

      public Map<String,Object> getProperties()
      Specified by:
      getProperties in interface jakarta.persistence.EntityManager
    • createQuery

      public jakarta.persistence.Query createQuery(String qlString)
      Specified by:
      createQuery in interface jakarta.persistence.EntityManager
    • createQuery

      public <T> jakarta.persistence.TypedQuery<T> createQuery(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
      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
    • createQuery

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

      public jakarta.persistence.Query createNamedQuery(String name)
      Specified by:
      createNamedQuery in interface jakarta.persistence.EntityManager
    • createNamedQuery

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

      public jakarta.persistence.Query createNativeQuery(String sqlString)
      Specified by:
      createNativeQuery in interface jakarta.persistence.EntityManager
    • createNativeQuery

      public jakarta.persistence.Query createNativeQuery(String sqlString, Class resultClass)
      Specified by:
      createNativeQuery in interface jakarta.persistence.EntityManager
    • createNativeQuery

      public jakarta.persistence.Query createNativeQuery(String sqlString, String resultSetMapping)
      Specified by:
      createNativeQuery in interface jakarta.persistence.EntityManager
    • createNamedStoredProcedureQuery

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

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

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

      public jakarta.persistence.StoredProcedureQuery createStoredProcedureQuery(String procedureName, String... resultSetMappings)
      Specified by:
      createStoredProcedureQuery in interface jakarta.persistence.EntityManager
    • joinTransaction

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

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

      public <T> T unwrap(Class<T> cls)
      Specified by:
      unwrap in interface jakarta.persistence.EntityManager
    • getDelegate

      public Object getDelegate()
      Specified by:
      getDelegate in interface jakarta.persistence.EntityManager
    • close

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

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

      public jakarta.persistence.EntityTransaction getTransaction()
      Specified by:
      getTransaction in interface jakarta.persistence.EntityManager
    • getEntityManagerFactory

      public jakarta.persistence.EntityManagerFactory getEntityManagerFactory()
      Specified by:
      getEntityManagerFactory in interface jakarta.persistence.EntityManager
    • getCriteriaBuilder

      public jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
      Specified by:
      getCriteriaBuilder in interface jakarta.persistence.EntityManager
    • getMetamodel

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

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

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

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

      public <T> List<jakarta.persistence.EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
      Specified by:
      getEntityGraphs in interface jakarta.persistence.EntityManager
    • findOrCreate

      protected <T> T findOrCreate(Class<T> entityClass, Object id)
    • deepCopyIgnoringNulls

      protected void deepCopyIgnoringNulls(Object source, Object dest, Set<Object> visited)
      Copies all property values from source to dest excluding null values.
    • setAdditionalProperties

      protected void setAdditionalProperties()