Class JmixEntityManager

java.lang.Object
io.jmix.eclipselink.impl.JmixEntityManager
All Implemented Interfaces:
javax.persistence.EntityManager

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

    • JmixEntityManager

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

    • persist

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

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

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

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

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

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

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

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

      public void flush()
      Specified by:
      flush in interface javax.persistence.EntityManager
    • setFlushMode

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

      public javax.persistence.FlushModeType getFlushMode()
      Specified by:
      getFlushMode in interface javax.persistence.EntityManager
    • lock

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

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

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

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

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

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

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

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

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

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

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

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

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

      public <T> javax.persistence.TypedQuery<T> createQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery)
      Specified by:
      createQuery in interface javax.persistence.EntityManager
    • createQuery

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public <T> List<javax.persistence.EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
      Specified by:
      getEntityGraphs in interface javax.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()