Interface BaseEntityManagerHandler
-
- All Known Subinterfaces:
EntityManagerHandler,RawEntityManagerHandler
public interface BaseEntityManagerHandlerHandler forEntityManagerandEntityManagerFactoryaccess
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the underlyingEntityManagercom.querydsl.jpa.impl.JPADeleteClausedelete(com.querydsl.core.types.EntityPath<?> entity)Returns a delete clausevoiddetach(IEntity entity)Detaches the given entity from the underlying EntityManager<E extends IEntity>
Efind(Class<E> entityClass, Long id)Finds the given entity by idvoidflush()Flushes the underlyingEntityManagerDBQuery<?>from(com.querydsl.core.types.EntityPath<?>... from)Creates a new query, assigning the from clauseDBQuery<?>fromCacheable(com.querydsl.core.types.EntityPath<?> from)Creates a new query, expecting the given entity is@Cacheable(true).voidpersist(IEntity entity)Persists the given entityvoidpersist(IEntity entity, boolean flush)Persists the given entity, optionally flushing the underlying entity manager<E extends IEntity>
Erefresh(E entity)Refreshes the current state of the given entity, returning the updated instance.voidremove(IEntity entity)Removes the given entity, flushing the underlying entity managervoidremove(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)BothselectFrom(EntityPath)andfromCacheable(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 clausecom.querydsl.jpa.impl.JPAUpdateClauseupdate(com.querydsl.core.types.EntityPath<?> entity)Returns an update clause
-
-
-
Method Detail
-
clear
void clear()
Clears the underlyingEntityManager
-
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
-
find
<E extends IEntity> E find(Class<E> entityClass, Long id) throws EntityNotFoundException
Finds the given entity by id- Throws:
EntityNotFoundException
-
flush
void flush()
Flushes the underlyingEntityManager
-
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 underlyingEntityManagercontains the given entity, will directly refresh it and return the same instance. Otherwise, will find the entity by id.
-
remove
void remove(IEntity entity) throws ConstraintViolatedOnRemoveException
Removes the given entity, flushing the underlying entity manager
-
remove
void remove(IEntity entity, boolean flush) throws ConstraintViolatedOnRemoveException
Removes the given entity, optionally flushing the underlying entity manager
-
selectFrom
<T> DBQuery<T> selectFrom(com.querydsl.core.types.EntityPath<T> from)
Creates a new query, assigning the from clause and select clauses
-
selectFromCacheable
<T> DBQuery<T> selectFromCacheable(com.querydsl.core.types.EntityPath<T> from)
BothselectFrom(EntityPath)andfromCacheable(EntityPath)Use with caution, as joining other entities may leave invalid data on cache.
-
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
-
-