org.perfectjpattern.jee.api.integration.dao
Interface ICustomerDao

All Superinterfaces:
IBaseDao<Long,Customer>, IBaseReadOnlyDao<Long,Customer>, IGenericDao<Long,Customer>, IGenericReadOnlyDao<Long,Customer>

public interface ICustomerDao
extends IGenericDao<Long,Customer>

Abstract definition of the Customer DAO. This definition was introduced to support the Spring Generic DAO example implementation.

Note that this interface is all the Java code needed to provide such custom finder capability. The SpringGenericDao implementation will take care of the rest that includes all the plumbing to Hibernate. At this point it is only required the appropriate Hibernate mapping.

Version:
$ $Date: Dec 9, 2008 1:14:39 AM $
Author:
Giovanni Azua
See Also:
SpringGenericDao
 

Method Summary
 List<Customer> findByNumberOfOrdersBetween(Date aBegin, Date anEnd, long aMinimum)
          Returns the List of matching Customer instances.
 List<Customer> findByTotalSpendingBetween(Date aBegin, Date anEnd, double aTotal)
          Returns the List of matching Customer instances.
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IGenericReadOnlyDao
findByExample
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IBaseDao
create, delete, deleteAll, update
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IBaseReadOnlyDao
contains, count, findAll, findById, getSession, getTransaction
 

Method Detail

findByNumberOfOrdersBetween

List<Customer> findByNumberOfOrdersBetween(Date aBegin,
                                           Date anEnd,
                                           long aMinimum)
Returns the List of matching Customer instances. Finds the customers that have completed a minimum number of orders over the given total amount within the given period.

Parameters:
aBegin - Period begin date
anEnd - Period end date
aMinimum - Minimum number of orders to search for
Returns:
List of matching Customer instances

findByTotalSpendingBetween

List<Customer> findByTotalSpendingBetween(Date aBegin,
                                          Date anEnd,
                                          double aTotal)
Returns the List of matching Customer instances. Finds the top spenders/customers that have completed orders over the given total amount within the given period.

Parameters:
aBegin - Period begin date
anEnd - Period end date
aTotal - Total minimum spending to search for
Returns:
List of matching Customer instances


Copyright © 2007-2009. All Rights Reserved.