|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.jpa.JPAGenericDAO<K,E>
fr.paris.lutece.portal.service.jpa.JPALuteceDAO<K,E>
fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO<java.lang.Integer,Purchase>
fr.paris.lutece.plugins.stock.business.purchase.PurchaseDAO<K,E>
K
- the key typeE
- the entity typepublic class PurchaseDAO<K,E>
This class provides Data Access methods for Purchase
objects.
Constructor Summary | |
---|---|
PurchaseDAO()
|
Method Summary | |
---|---|
protected void |
buildCriteriaQuery(PurchaseFilter filter,
javax.persistence.criteria.Root<Purchase> root,
javax.persistence.criteria.CriteriaQuery<Purchase> query,
javax.persistence.criteria.CriteriaBuilder builder)
Build the criteria query used when purchases are searched by filter. |
protected void |
buildSortQuery(PurchaseFilter filter,
javax.persistence.criteria.Root<Purchase> root,
javax.persistence.criteria.CriteriaQuery<Purchase> query,
javax.persistence.criteria.CriteriaBuilder builder)
Add the order by parameter to the query. |
fr.paris.lutece.plugins.stock.commons.ResultList<Purchase> |
findByFilter(PurchaseFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Find purchases by filter. |
java.lang.Integer |
getCountPurchaseByBeginDateAndLastDate(java.lang.String strDateDebut,
java.lang.String strDateFin)
Return the number of purchase for the current month |
java.lang.String |
getPluginName()
|
java.lang.Integer |
getQuantityPurchasedByIdProductAndUserName(java.lang.Integer idProduct,
java.lang.Integer idOfferGenre,
java.lang.String userName)
Return the number of reservation for an offer and an agent. |
Methods inherited from class fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO |
---|
addRestriction, createPagedQuery, findAll |
Methods inherited from class fr.paris.lutece.portal.service.jpa.JPALuteceDAO |
---|
createNativeQuery, getEntityManagerFactory |
Methods inherited from class fr.paris.lutece.util.jpa.JPAGenericDAO |
---|
create, detach, findAll, findById, flush, getEM, getEntityClass, getEntityClassName, remove, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.paris.lutece.util.jpa.IGenericDAO |
---|
create, detach, findAll, findById, flush, remove, update |
Constructor Detail |
---|
public PurchaseDAO()
Method Detail |
---|
public java.lang.String getPluginName()
getPluginName
in class fr.paris.lutece.portal.service.jpa.JPALuteceDAO<java.lang.Integer,Purchase>
public fr.paris.lutece.plugins.stock.commons.ResultList<Purchase> findByFilter(PurchaseFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
findByFilter
in interface IPurchaseDAO
filter
- the filterpaginationProperties
- the pagination properties
protected void buildCriteriaQuery(PurchaseFilter filter, javax.persistence.criteria.Root<Purchase> root, javax.persistence.criteria.CriteriaQuery<Purchase> query, javax.persistence.criteria.CriteriaBuilder builder)
filter
- the filterroot
- the purchase rootquery
- the criteria querybuilder
- the criteria builderprotected void buildSortQuery(PurchaseFilter filter, javax.persistence.criteria.Root<Purchase> root, javax.persistence.criteria.CriteriaQuery<Purchase> query, javax.persistence.criteria.CriteriaBuilder builder)
filter
- the filterroot
- the purchase rootquery
- the criteria querybuilder
- the criteria builderpublic java.lang.Integer getQuantityPurchasedByIdProductAndUserName(java.lang.Integer idProduct, java.lang.Integer idOfferGenre, java.lang.String userName)
getQuantityPurchasedByIdProductAndUserName
in interface IPurchaseDAO
idProduct
- offer ididOfferGenre
- the id offer genreuserName
- agent userName
public java.lang.Integer getCountPurchaseByBeginDateAndLastDate(java.lang.String strDateDebut, java.lang.String strDateFin)
getCountPurchaseByBeginDateAndLastDate
in interface IPurchaseDAO
strDateDebut
- the first date of the monthstrDateFin
- the last date of the month
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |