public interface BaseEntityManagerHandler
EntityManager and EntityManagerFactory access| Modifier and Type | Method and 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> |
find(java.lang.Class<E> entityClass,
java.lang.Long id)
Finds the given entity by id
|
void |
flush()
Flushes the underlying
EntityManager |
org.cyclos.impl.utils.persistence.DBQuery<?> |
from(com.querydsl.core.types.EntityPath<?>... from)
Creates a new query, assigning the from clause
|
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> |
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> org.cyclos.impl.utils.persistence.DBQuery<T> |
selectFrom(com.querydsl.core.types.EntityPath<T> from)
Creates a new query, assigning the from clause and select clauses
|
org.cyclos.impl.utils.persistence.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
|
void clear()
EntityManagercom.querydsl.jpa.impl.JPADeleteClause delete(com.querydsl.core.types.EntityPath<?> entity)
void detach(IEntity entity)
<E extends IEntity> E find(java.lang.Class<E> entityClass, java.lang.Long id) throws EntityNotFoundException
EntityNotFoundExceptionvoid flush()
EntityManagerorg.cyclos.impl.utils.persistence.DBQuery<?> from(com.querydsl.core.types.EntityPath<?>... from)
void persist(IEntity entity)
void persist(IEntity entity, boolean flush)
<E extends IEntity> E refresh(E entity)
EntityManager contains the given entity, will directly refresh it and return the same
instance. Otherwise, will find the entity by id.void remove(IEntity entity) throws ConstraintViolatedOnRemoveException
void remove(IEntity entity, boolean flush) throws ConstraintViolatedOnRemoveException
<T> org.cyclos.impl.utils.persistence.DBQuery<T> selectFrom(com.querydsl.core.types.EntityPath<T> from)
org.cyclos.impl.utils.persistence.DBQuery<?> subQuery(com.querydsl.core.types.EntityPath<?>... from)
com.querydsl.jpa.impl.JPAUpdateClause update(com.querydsl.core.types.EntityPath<?> entity)