Class Joiner

java.lang.Object
cz.encircled.joiner.core.Joiner

public class Joiner extends Object
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 Details

    • Joiner

      public Joiner(jakarta.persistence.EntityManager entityManager)
    • Joiner

      public Joiner(jakarta.persistence.EntityManager entityManager, JoinerProperties joinerProperties)
  • Method Details

    • withProperties

      public Joiner withProperties(JoinerProperties props)
    • findOne

      public <T, R> R findOne(JoinerQuery<T,R> request)
      Execute a query and return a result or null.
    • find

      public <T, R> List<R> find(JoinerQuery<T,R> request)
      Execute a query and return the List of results.
    • findStream

      public <T, R> Stream<R> findStream(JoinerQuery<T,R> request)

      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

      public <I, T extends Collection<I>> T save(T entities)
    • save

      public <T> T save(T entity)
    • toJPAQuery

      public <T, R> JoinerJpaQuery toJPAQuery(JoinerQuery<T,R> request)
    • preprocessRequestQuery

      public <T, R> void preprocessRequestQuery(JoinerQuery<T,R> request)
    • setJoinGraphRegistry

      public void setJoinGraphRegistry(JoinGraphRegistry joinGraphRegistry)
    • getJoinerProperties

      public JoinerProperties getJoinerProperties()
    • setJoinerProperties

      public void setJoinerProperties(JoinerProperties joinerProperties)