use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.
the class CollaboratorBean method getOrganizations.
/**
* Get the list of all organizations
* @return the list of all organizations
*/
public List<SelectItem> getOrganizations() {
List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem(null, ""));
for (Organization ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.
the class OrganizationManager method getProvidersAndClients.
public List<Organization> getProvidersAndClients() {
OrganizationTypeDAO orgTypeDao = OrganizationTypeDAO.getDefault();
OrganizationType provider = orgTypeDao.loadById(ConfigurationUtil.getDefault().getOrganizationTypeProvider());
OrganizationType providerCient = orgTypeDao.loadById(ConfigurationUtil.getDefault().getOrganizationTypeProviderAndClient());
List<Organization> lista = new ArrayList<Organization>();
List<Organization> orgs = organizationDAO.searchByOrganizationTypes(new SortCriteria("name"), provider, providerCient);
for (Organization org : orgs) {
lista.add(org);
}
return lista;
}
use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.
the class OrganizationManager method getEntityById.
/**
* Get organization by primary key.
* @return organization selected by id.
*/
public Organization getEntityById(int id) {
final Organization organization = organizationDAO.loadById(id);
organization.initChanges();
return organization;
}
use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.
the class OccupationBean method onSelectedOrganizationSearchChanged.
public void onSelectedOrganizationSearchChanged(ValueChangeEvent event) {
Organization now = (Organization) event.getNewValue();
if (now == null)
return;
setSearchProjectValid(true);
setSelectedOrganization(now);
FacesUtils.renderResponse();
}
Aggregations