Interface CustomerSegmentDao
- All Known Implementing Classes:
CustomerSegmentDaoImpl
public interface CustomerSegmentDao
Provides database access for CustomerSegment
- Author:
- bpolster
-
Method Summary
Modifier and TypeMethodDescriptionintarchiveCustomerPurchaseBasedCustomerSegmentXrefs(List<Long> customerIds, Long segmentId) voidclear()booleancustomerIdentifiesWithCustomerSegment(Long segmentId, org.broadleafcommerce.profile.core.domain.Customer customer) Determines if the sent customer matches the identifying criteria for the customer segment with id segmentIdvoidDeletes the passed in PurchaseCustomerCustomerSegmentXrefvoiddeleteCustomerSegment(CustomerSegment customerSegment) Removes the passed in CustomerSegment.booleanisCustomerInPurchaseBasedCustomerSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer) Returns whether or not this customer qualified for the purchase requirements of this customer segmentreadAllCustomersInSegmentWithLatestPurchaseBeforeDate(CustomerSegment customerSegment, Date cutoffDate) Finds all customers for a customer segment that made a qualifying purchase before the cutoff datereadAllCustomersWithPurchasesInDateRange(int size, int start, PurchBasedCustSegConfigDTO config) Finds all customer segments that have purchase requirementsreadAllPurchaseBasedCustomersInSegment(int size, int start, CustomerSegment segment) readAllPurchaseBasedCustomersInSegment(CustomerSegment customerSegment) Read all CustomerSegmentsreadBatchCustomerCustomerSegXrefs(int firstRecord, int count) readBatchCustomerCustomerSegXrefs(Long firstId, int count) Returns list of CustomerCustomerSegmentXrefs starting at start up to start+count.readBatchXrefsForCustomerSegment(Long customerSegmentId, Integer firstRecord, int count) readBatchXrefsForCustomerSegment(Long customerSegmentId, Long firstId, int count) Returns list of CustomerCustomerSegmentXrefs for a specific CustomerSegment starting at start up to start+count.intintreadCustomerForPurchaseBasedSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer) Finds a specific customer in a purchase based customer segmentFinds the CustomerSegment for the passed in id.readCustomerSegmentByIds(List<Long> ids) readCustomerSegmentsByFilterAndLimit(String filter, Integer limit) readListBasedCustomerSegmentsForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer) Finds all CustomerSegments that contain this customer.Returns the total number of Customer Segments for the current site.readNumberOfXrefsForCustomerSegment(Long customerSegmentId) save(CustPrchBasedCustSegXref xref) Creates or updates the passed in PurchaseCustomerCustomerSegmentXrefsaveCustomerSegment(CustomerSegment customerSegment) Creates or updates the passed in CustomerSegment.
-
Method Details
-
readCustomerSegmentById
Finds the CustomerSegment for the passed in id.- Parameters:
id-- Returns:
-
readCustomerSegmentByName
-
readCustomerSegmentByIds
-
readNumberOfCustomerSegments
Long readNumberOfCustomerSegments()Returns the total number of Customer Segments for the current site.- Returns:
- total number of Customer Segments for the current site
-
readBatchCustomerCustomerSegXrefs
Returns list of CustomerCustomerSegmentXrefs starting at start up to start+count. -
readBatchCustomerCustomerSegXrefs
-
readBatchXrefsForCustomerSegment
List<CustomerCustomerSegmentXref> readBatchXrefsForCustomerSegment(Long customerSegmentId, Long firstId, int count) Returns list of CustomerCustomerSegmentXrefs for a specific CustomerSegment starting at start up to start+count. -
readBatchXrefsForCustomerSegment
List<CustomerCustomerSegmentXref> readBatchXrefsForCustomerSegment(Long customerSegmentId, Integer firstRecord, int count) -
readNumberOfCustomerCustomerSegXrefs
Long readNumberOfCustomerCustomerSegXrefs() -
readNumberOfXrefsForCustomerSegment
-
readCustomerSegmentsByFilterAndLimit
-
readCustomerSegmentsByLimit
-
readAllRuleBasedCustomerSegments
List<CustomerSegment> readAllRuleBasedCustomerSegments()Read all CustomerSegments- Returns:
-
readAllPurchaseBasedCustomerSegments
List<CustomerSegment> readAllPurchaseBasedCustomerSegments()Finds all customer segments that have purchase requirements- Returns:
-
readListBasedCustomerSegmentsForCustomer
List<CustomerSegment> readListBasedCustomerSegmentsForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer) Finds all CustomerSegments that contain this customer. Returns an empty List if customer is anonymous to preventIllegalArgumentException, since anonymous customers will have null customerId.- Parameters:
customer-- Returns:
-
isCustomerInPurchaseBasedCustomerSegment
boolean isCustomerInPurchaseBasedCustomerSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer) Returns whether or not this customer qualified for the purchase requirements of this customer segment- Parameters:
customerSegment-customer-- Returns:
-
saveCustomerSegment
Creates or updates the passed in CustomerSegment.- Parameters:
customerSegment-- Returns:
-
save
Creates or updates the passed in PurchaseCustomerCustomerSegmentXref- Parameters:
xref-- Returns:
-
delete
Deletes the passed in PurchaseCustomerCustomerSegmentXref- Parameters:
xref-
-
deleteCustomerSegment
Removes the passed in CustomerSegment.- Parameters:
customerSegment-
-
readAllOfferCustomerSegmentXrefsByOfferId
-
readAllPurchaseBasedCustomersInSegment
List<CustPrchBasedCustSegXref> readAllPurchaseBasedCustomersInSegment(CustomerSegment customerSegment) -
readAllCustomersInSegmentWithLatestPurchaseBeforeDate
List<CustPrchBasedCustSegXref> readAllCustomersInSegmentWithLatestPurchaseBeforeDate(CustomerSegment customerSegment, Date cutoffDate) Finds all customers for a customer segment that made a qualifying purchase before the cutoff date- Parameters:
customerSegment-cutoffDate-- Returns:
-
readCustomerForPurchaseBasedSegment
CustPrchBasedCustSegXref readCustomerForPurchaseBasedSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer) Finds a specific customer in a purchase based customer segment- Parameters:
customerSegment-customer-- Returns:
-
readAllPurchaseBasedCustomersInSegment
List<CustPrchBasedCustSegXref> readAllPurchaseBasedCustomersInSegment(int size, int start, CustomerSegment segment) -
readCountAllCustomersWithPurchasesInDateRange
-
readCountAllPurchaseBasedCustomersInSegment
-
readAllCustomersWithPurchasesInDateRange
List<Long> readAllCustomersWithPurchasesInDateRange(int size, int start, PurchBasedCustSegConfigDTO config) -
archiveCustomerPurchaseBasedCustomerSegmentXrefs
-
customerIdentifiesWithCustomerSegment
boolean customerIdentifiesWithCustomerSegment(Long segmentId, org.broadleafcommerce.profile.core.domain.Customer customer) Determines if the sent customer matches the identifying criteria for the customer segment with id segmentId- Parameters:
segmentId- the Customer Segment id to check againstcustomer- the customer we're checking to see if matches the given customer segment or not- Returns:
- true if the customer sent identifies with the customer segment sent
-
clear
void clear()
-