Package io.micronaut.data.jpa.repository
Interface JpaRepository<E,ID> 
- Type Parameters:
- E- The entity type
- ID- The ID type
- All Superinterfaces:
- CrudRepository<E,,- ID> - GenericRepository<E,,- ID> - PageableRepository<E,- ID> 
Simple composed repository interface that includes 
CrudRepository and PageableRepository.- Since:
- 1.0.0
- Author:
- graemerocher
- 
Method SummaryModifier and TypeMethodDescriptionfindAll()Returns all instances of the type.Find all results for the given sort order.voidflush()Adds a flush method.<S extends E>
 SAdds a load method.<S extends E>
 Smerge(S entity) Merge the state of the given entity into the current persistence context.Saves all given entities, possibly returning new instances representing the saved state.<S extends E>
 SsaveAndFlush(S entity) Save and perform a flush() of any pending operations.Methods inherited from interface io.micronaut.data.repository.CrudRepositorycount, delete, deleteAll, deleteAll, deleteById, existsById, findById, save, update, updateAllMethods inherited from interface io.micronaut.data.repository.PageableRepositoryfindAll
- 
Method Details- 
saveAllDescription copied from interface:CrudRepositorySaves all given entities, possibly returning new instances representing the saved state.- Specified by:
- saveAllin interface- CrudRepository<E,- ID> 
- Type Parameters:
- S- The generic type
- Parameters:
- entities- The entities to saved. Must not be null.
- Returns:
- The saved entities objects. will never be null.
 
- 
findAllDescription copied from interface:CrudRepositoryReturns all instances of the type.- Specified by:
- findAllin interface- CrudRepository<E,- ID> 
- Returns:
- all entities
 
- 
findAllDescription copied from interface:PageableRepositoryFind all results for the given sort order.- Specified by:
- findAllin interface- PageableRepository<E,- ID> 
- Parameters:
- sort- The sort
- Returns:
- The iterable results
 
- 
saveAndFlush@QueryHint(name="jakarta.persistence.FlushModeType", value="AUTO") <S extends E> S saveAndFlush(@NonNull S entity) Save and perform a flush() of any pending operations.- Type Parameters:
- S- The entity generic type
- Parameters:
- entity- The entity
- Returns:
- The entity, possibly mutated
 
- 
flushvoid flush()Adds a flush method.
- 
loadAdds a load method.- Type Parameters:
- S- the entity type
- Parameters:
- id- the entity ID
- Returns:
- An uninitialized proxy
 
- 
mergeMerge the state of the given entity into the current persistence context.- Type Parameters:
- S- The entity type
- Parameters:
- entity- entity instance
- Returns:
- the managed instance that the state was merged to
 
 
-