Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<DocumentDB> findByDateAndYearAndStatus2 (int month ,int year ,UserUidDB userUID,String status) {
- List<DocumentDB> historyTotal = null;
- try {
- DAO.begin();
- historyTotal = (List<DocumentDB>) DAO.getEntityManager().createNamedQuery("getHistoryTotalByMonthAndYearAndStatus2")
- .setParameter("monthDoc", month)
- .setParameter("yearDoc", year)
- .setParameter("creator", userUID)
- .setParameter("status", status)
- .getResultList();
- } catch (Exception e) {
- logger.error("Invalid month/year loading with "+month+"/"+year+" : "+status , e);
- } finally {
- DAO.close();
- }
- return historyTotal;
- }
- public List<DocumentDB> findByDateAndYearAndMonth (int date,int month ,int year ,UserUidDB userUID) {
- List<DocumentDB> historyTotal = null;
- try {
- DAO.begin();
- historyTotal = (List<DocumentDB>) DAO.getEntityManager().createNamedQuery("getHistoryTotalByDateAndMonthAndYear")
- .setParameter("dateDoc", date)
- .setParameter("monthDoc", month)
- .setParameter("yearDoc", year)
- .setParameter("creator", userUID)
- .getResultList();
- } catch (Exception e) {
- logger.error("Invalid month/year loading with "+date+"/"+month+"/"+year , e);
- } finally {
- DAO.close();
- }
- return historyTotal;
- }
- public List<DocumentDB> findByDateAndYearAndMonthAndStatus (int date,int month ,int year ,UserUidDB userUID,String status) {
- List<DocumentDB> historyTotal = null;
- try {
- DAO.begin();
- historyTotal = (List<DocumentDB>) DAO.getEntityManager().createNamedQuery("getHistoryTotalByDateAndMonthAndYearAndStatus")
- .setParameter("dateDoc", date)
- .setParameter("monthDoc", month)
- .setParameter("yearDoc", year)
- .setParameter("creator", userUID)
- .setParameter("status", status)
- .getResultList();
- } catch (Exception e) {
- logger.error("Invalid month/year loading with "+date+"/"+month+"/"+year +" : "+status , e);
- } finally {
- DAO.close();
- }
- return historyTotal;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement