Search in sources :

Example 11 with Organizacao

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

the class OrganizationalServiceSimpleImpl method findAllUnidades.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllUnidades() {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllUnidade();
        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 12 with Organizacao

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

the class OrganizationalServiceSimpleImpl method findAllComandosByEstadoId.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllComandosByEstadoId(Long estadoId) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllComandoByEstadoId(estadoId);
        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 13 with Organizacao

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

the class OrganizationalServiceSimpleImpl method searchOrganizacoesByNome.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] searchOrganizacoesByNome(String term) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.searchByNome(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 14 with Organizacao

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

the class OrganizationalServiceSimpleImpl method findAllComandosByCidadeId.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] findAllComandosByCidadeId(Long cidadeId) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.findAllComandoByCidadeId(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 15 with Organizacao

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

the class OrganizationalServiceSimpleImpl method searchComandosBySigla.

@Override
@Transactional(readOnly = true)
public OrganizacaoDTO[] searchComandosBySigla(String term) {
    OrganizacaoDAO dao = factory.getOrganizacaoDAO();
    OrganizacaoDTO[] organizacoesArray = null;
    try {
        List<Organizacao> organizacoes = dao.searchComandoBySigla(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)

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