public boolean save(CheckListMaster checkListMaster, int addbetween, String priorities) { String statusBetween[] = {}; if ((!"".equals(priorities)) && priorities != null) { statusBetween = priorities.split(","); int betweenFrom = 0; int betweenTo = 0; if (statusBetween.length == 1) { if (addbetween == 1) { betweenFrom = 0; betweenTo = Integer.parseInt(statusBetween[0].trim()); } else { betweenFrom = Integer.parseInt(statusBetween[0].trim()); betweenTo = betweenFrom + 2000; } } else if (statusBetween.length == 2) { betweenFrom = Integer.parseInt(statusBetween[0].trim()); betweenTo = Integer.parseInt(statusBetween[1].trim()); } else if (statusBetween.length == 0) { betweenFrom = 0; betweenTo = 2000; } int priority = Math.round((betweenFrom + betweenTo) / 2); if (priority == betweenTo) { return false; } checkListMaster.setOrderNo(priority); } else { checkListMaster.setOrderNo(1000); } checkListDao.save(checkListMaster); return true; }
public List<EnquiryCheckList> getAllEnquiryCheckList(int enquiryId) { return checkListDao.getAllEnquiryCheckList(enquiryId); }
public List<CheckListMaster> viewPaginationCheckListSearch( String name, final int organizationId, final int pageNo, final int noOfRecods) { return checkListDao.viewPaginationCheckListSearch(name, organizationId, pageNo, noOfRecods); }
public List<CheckListMaster> viewPaginationCheckList( final int organizationId, final int pageNo, final int noOfRecods) { return checkListDao.viewPaginationCheckList(organizationId, pageNo, noOfRecods); }
public List<CheckListMaster> searchCheckList(String name, int organizationId) { return checkListDao.searchCheckList(name, organizationId); }
public List<CheckListMaster> getAllCheckList(int orgId) { return checkListDao.getAllCheckList(orgId); }
public CheckListMaster getCheckListById(int checkListId) { return checkListDao.getCheckListById(checkListId); }
public boolean saveOrUpdateAll(List checkListMaster) { return checkListDao.saveOrUpdateAll(checkListMaster); }
public boolean update(EnquiryCheckList enqCheckList) { return checkListDao.update(enqCheckList); }
public boolean update(CheckListMaster checkListMaster) { checkListDao.update(checkListMaster); return true; }
public boolean delete(CheckListMaster checkListMaster, int organizationId) { return checkListDao.delete(checkListMaster, organizationId); }