org.broadleafcommerce.core.offer.dao
Class OfferAuditDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.core.offer.dao.OfferAuditDaoImpl
All Implemented Interfaces:
OfferAuditDao

@Repository(value="blOfferAuditDao")
public class OfferAuditDaoImpl
extends Object
implements OfferAuditDao


Field Summary
protected  javax.persistence.EntityManager em
           
protected  EntityConfiguration entityConfiguration
           
protected static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
OfferAuditDaoImpl()
           
 
Method Summary
 Long countOfferCodeUses(Long offerCodeId)
          Counts how many times the given offer code has been used in the system
 Long countUsesByCustomer(Long customerId, Long offerId)
          Counts how many times the an offer has been used by a customer
 OfferAudit create()
          Creates a new offer audit
 void delete(OfferAudit offerAudit)
           
 OfferAudit readAuditById(Long offerAuditId)
           
 OfferAudit save(OfferAudit offerAudit)
          Persists an audit record to the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

em

protected javax.persistence.EntityManager em

entityConfiguration

protected EntityConfiguration entityConfiguration
Constructor Detail

OfferAuditDaoImpl

public OfferAuditDaoImpl()
Method Detail

create

public OfferAudit create()
Description copied from interface: OfferAuditDao
Creates a new offer audit

Specified by:
create in interface OfferAuditDao

delete

public void delete(OfferAudit offerAudit)
Specified by:
delete in interface OfferAuditDao

save

public OfferAudit save(OfferAudit offerAudit)
Description copied from interface: OfferAuditDao
Persists an audit record to the database

Specified by:
save in interface OfferAuditDao

readAuditById

public OfferAudit readAuditById(Long offerAuditId)
Specified by:
readAuditById in interface OfferAuditDao

countUsesByCustomer

public Long countUsesByCustomer(Long customerId,
                                Long offerId)
Description copied from interface: OfferAuditDao
Counts how many times the an offer has been used by a customer

Specified by:
countUsesByCustomer in interface OfferAuditDao
Returns:

countOfferCodeUses

public Long countOfferCodeUses(Long offerCodeId)
Description copied from interface: OfferAuditDao
Counts how many times the given offer code has been used in the system

Specified by:
countOfferCodeUses in interface OfferAuditDao
Returns:


Copyright © 2013. All Rights Reserved.