@Override
public void move() {
try {
Document doc;
switch (loginController.get("searchvacacion")) {
case "_init":
vacacionList = vacacionRepository.findPagination(new Document("agente.idagente", localIdagente), page, rowPage, new Document("idvacacion", -1));
break;
case "_autocomplete":
//no se realiza ninguna accion
break;
case "_betweendates":
vacacionList = vacacionRepository.filterBetweenDatePagination("agente.idagente", agente.getIdagente(), "fechainicio", lookupSeguridadejbServices.getFechaDesde(), "fechafin", lookupSeguridadejbServices.getFechaHasta(), page, rowPage, new Document("idvacacion", -1));
break;
case "idagente":
vacacionList = vacacionRepository.findPagination(new Document("agente.idagente", localIdagente), page, rowPage, new Document("idvacacion", -1));
break;
case "idvacacion":
doc = new Document("idvacacion", lookupSeguridadejbServices.getIdvacacion()).append("agente.idagente", agente.getIdagente());
vacacionList = vacacionRepository.findPagination(doc, page, rowPage, new Document("idvacacion", -1));
break;
case "fechainicio":
vacacionList = vacacionRepository.filterDayWithoutHourPagination("agente.idagente", agente.getIdagente(), "fechainicio", lookupSeguridadejbServices.getFechaincio(), page, rowPage, new Document("idvacacion", -1));
break;
case "fechafin":
vacacionList = vacacionRepository.filterDayWithoutHourPagination("agente.idagente", agente.getIdagente(), "fechafin", lookupSeguridadejbServices.getFechafin(), page, rowPage, new Document("idvacacion", -1));
break;
default:
vacacionList = vacacionRepository.findPagination(new Document("agente.idagente", localIdagente), page, rowPage, new Document("idvacacion", -1));
break;
}
vacacionFiltered = vacacionList;
vacacionDataModel = new VacacionDataModel(vacacionList);
} catch (Exception e) {
JsfUtil.errorMessage("move() " + e.getLocalizedMessage());
}
}// </editor-fold>