Interface ProductTagRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Superinterfaces:
CustomizedProductTagRepository<D>
,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:
JpaProductTagRepository<D>
@NoRepositoryBean
public interface ProductTagRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizedProductTagRepository<D>
Handles persistence operations for
ProductTags
.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByProductContextId
(String productContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductContextId
.findAllByProductContextIdAndVariantIdIsNull
(String productContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductContextId
that have no variant ID.findAllByProductContextIdIn
(Iterable<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
.findAllByProductContextIdInAndTagContextIdIn
(Iterable<String> productContextIds, Iterable<String> tagContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
and matchingtagContextIds
.findAllByTagContextIdIn
(Iterable<String> tagContextIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingtagContextIds
.findByProductContextIdAndContextId
(String productContextId, String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent product's and the product tag's IDs.findByProductContextIdAndTagContextId
(String productContextId, String tagContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find the product tag with matchingproductContextId
andtagContextId
.findByTagContextIdAndContextId
(String tagContextId, String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent tag's and the product tag's IDs.org.springframework.data.domain.Page<D>
findByVariantId
(String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find product tags by variant IDfindByVariantIdAndContextId
(String variantId, String tagId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a product tag by variant ID and tag idorg.springframework.data.domain.Page<D>
findPageByProductContextId
(String productContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextId
.org.springframework.data.domain.Page<D>
findPageByProductContextIdAndVariantId
(String productId, String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find tags by the product and variant IDorg.springframework.data.domain.Page<D>
findPageByProductContextIdAndVariantIdIsNull
(String productContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextId
and a null variant ID.org.springframework.data.domain.Page<D>
findPageByProductContextIdIn
(Iterable<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
.org.springframework.data.domain.Page<D>
findPageByTagContextId
(String tagContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingtagContextId
.org.springframework.data.domain.Page<D>
findPageByTagContextIdAndVariantIdIsNotNull
(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page of product tags by the tag ID, excluding variant associated tags.org.springframework.data.domain.Page<D>
findPageByTagContextIdAndVariantIdIsNull
(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page of product tags by the tag ID, excluding variant associated tags.Methods inherited from interface com.broadleafcommerce.catalog.repository.tag.CustomizedProductTagRepository
countNonProductionRecordsByProductIdsInTenant, findAllByProductContextIdAndIsSorted, findAllByProductContextIdAndIsSortedAndVariantIdIsNull, findAllByVariantIdAndSorted
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
-
findPageByTagContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByTagContextId(String tagContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingtagContextId
.- Parameters:
tagContextId
- The contextId to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
tagContextId
.
-
findPageByProductContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByProductContextId(String productContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextId
. Note that this method will return tag values for both variants and products.- Parameters:
productContextId
- The contextId to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextId
.
-
findPageByProductContextIdAndVariantIdIsNull
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByProductContextIdAndVariantIdIsNull(String productContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextId
and a null variant ID.- Parameters:
productContextId
- The contextId to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextId
.
-
findAllByProductContextId
@Policy(operationTypes=READ) List<D> findAllByProductContextId(String productContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductContextId
.- Parameters:
productContextId
- The id to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextId
.
-
findAllByProductContextIdAndVariantIdIsNull
@Policy(operationTypes=READ) List<D> findAllByProductContextIdAndVariantIdIsNull(String productContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the product tags with matchingproductContextId
that have no variant ID.- Parameters:
productContextId
- The id to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextId
.
-
findByProductContextIdAndTagContextId
@Policy(operationTypes=READ) Optional<D> findByProductContextIdAndTagContextId(String productContextId, String tagContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find the product tag with matchingproductContextId
andtagContextId
.- Parameters:
productContextId
- The product contextId to matchtagContextId
- The tag contextId to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextId
andtagContextId
.
-
findAllByTagContextIdIn
@Policy(operationTypes=READ) List<D> findAllByTagContextIdIn(Iterable<String> tagContextIds, cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingtagContextIds
.- Parameters:
tagContextIds
- The contextIds to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.contextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
tagContextIds
.
-
findAllByProductContextIdIn
@Policy(operationTypes=READ) List<D> findAllByProductContextIdIn(Iterable<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
.- Parameters:
productContextIds
- The contextIds to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.contextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextIds
.
-
findAllByProductContextIdInAndTagContextIdIn
@Policy(operationTypes=READ) List<D> findAllByProductContextIdInAndTagContextIdIn(Iterable<String> productContextIds, Iterable<String> tagContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
and matchingtagContextIds
.- Parameters:
productContextIds
- The product contextIds to matchtagContextIds
- The tage contextIds to matchcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextIds
and matchingtagContextIds
.
-
findPageByProductContextIdIn
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByProductContextIdIn(Iterable<String> productContextIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of the product tags with matchingproductContextIds
.- Parameters:
productContextIds
- The contextIds to matchfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- All of the tags with matching
productContextIds
.
-
findByProductContextIdAndContextId
@Policy(operationTypes=READ) Optional<D> findByProductContextIdAndContextId(String productContextId, String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent product's and the product tag's IDs.- Parameters:
productContextId
- ID of the parent productcontextId
- ID of the product tagcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- The product tag matching the
productContextId
andcontextId
.
-
findByTagContextIdAndContextId
@Policy(operationTypes=READ) Optional<D> findByTagContextIdAndContextId(String tagContextId, String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the product tag by the parent tag's and the product tag's IDs.- Parameters:
tagContextId
- ID of the parent tagcontextId
- ID of the product tagcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- The product tag matching the
tagContextId
andcontextId
.
-
findPageByProductContextIdAndVariantId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByProductContextIdAndVariantId(String productId, String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find tags by the product and variant ID- Parameters:
productId
- The product IdvariantId
- The variant IDfilters
- The filterspage
- The pagecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- A page of product tags.
-
findByVariantIdAndContextId
@Policy(operationTypes=READ) Optional<D> findByVariantIdAndContextId(String variantId, String tagId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a product tag by variant ID and tag id- Parameters:
variantId
- The variant IDtagId
- The tag IDcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- A product tag matching the variant and tag id
-
findByVariantId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByVariantId(String variantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find product tags by variant ID- Parameters:
variantId
- The variant IDcontextInfo
- Request context information around sandbox and multitenant statefilters
- The filterspage
- The page- Returns:
- A product tag matching the variant and tag id
-
findPageByTagContextIdAndVariantIdIsNull
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByTagContextIdAndVariantIdIsNull(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page of product tags by the tag ID, excluding variant associated tags.- Parameters:
tagId
- The tag idfilters
- The filterspage
- The pagecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- A page of product tags matching products
-
findPageByTagContextIdAndVariantIdIsNotNull
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageByTagContextIdAndVariantIdIsNotNull(String tagId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page of product tags by the tag ID, excluding variant associated tags.- Parameters:
tagId
- The tag idfilters
- The filterspage
- The pagecontextInfo
- Request context information around sandbox and multitenant state- Returns:
- A page of product tags matching variants
-