Class AbstractCollectionInitializer

java.lang.Object
ch.tocco.nice2.persist.core.api.hibernate.interceptor.AbstractCollectionInitializer
All Implemented Interfaces:
CollectionInitializer
Direct Known Subclasses:
AbstractEntityDocsCollectionInitializer, DefaultCollectionInitializer, EntityDocsRootFolderCollectionInitializer, NodeChildrenCollectionInitializer, PrivilegedCollectionInitializer

public abstract class AbstractCollectionInitializer extends Object implements CollectionInitializer
Abstract implementation od CollectionInitializer which resolves a collection by using the reverse relation name.
  • Field Details

  • Constructor Details

  • Method Details

    • getCollectionElements

      public List<?> getCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id, Pagination pagination, @Nullable @Nullable Ordering ordering)
      Specified by:
      getCollectionElements in interface CollectionInitializer
      Returns:
      the collection elements of a specific relation
    • doGetCollectionElements

      protected List<?> doGetCollectionElements(CriteriaQueryBuilder<?,?,?> queryBuilder, Pagination pagination, @Nullable @Nullable Ordering ordering)
    • countCollectionElements

      public long countCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id)
      Specified by:
      countCollectionElements in interface CollectionInitializer
      Returns:
      the number of persisted collection elements
    • doCountCollectionElements

      protected long doCountCollectionElements(CountQueryBuilder queryBuilder)
    • createQueryBuilder

      protected <T extends QueryBuilderBase<?, ?>> T createQueryBuilder(Function<Class<? extends Entity>,T> builderProvider, jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id)
    • modifyDefaultQuery

      protected void modifyDefaultQuery(QueryBuilderBase<?,?> queryBuilder)