Interface BaseEntityManagerHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clears the underlying EntityManager
      com.querydsl.jpa.impl.JPADeleteClause delete​(com.querydsl.core.types.EntityPath<?> entity)
      Returns a delete clause
      void detach​(IEntity entity)
      Detaches the given entity from the underlying EntityManager
      <E extends IEntity>
      E
      find​(Class<E> entityClass, Long id)
      Finds the given entity by id
      void flush()
      Flushes the underlying EntityManager
      DBQuery<?> from​(com.querydsl.core.types.EntityPath<?>... from)
      Creates a new query, assigning the from clause
      DBQuery<?> fromCacheable​(com.querydsl.core.types.EntityPath<?> from)
      Creates a new query, expecting the given entity is @Cacheable(true).
      void persist​(IEntity entity)
      Persists the given entity
      void persist​(IEntity entity, boolean flush)
      Persists the given entity, optionally flushing the underlying entity manager
      <E extends IEntity>
      E
      refresh​(E entity)
      Refreshes the current state of the given entity, returning the updated instance.
      void remove​(IEntity entity)
      Removes the given entity, flushing the underlying entity manager
      void remove​(IEntity entity, boolean flush)
      Removes the given entity, optionally flushing the underlying entity manager
      <T> DBQuery<T> selectFrom​(com.querydsl.core.types.EntityPath<T> from)
      Creates a new query, assigning the from clause and select clauses
      <T> DBQuery<T> selectFromCacheable​(com.querydsl.core.types.EntityPath<T> from)
      Both selectFrom(EntityPath) and fromCacheable(EntityPath) Use with caution, as joining other entities may leave invalid data on cache.
      DBQuery<?> subQuery​(com.querydsl.core.types.EntityPath<?>... from)
      Creates a new subquery, assigning the from clause
      com.querydsl.jpa.impl.JPAUpdateClause update​(com.querydsl.core.types.EntityPath<?> entity)
      Returns an update clause
    • Method Detail

      • clear

        void clear()
        Clears the underlying EntityManager
      • delete

        com.querydsl.jpa.impl.JPADeleteClause delete​(com.querydsl.core.types.EntityPath<?> entity)
        Returns a delete clause
      • detach

        void detach​(IEntity entity)
        Detaches the given entity from the underlying EntityManager
      • flush

        void flush()
        Flushes the underlying EntityManager
      • from

        DBQuery<?> from​(com.querydsl.core.types.EntityPath<?>... from)
        Creates a new query, assigning the from clause
      • fromCacheable

        DBQuery<?> fromCacheable​(com.querydsl.core.types.EntityPath<?> from)
        Creates a new query, expecting the given entity is @Cacheable(true). Use with caution, as joining other entities may leave invalid data on cache.
      • persist

        void persist​(IEntity entity)
        Persists the given entity
      • persist

        void persist​(IEntity entity,
                     boolean flush)
        Persists the given entity, optionally flushing the underlying entity manager
      • refresh

        <E extends IEntity> E refresh​(E entity)
        Refreshes the current state of the given entity, returning the updated instance. If the underlying EntityManager contains the given entity, will directly refresh it and return the same instance. Otherwise, will find the entity by id.
      • selectFrom

        <T> DBQuery<T> selectFrom​(com.querydsl.core.types.EntityPath<T> from)
        Creates a new query, assigning the from clause and select clauses
      • subQuery

        DBQuery<?> subQuery​(com.querydsl.core.types.EntityPath<?>... from)
        Creates a new subquery, assigning the from clause
      • update

        com.querydsl.jpa.impl.JPAUpdateClause update​(com.querydsl.core.types.EntityPath<?> entity)
        Returns an update clause