@Repository(value="blOfferAuditDao") public class OfferAuditDaoImpl extends Object implements OfferAuditDao
| Modifier and Type | Field and Description |
|---|---|
protected Date |
cachedDate |
protected Long |
currentDateResolution |
protected javax.persistence.EntityManager |
em |
protected EntityConfiguration |
entityConfiguration |
protected static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
OfferAuditDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
Long |
countOfferCodeUses(Long offerCodeId)
Deprecated.
|
Long |
countOfferCodeUses(Order order,
Long offerCodeId)
Counts how many times the given offer code has been used in the system.
|
Long |
countUsesByAccount(Order order,
Long accountId,
Long offerId)
Counts how many times the an offer has been used by an account.
|
Long |
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 Long |
countUsesByAccountOrCustomer(Order order,
Long customerId,
Long accountId,
Long offerId,
Long minimumDaysPerUsage) |
Long |
countUsesByCustomer(Long customerId,
Long offerId)
Deprecated.
|
Long |
countUsesByCustomer(Order order,
Long customerId,
Long offerId)
Counts how many times the an offer has been used by a customer.
|
Long |
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).
|
OfferAudit |
create()
Creates a new offer audit
|
void |
delete(OfferAudit offerAudit) |
protected Date |
getCurrentDateAfterFactoringInDateResolution() |
Long |
getCurrentDateResolution() |
protected Long |
getOrderId(Order order) |
OfferAudit |
readAuditById(Long offerAuditId) |
List<OfferAudit> |
readOfferAuditsByOrderId(Long orderId)
Return all offer audits for a particular order
|
OfferAudit |
save(OfferAudit offerAudit)
Persists an audit record to the database
|
void |
setCurrentDateResolution(Long currentDateResolution) |
protected static final org.apache.commons.logging.Log LOG
protected javax.persistence.EntityManager em
protected EntityConfiguration entityConfiguration
protected Long currentDateResolution
protected Date cachedDate
protected Date getCurrentDateAfterFactoringInDateResolution()
public OfferAudit create()
OfferAuditDaocreate in interface OfferAuditDaopublic void delete(OfferAudit offerAudit)
delete in interface OfferAuditDaopublic OfferAudit save(OfferAudit offerAudit)
OfferAuditDaosave in interface OfferAuditDaopublic OfferAudit readAuditById(Long offerAuditId)
readAuditById in interface OfferAuditDaopublic Long countUsesByCustomer(Order order, Long customerId, Long offerId)
OfferAuditDaocountUsesByCustomer in interface OfferAuditDaopublic Long countUsesByAccount(Order order, Long accountId, Long offerId)
OfferAuditDaocountUsesByAccount in interface OfferAuditDaopublic Long countUsesByAccount(Order order, Long accountId, Long offerId, Long minimumDaysPerUsage)
OfferAuditDaocountUsesByAccount in interface OfferAuditDaopublic Long countUsesByCustomer(Order order, Long customerId, Long offerId, Long minimumDaysPerUsage)
OfferAuditDaocountUsesByCustomer in interface OfferAuditDaoprotected Long countUsesByAccountOrCustomer(Order order, Long customerId, Long accountId, Long offerId, Long minimumDaysPerUsage)
@Deprecated public Long countUsesByCustomer(Long customerId, Long offerId)
OfferAuditDaocountUsesByCustomer in interface OfferAuditDaopublic Long countOfferCodeUses(Order order, Long offerCodeId)
OfferAuditDaocountOfferCodeUses in interface OfferAuditDao@Deprecated public Long countOfferCodeUses(Long offerCodeId)
OfferAuditDaocountOfferCodeUses in interface OfferAuditDaopublic List<OfferAudit> readOfferAuditsByOrderId(Long orderId)
OfferAuditDaoreadOfferAuditsByOrderId in interface OfferAuditDaopublic Long getCurrentDateResolution()
getCurrentDateResolution in interface OfferAuditDaopublic void setCurrentDateResolution(Long currentDateResolution)
setCurrentDateResolution in interface OfferAuditDaoCopyright © 2021. All rights reserved.