Interface CollectionInitializer

All Known Implementing Classes:
AbstractCollectionInitializer, AbstractEntityDocsCollectionInitializer, DefaultCollectionInitializer, EntityDocsCollectionInitializer, EntityDocsFolderCollectionInitializer, EntityDocsRootFolderCollectionInitializer, NodeChildrenCollectionInitializer, PrivilegedCollectionInitializer

public interface CollectionInitializer
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    countCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id)
     
    List<?>
    getCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id, Pagination pagination, @Nullable Ordering ordering)
     
     
    boolean
    supports(Object entity, jakarta.persistence.metamodel.Attribute<?,?> collectionName)
     
  • Method Details

    • supports

      boolean supports(Object entity, jakarta.persistence.metamodel.Attribute<?,?> collectionName)
      Returns:
      true if this CollectionInitializer supports resolving this relation
    • getCollectionElements

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

      long countCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?,?> collection, Serializable id)
      Returns:
      the number of persisted collection elements
    • priority

      Integer priority()
      Returns:
      the priority in case multiple CollectionInitializer can resolve a relation