Search in sources :

Example 46 with OrganizacaoDTO

use of com.tomasio.projects.trainning.dto.OrganizacaoDTO 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 47 with OrganizacaoDTO

use of com.tomasio.projects.trainning.dto.OrganizacaoDTO 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)

Example 48 with OrganizacaoDTO

use of com.tomasio.projects.trainning.dto.OrganizacaoDTO in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method searchOrganizacoesExternasByNome.

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

use of com.tomasio.projects.trainning.dto.OrganizacaoDTO in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method searchOrganizacoesExternas.

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

use of com.tomasio.projects.trainning.dto.OrganizacaoDTO in project trainning by fernandotomasio.

the class OrganizationalServiceSimpleImpl method findAllUnidadesByEstadoId.

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

Aggregations

OrganizacaoDTO (com.tomasio.projects.trainning.dto.OrganizacaoDTO)150 CoreException (com.tomasio.projects.trainning.exeption.CoreException)54 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)52 ArrayList (java.util.ArrayList)41 HashMap (java.util.HashMap)39 TurmaEfetivaDTO (com.tomasio.projects.trainning.dto.TurmaEfetivaDTO)37 DAOException (com.tomasio.projects.trainning.exception.DAOException)37 Organizacao (com.tomasio.projects.trainning.model.Organizacao)35 Map (java.util.Map)35 Transactional (org.springframework.transaction.annotation.Transactional)35 PessoaDTO (com.tomasio.projects.trainning.dto.PessoaDTO)33 Date (java.util.Date)23 SimpleDateFormat (java.text.SimpleDateFormat)21 List (java.util.List)18 IndicacaoAlunoDTO (com.tomasio.projects.trainning.dto.IndicacaoAlunoDTO)17 FaseDTO (com.tomasio.projects.trainning.dto.FaseDTO)14 MatriculaDTO (com.tomasio.projects.trainning.dto.MatriculaDTO)14 CancelamentoMatriculaDTO (com.tomasio.projects.trainning.dto.CancelamentoMatriculaDTO)12 CustoDTO (com.tomasio.projects.trainning.dto.CustoDTO)12 IndicacaoDTO (com.tomasio.projects.trainning.dto.IndicacaoDTO)12