Package cz.encircled.joiner.core
Class Joiner
java.lang.Object
cz.encircled.joiner.core.Joiner
Base class of Joiner. Contains basic database operations.
In spring-based environment can be instantiated using spring JoinerConfiguration.
For repository-per-entity approach this class should not be accessed directly. Instead, repositories may implement JoinerRepository.
- Author:
- Kisel on 26.01.2016.
-
Constructor Summary
ConstructorsConstructorDescriptionJoiner(jakarta.persistence.EntityManager entityManager) Joiner(jakarta.persistence.EntityManager entityManager, JoinerProperties joinerProperties) -
Method Summary
Modifier and TypeMethodDescription<T,R> List<R> find(JoinerQuery<T, R> request) Execute a query and return the List of results.<T,R> R findOne(JoinerQuery<T, R> request) Execute a query and return a result or null.<T,R> Stream<R> findStream(JoinerQuery<T, R> request) Execute a query and stream results using JPA streaming.<T,R> void preprocessRequestQuery(JoinerQuery<T, R> request) <I,T extends Collection<I>>
Tsave(T entities) voidsetJoinerProperties(JoinerProperties joinerProperties) voidsetJoinGraphRegistry(JoinGraphRegistry joinGraphRegistry) <T,R> JoinerJpaQuery toJPAQuery(JoinerQuery<T, R> request) withProperties(JoinerProperties props)
-
Constructor Details
-
Joiner
public Joiner(jakarta.persistence.EntityManager entityManager) -
Joiner
-
-
Method Details
-
withProperties
-
findOne
Execute a query and return a result or null. -
find
Execute a query and return the List of results. -
findStream
Execute a query and stream results using JPA streaming. Fetch size is configured using a hint org.hibernate.fetchSize (HibernateHints.HINT_FETCH_SIZE)
Using streaming disables caching and auto-flush for the query.
JPA streaming is supported only by Hibernate ORM. -
save
-
save
public <T> T save(T entity) -
toJPAQuery
-
preprocessRequestQuery
-
setJoinGraphRegistry
-
getJoinerProperties
-
setJoinerProperties
-