Search in sources :

Example 56 with Organizacao

use of com.tomasio.projects.trainning.model.Organizacao in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method findAllOrganizacoesExternasByCidadeId.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllOrganizacoesExternasByCidadeId(Long cidadeId) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllExternoByCidadeId(cidadeId);
        if (organizacoes != null) {
            organizacoesArray = convertToArray(organizacoes);
        }
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    }
    return organizacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Organizacao(com.tomasio.projects.trainning.model.Organizacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) OrganizacaoDTO(com.tomasio.projects.trainning.dto.OrganizacaoDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Example 57 with Organizacao

use of com.tomasio.projects.trainning.model.Organizacao in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method searchUnidadesBySigla.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] searchUnidadesBySigla(String term) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.searchUnidadeBySigla(term);
        if (organizacoes != null) {
            organizacoesArray = convertToArray(organizacoes);
        }
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    }
    return organizacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Organizacao(com.tomasio.projects.trainning.model.Organizacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) OrganizacaoDTO(com.tomasio.projects.trainning.dto.OrganizacaoDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Example 58 with Organizacao

use of com.tomasio.projects.trainning.model.Organizacao in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method findAllOrganizacoes.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllOrganizacoes(Long[] ids) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAll(ids);
        if (organizacoes != null) {
            organizacoesArray = convertToArray(organizacoes);
        }
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    }
    return organizacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Organizacao(com.tomasio.projects.trainning.model.Organizacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) OrganizacaoDTO(com.tomasio.projects.trainning.dto.OrganizacaoDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Example 59 with Organizacao

use of com.tomasio.projects.trainning.model.Organizacao in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method findAllOrganizacoesSubordinadas.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllOrganizacoesSubordinadas(Long organizacaoId) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllOrganizacoesSubordinadas(organizacaoId);
        if (organizacoes != null) {
            organizacoesArray = convertToArray(organizacoes);
        }
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    }
    return organizacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Organizacao(com.tomasio.projects.trainning.model.Organizacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) OrganizacaoDTO(com.tomasio.projects.trainning.dto.OrganizacaoDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Example 60 with Organizacao

use of com.tomasio.projects.trainning.model.Organizacao in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method findAllOrganizacoesDiretamenteSubordinadas.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllOrganizacoesDiretamenteSubordinadas(Long organizacaoId) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllOrganizacoesDiretamenteSubordinadas(organizacaoId);
        if (organizacoes != null) {
            organizacoesArray = convertToArray(organizacoes);
        }
    } catch (DAOException ex) {
        throw new CoreException("Erro de de acesso ao banco de dados: " + ex.getMessage());
    }
    return organizacoesArray;
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) Organizacao(com.tomasio.projects.trainning.model.Organizacao) CoreException(com.tomasio.projects.trainning.exeption.CoreException) OrganizacaoDTO(com.tomasio.projects.trainning.dto.OrganizacaoDTO) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Organizacao (com.tomasio.projects.trainning.model.Organizacao)80 DAOException (com.tomasio.projects.trainning.exception.DAOException)77 Transactional (org.springframework.transaction.annotation.Transactional)45 CoreException (com.tomasio.projects.trainning.exeption.CoreException)41 OrganizacaoDTO (com.tomasio.projects.trainning.dto.OrganizacaoDTO)35 OrganizacaoDAO (com.tomasio.projects.trainning.dao.OrganizacaoDAO)19 Pessoa (com.tomasio.projects.trainning.model.Pessoa)19 PessoaDAO (com.tomasio.projects.trainning.dao.PessoaDAO)17 HibernatePessoaDAO (com.tomasio.projects.trainning.dao.HibernatePessoaDAO)15 ImportTurmasImplEfetivasFromTabelao (com.tomasio.projects.trainning.migration.ImportTurmasImplEfetivasFromTabelao)10 ResultSet (java.sql.ResultSet)10 SQLException (java.sql.SQLException)10 Statement (java.sql.Statement)10 HibernateOrganizacaoDAO (com.tomasio.projects.trainning.dao.HibernateOrganizacaoDAO)9 ArrayList (java.util.ArrayList)9 Date (java.sql.Date)8 NetworkUserDAO (com.tomasio.projects.trainning.dao.NetworkUserDAO)5 Session (org.hibernate.Session)5 MatriculaDAO (com.tomasio.projects.trainning.dao.MatriculaDAO)4 NetworkGroupDAO (com.tomasio.projects.trainning.dao.NetworkGroupDAO)4