Search in sources :

Example 1 with Organizacao

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

the class OrganizationalServiceSimpleImpl method findAllOrganizacoesExternasByEstadoId.

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

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

the class OrganizationalServiceSimpleImpl method findAllOrganizacoesFAB.

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

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

the class OrganizationalServiceSimpleImpl method searchOrganizacoesFABByNome.

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

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

the class OrganizationalServiceSimpleImpl method searchComandos.

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

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

the class OrganizationalServiceSimpleImpl method findAllUnidadesByCidadeId.

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

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