Interface FolderRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware
,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
,org.springframework.data.repository.Repository<D,
,String> com.broadleafcommerce.data.tracking.core.TrackableRepository<D>
,com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
- All Known Subinterfaces:
JpaFolderRepository<D>
@NoRepositoryBean
public interface FolderRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
Repository
for persistent counter-parts of Folders
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByParentFolderContextId
(String folderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns whether or not there are any folders withfolderId
as theirFolder.parentFolderId
.org.springframework.data.domain.Page<D>
findAllByContextIdIn
(List<String> folderContextIdList, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves a paged list of folders whose context IDs match any of the given IDs.org.springframework.data.domain.Page<D>
findAllByNameContainingIgnoreCase
(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves a paged list of all Folders in the database, optionally filtered by name.org.springframework.data.domain.Page<D>
findAllByParentFolderContextId
(String parentFolderContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns the children folders of the given folder by finding all of the folders whose parent folder context ID matches the given ID.org.springframework.data.domain.Page<D>
findAllByParentFolderContextIdIsNull
(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns all root folders.Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository
archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor
exists, findAll, findAll, findAll, findAll
-
Method Details
-
findAllByNameContainingIgnoreCase
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCase(@NonNull String nameQuery, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves a paged list of all Folders in the database, optionally filtered by name.- Parameters:
nameQuery
- the name to search for (optional)filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.pageInfo
- pagination informationcontextInfo
- the context to perform the operation in- Returns:
- the requested page of folders from the result of the query
-
findAllByContextIdIn
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByContextIdIn(@NonNull List<String> folderContextIdList, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves a paged list of folders whose context IDs match any of the given IDs.- Parameters:
folderContextIdList
- the context IDs to query forpageInfo
- pagination informationcontextInfo
- the context to perform the operation in- Returns:
- a paged list of folders whose context IDs match any of the given IDs
-
findAllByParentFolderContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByParentFolderContextId(@NonNull String parentFolderContextId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns the children folders of the given folder by finding all of the folders whose parent folder context ID matches the given ID.- Parameters:
filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.pageInfo
- pagination informationcontextInfo
- the context to perform the operation in- Returns:
- the children folders of the folder with the given context ID
-
findAllByParentFolderContextIdIsNull
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByParentFolderContextIdIsNull(@Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns all root folders.- Parameters:
filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.pageInfo
- pagination informationcontextInfo
- the context to perform the operation in- Returns:
- the children folders of the folder with the given context ID
-
existsByParentFolderContextId
@Policy(operationTypes=READ) boolean existsByParentFolderContextId(@NonNull String folderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns whether or not there are any folders withfolderId
as theirFolder.parentFolderId
. Essentially, this determines if there are any subfolders directly in the given folder.- Parameters:
folderId
- the context ID of the parent folder to search forcontextInfo
- the context surrounding sandboxing and mulitenant state- Returns:
- whether or not there are any folders with
folderId
as theirFolder.parentFolderId
-