Rev 259 | Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 227 | espaco | 1 | package br.com.ec.repository.jpa; |
| 2 | |||
| 3 | import org.springframework.stereotype.Repository; |
||
| 4 | |||
| 5 | import br.com.ec.domain.modal.Perfil; |
||
| 6 | import br.com.ec.repository.PerfilRepository; |
||
| 7 | import br.com.ec.repository.SistemaAbstractRepository; |
||
| 8 | |||
| 9 | @Repository |
||
| 10 | public class PerfilRepositoryJpaImpl extends SistemaAbstractRepository<Perfil> implements PerfilRepository { |
||
| 11 | |||
| 12 | @Override |
||
| 13 | protected String getColunaOrdenadora() { |
||
| 14 | return "descricao"; |
||
| 15 | } |
||
| 16 | |||
| 17 | /* |
||
| 18 | @Override |
||
| 19 | public List<Perfil> consultarPerfisComSetoresAtivos() { |
||
| 20 | StringBuilder sql = new StringBuilder(); |
||
| 21 | sql.append("SELECT e FROM Perfil e "); |
||
| 22 | sql.append("WHERE e.ativoSetor is true "); |
||
| 23 | sql.append("ORDER BY e.descricao"); |
||
| 24 | try { |
||
| 25 | TypedQuery<Perfil> query = (TypedQuery<Perfil>) getEntityManager().createQuery(sql.toString(), Perfil.class); |
||
| 26 | return query.getResultList(); |
||
| 27 | } catch(Exception ex) { |
||
| 28 | ex.printStackTrace(); |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | */ |
||
| 33 | |||
| 34 | } |