Class OfferAuditDaoImpl
java.lang.Object
org.broadleafcommerce.core.offer.dao.OfferAuditDaoImpl
- All Implemented Interfaces:
OfferAuditDao
@Repository("blOfferAuditDao")
public class OfferAuditDaoImpl
extends Object
implements OfferAuditDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dateprotected Longprotected jakarta.persistence.EntityManagerprotected EntityConfigurationprotected static final org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountOfferCodeUses(Long offerCodeId) Deprecated.countOfferCodeUses(Order order, Long offerCodeId) Counts how many times the given offer code has been used in the system.countUsesByAccount(Order order, Long accountId, Long offerId) Counts how many times the an offer has been used by an account.countUsesByAccount(Order order, Long accountId, Long offerId, Long minimumDaysPerUsage) Counts how many times the an offer has been used by an account (within the number of passed in days if provided).protected LongcountUsesByAccountOrCustomer(Order order, Long customerId, Long accountId, Long offerId, Long minimumDaysPerUsage) countUsesByCustomer(Long customerId, Long offerId) Deprecated.countUsesByCustomer(Order order, Long customerId, Long offerId) Counts how many times the an offer has been used by a customer.countUsesByCustomer(Order order, Long customerId, Long offerId, Long minimumDaysPerUsage) Counts how many times the an offer has been used by a customer (within the number of passed in days if provided).create()Creates a new offer auditvoiddelete(OfferAudit offerAudit) protected Dateprotected jakarta.persistence.criteria.PredicategetOmsOrderPredicate(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root<OrderImpl> orderRoot, jakarta.persistence.criteria.Join<Object, Object> parentOrder) protected LonggetOrderId(Order order) readAuditById(Long offerAuditId) readOfferAuditsByOrderId(Long orderId) Return all offer audits for a particular ordersave(OfferAudit offerAudit) Persists an audit record to the databasevoidsetCurrentDateResolution(Long currentDateResolution)
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOG -
em
protected jakarta.persistence.EntityManager em -
entityConfiguration
-
currentDateResolution
-
cachedDate
-
-
Constructor Details
-
OfferAuditDaoImpl
public OfferAuditDaoImpl()
-
-
Method Details
-
getCurrentDateAfterFactoringInDateResolution
-
create
Description copied from interface:OfferAuditDaoCreates a new offer audit- Specified by:
createin interfaceOfferAuditDao
-
delete
- Specified by:
deletein interfaceOfferAuditDao
-
save
Description copied from interface:OfferAuditDaoPersists an audit record to the database- Specified by:
savein interfaceOfferAuditDao
-
readAuditById
- Specified by:
readAuditByIdin interfaceOfferAuditDao
-
countUsesByCustomer
Description copied from interface:OfferAuditDaoCounts how many times the an offer has been used by a customer. This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.- Specified by:
countUsesByCustomerin interfaceOfferAuditDao- Returns:
- number of times and offer has been used by a customer
-
countUsesByAccount
Description copied from interface:OfferAuditDaoCounts how many times the an offer has been used by an account. This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.- Specified by:
countUsesByAccountin interfaceOfferAuditDao- Returns:
- number of times and offer has been used by a customer
-
countUsesByAccount
Description copied from interface:OfferAuditDaoCounts how many times the an offer has been used by an account (within the number of passed in days if provided). This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.- Specified by:
countUsesByAccountin interfaceOfferAuditDao- Returns:
- number of times and offer has been used by a customer
-
countUsesByCustomer
public Long countUsesByCustomer(Order order, Long customerId, Long offerId, Long minimumDaysPerUsage) Description copied from interface:OfferAuditDaoCounts how many times the an offer has been used by a customer (within the number of passed in days if provided). This method will take into account if the Offer has already been applied to the Order so as not to prevent the Offer from applying to new items added to the Order by a CRS.- Specified by:
countUsesByCustomerin interfaceOfferAuditDao- Returns:
- number of times and offer has been used by a customer
-
countUsesByAccountOrCustomer
-
getOmsOrderPredicate
-
getOrderId
-
countUsesByCustomer
Deprecated.Description copied from interface:OfferAuditDaoCounts how many times the an offer has been used by a customer- Specified by:
countUsesByCustomerin interfaceOfferAuditDao- Returns:
- number of times and offer has been used by a customer
-
countOfferCodeUses
Description copied from interface:OfferAuditDaoCounts how many times the given offer code has been used in the system. This method will take into account if the OfferCode has already been applied to the Order so as not to prevent the OfferCODE from applying to new items added to the Order by a CRS.- Specified by:
countOfferCodeUsesin interfaceOfferAuditDao- Returns:
- number of times the offer code has been used
-
countOfferCodeUses
Deprecated.Description copied from interface:OfferAuditDaoCounts how many times the given offer code has been used in the system- Specified by:
countOfferCodeUsesin interfaceOfferAuditDao- Returns:
- number of times the offer code has been used
-
readOfferAuditsByOrderId
Description copied from interface:OfferAuditDaoReturn all offer audits for a particular order- Specified by:
readOfferAuditsByOrderIdin interfaceOfferAuditDao- Returns:
-
getCurrentDateResolution
- Specified by:
getCurrentDateResolutionin interfaceOfferAuditDao
-
setCurrentDateResolution
- Specified by:
setCurrentDateResolutionin interfaceOfferAuditDao
-