Class AbstractEntityDocsCollectionInitializer
java.lang.Object
ch.tocco.nice2.persist.core.api.hibernate.interceptor.AbstractCollectionInitializer
ch.tocco.nice2.dms.impl.entitydocs.interceptor.AbstractEntityDocsCollectionInitializer
- All Implemented Interfaces:
CollectionInitializer
- Direct Known Subclasses:
EntityDocsCollectionInitializer
,EntityDocsFolderCollectionInitializer
Provides base functionality for entity docs collection initializer:
Checks the permission of the owner entity and if granted load the collection
in privileged mode.
-
Field Summary
Fields inherited from class ch.tocco.nice2.persist.core.api.hibernate.interceptor.AbstractCollectionInitializer
dataModel, persistService
-
Constructor Summary
ConstructorDescriptionAbstractEntityDocsCollectionInitializer
(PersistenceService persistService, DataModel dataModel, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptionlong
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, Ordering ordering) protected boolean
isResourceCollection
(jakarta.persistence.metamodel.Attribute<?, ?> collection) Methods inherited from class ch.tocco.nice2.persist.core.api.hibernate.interceptor.AbstractCollectionInitializer
createQueryBuilder, doCountCollectionElements, doGetCollectionElements, modifyDefaultQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.hibernate.interceptor.CollectionInitializer
priority, supports
-
Field Details
-
securityManager
-
-
Constructor Details
-
AbstractEntityDocsCollectionInitializer
public AbstractEntityDocsCollectionInitializer(PersistenceService persistService, DataModel dataModel, SecurityManager securityManager)
-
-
Method Details
-
getCollectionElements
public List<?> getCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?, ?> collection, Serializable id, Pagination pagination, Ordering ordering) - Specified by:
getCollectionElements
in interfaceCollectionInitializer
- Overrides:
getCollectionElements
in classAbstractCollectionInitializer
- Returns:
- the collection elements of a specific relation
-
countCollectionElements
public long countCollectionElements(jakarta.persistence.metamodel.EntityType<?> entityType, jakarta.persistence.metamodel.Attribute<?, ?> collection, Serializable id) - Specified by:
countCollectionElements
in interfaceCollectionInitializer
- Overrides:
countCollectionElements
in classAbstractCollectionInitializer
- Returns:
- the number of persisted collection elements
-
isResourceCollection
protected boolean isResourceCollection(jakarta.persistence.metamodel.Attribute<?, ?> collection)
-