/** Lists the entities of type Intrant for the CSV export */ @Transactional(readOnly = true) public List<Intrant> listForCsv( String sortProperty, boolean sortOrder, String identifiant, String nom) { ImogActor actor = HttpSessionUtil.getCurrentUser(); ImogJunction junction = createFilterJuntion(actor); if (identifiant != null && !identifiant.isEmpty()) { BasicCriteria criteria = new BasicCriteria(); criteria.setOperation(CriteriaConstants.STRING_OPERATOR_CONTAINS); criteria.setField("identifiant"); criteria.setValue(identifiant); junction.add(criteria); } if (nom != null && !nom.isEmpty()) { BasicCriteria criteria = new BasicCriteria(); criteria.setOperation(CriteriaConstants.STRING_OPERATOR_CONTAINS); criteria.setField("nom"); criteria.setValue(nom); junction.add(criteria); } List<Intrant> beans = dao.load(sortProperty, sortOrder, junction); List<Intrant> securedBeans = filter.<Intrant>toSecure(beans); return securedBeans; }
/** * Lists the entities of type Intrant * * @param sortProperty the property used to sort the collection * @param sortOrder true for an ascendant sort * @return list of intrant */ @Transactional(readOnly = true) public List<Intrant> listIntrant(String sortProperty, boolean sortOrder, ImogJunction junction) { List<Intrant> beans = dao.load(sortProperty, sortOrder, junction); return beans; }
/** * Lists the entities of type Intrant * * @param sortProperty the property used to sort the collection * @param sortOrder true for an ascendant sort * @return list of intrant */ @Transactional(readOnly = true) public List<Intrant> listIntrant(String sortProperty, boolean sortOrder) { ImogActor actor = HttpSessionUtil.getCurrentUser(); ImogJunction junction = createFilterJuntion(actor); List<Intrant> beans = dao.load(sortProperty, sortOrder, junction); return beans; }
/** * Lists the entities of type Intrant * * @param i first index to retrieve * @param j nb of items to retrieve * @param sortProperty the property used to sort the collection * @param sortOrder true for an ascendant sort * @param criterions request criteria * @return list of intrant */ @Transactional(readOnly = true) public List<Intrant> listIntrant( int i, int j, String sortProperty, boolean sortOrder, ImogJunction criterions) { ImogActor actor = HttpSessionUtil.getCurrentUser(); ImogJunction junction = createFilterJuntion(actor); if (criterions != null) junction.add(criterions); List<Intrant> beans = dao.load(i, j, sortProperty, sortOrder, junction); return beans; }
/** * Loads the entity with the specified id * * @param entityId the entity id * @return the entity or null */ @Transactional(readOnly = true) public Intrant findById(String entityId) { return dao.load(entityId); }