Escolar Documentos
Profissional Documentos
Cultura Documentos
1. Verbos HTTP
2. Retornos HTTP
3. JSON
4.2 Repository
2
Página
4.3 Service
4.4 Controller
5. Query Methods
Query methods são métodos que recuperam informação do banco de dados e estão declarados na
interface repository, na qual a consulta é baseada no nome do método. No exemplo abaixo, temos uma
consulta por nome.
3
Página
Palavra-chave Exemplo Código JPQL
… where x.lastname = ?1 or
Or findByLastnameOrFirstname x.firstname = ?2
findByFirstname,
findByFirstnameIs,
Is,Equals findByFirstnameEquals … where x.firstname = 1?
findByAgeIn(Collection<Age>
In ages) … where x.age in ?1
findByAgeNotIn(Collection<Age>
NotIn age) … where x.age not in ?1
… where UPPER(x.firstame) =
IgnoreCase findByFirstnameIgnoreCase UPPER(?1)
4
Página