use of com.autentia.tnt.dao.search.ProjectSearch in project TNTConcept by autentia.
the class BillManager method getProjectsByOrganization.
/**
* Busca todos los proyectos de una organizaciĆ³n
*
* @param client es la organizaciĆ³n por la que vamos a consultar
* @return la lista de proyectos
*/
public List<Project> getProjectsByOrganization(Organization client) {
final ProjectSearch projectSearch = new ProjectSearch();
projectSearch.setClient(client);
return ProjectDAO.getDefault().search(projectSearch, new SortCriteria("name"));
}
use of com.autentia.tnt.dao.search.ProjectSearch in project TNTConcept by autentia.
the class ProjectManager method getOpenProjects.
/* Project - generated by stajanov (do not edit/delete) */
public List<Project> getOpenProjects(SortCriteria sort) {
ProjectSearch s = new ProjectSearch();
s.setOpen(true);
return getAllEntities(s, sort);
}
use of com.autentia.tnt.dao.search.ProjectSearch in project TNTConcept by autentia.
the class ReportBean method getProjects.
public ArrayList<SelectItem> getProjects() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ProjectSearch projectCriteria = new ProjectSearch();
projectCriteria.setClient(getSelectedOrganization());
List<Project> projects = projectDAO.getDefault().searchByOrganization(new SortCriteria("name"), getSelectedOrganization());
if (!projects.isEmpty()) {
setSelectedProject(projects.get(0));
}
for (Project project : projects) {
ret.add(new SelectItem(project.getId().toString(), project.getName()));
}
return ret;
}
Aggregations