Package org.starwars.server.jpa
Interface DroidRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Droid,
,UUID> org.springframework.data.repository.Repository<Droid,
UUID>
public interface DroidRepository
extends org.springframework.data.repository.CrudRepository<Droid,UUID>
- Author:
- etienne-sf
-
Method Summary
Modifier and TypeMethodDescriptionvoid
batchLoader
(List<UUID> keys) findAll()
findByAppearsIn
(String episode) As in this implementation, we have separate tables for the concrete classes of the Character interface, we use a nativeQuery.findFriends
(UUID id) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAllById, save, saveAll
-
Method Details
-
findAll
-
findAppearsInById
-
findByAppearsIn
-
findFriends
-
addFriend
-
findById
@Query(value="select id, name, primary_function from droid where id = ?1", nativeQuery=true) Optional<Droid> findById(UUID id) As in this implementation, we have separate tables for the concrete classes of the Character interface, we use a nativeQuery. Another option is to use a CharacterImpl view. -
batchLoader
-