Search in sources :

Example 1 with OrganizationType

use of com.autentia.tnt.businessobject.OrganizationType 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;
}
Also used : OrganizationTypeDAO(com.autentia.tnt.dao.hibernate.OrganizationTypeDAO) SortCriteria(com.autentia.tnt.dao.SortCriteria) Organization(com.autentia.tnt.businessobject.Organization) ArrayList(java.util.ArrayList) OrganizationType(com.autentia.tnt.businessobject.OrganizationType)

Aggregations

Organization (com.autentia.tnt.businessobject.Organization)1 OrganizationType (com.autentia.tnt.businessobject.OrganizationType)1 SortCriteria (com.autentia.tnt.dao.SortCriteria)1 OrganizationTypeDAO (com.autentia.tnt.dao.hibernate.OrganizationTypeDAO)1 ArrayList (java.util.ArrayList)1