Interface SegmentMemberRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
- D- Type of- Trackableentity. Typically a- SegmentMemberor subclass of SegmentMember.
- All Superinterfaces:
- CustomizedSegmentMemberRepository<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:
- JpaSegmentMemberRepository<D>
@NoRepositoryBean
public interface SegmentMemberRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, CustomizedSegmentMemberRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
Repository for managing customer/segment relationships.
- 
Method SummaryModifier and TypeMethodDescriptionfindByCustomerContextIdAndSegmentId(String customerContextId, String segmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns a particular customer/segment relationshiporg.springframework.data.domain.Page<D>findBySegmentId(String segmentId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns a page of customer/segment relationships for the designated customer segment.readAllBySegmentIdAndCustomerEmailInIgnoreCase(String segmentId, Set<String> emailAddresses, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the segment members for the specified customer segment id and customer email addresses.voidremoveAllBySegmentId(String customerSegmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Removes all customers from a segment.voidremoveByCustomerContextIdAndSegmentId(String customerId, String customerSegmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Removes the specified customer from a segment.Methods inherited from interface com.broadleafcommerce.customer.repository.CustomizedSegmentMemberRepositoryfindAllByCustomerEmailOrCustomerId, findAllBySegmentIdAndCustomerIdIn, findAllBySegmentIdAndNotMatchingSegmentRule, readAllBySegmentId, removeAllByIds, save, saveAllMethods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryfindNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledgedMethods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepositoryarchive, 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, setTrackableBehaviorUtilMethods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutorexists, findAll, findAll, findAll, findAll
- 
Method Details- 
findBySegmentId@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findBySegmentId(String segmentId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns a page of customer/segment relationships for the designated customer segment.- Parameters:
- segmentId- The segment ID
- filters- An RSQL filter used to narrow query results. May be- EmptyNodeif no filters should be applied.
- pageable- The requested page of results from the database
- context- Context information surrounding sandboxing and multitenant state
- Returns:
- A page of customer/segment relationships
 
- 
findByCustomerContextIdAndSegmentId@Policy(operationTypes=READ) Optional<D> findByCustomerContextIdAndSegmentId(String customerContextId, String segmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns a particular customer/segment relationship- Parameters:
- customerContextId- The customer ID
- segmentId- The segment ID
- context- Context information surrounding sandboxing and multitenant state
- Returns:
- A customer/segment relationship
 
- 
removeByCustomerContextIdAndSegmentId@Policy(operationTypes={UPDATE,DELETE}) @Transactional void removeByCustomerContextIdAndSegmentId(String customerId, String customerSegmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Removes the specified customer from a segment.- Parameters:
- customerId- The customer ID
- customerSegmentId- The segment ID
- context- Context information surrounding sandboxing and multitenant state
 
- 
removeAllBySegmentId@Policy(operationTypes={UPDATE,DELETE}) void removeAllBySegmentId(String customerSegmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Removes all customers from a segment. This is primarily intended for use on segments with a derived list of customers (e.g. rule based) when rebuilding the customer set from scratch.- Parameters:
- customerSegmentId- The segment ID
- context- Context information surrounding sandboxing and multitenant state
 
- 
readAllBySegmentIdAndCustomerEmailInIgnoreCase@Policy(operationTypes=READ) List<D> readAllBySegmentIdAndCustomerEmailInIgnoreCase(String segmentId, Set<String> emailAddresses, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the segment members for the specified customer segment id and customer email addresses.- Parameters:
- segmentId- the- CustomerSegmentid
- emailAddresses- the set of- Customeremail
- contextInfo- Request context information around sandbox and multitenant state
- Returns:
- the segment members for the specified customer segment id and customer email addresses
 
 
-