Package io.micronaut.data.jpa.repository
Interface JpaRepository<E,ID>
-
- Type Parameters:
E- The entity typeID- The ID type
- All Superinterfaces:
io.micronaut.data.repository.CrudRepository<E,ID>,io.micronaut.data.repository.GenericRepository<E,ID>,io.micronaut.data.repository.PageableRepository<E,ID>
public interface JpaRepository<E,ID> extends io.micronaut.data.repository.CrudRepository<E,ID>, io.micronaut.data.repository.PageableRepository<E,ID>Simple composed repository interface that includesCrudRepositoryandPageableRepository.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<E>findAll()java.util.List<E>findAll(io.micronaut.data.model.Sort sort)voidflush()Adds a flush method.<S extends E>
Sload(@NotNull java.io.Serializable id)Adds a load method.<S extends E>
java.util.List<S>saveAll(@Valid @NotNull java.lang.Iterable<S> entities)<S extends E>
SsaveAndFlush(S entity)Save and perform a flush() of any pending operations.
-
-
-
Method Detail
-
saveAll
@NonNull <S extends E> java.util.List<S> saveAll(@NonNull @Valid @NotNull @Valid @NotNull java.lang.Iterable<S> entities)
-
findAll
@NonNull java.util.List<E> findAll()
-
findAll
@NonNull java.util.List<E> findAll(@NonNull io.micronaut.data.model.Sort sort)
-
saveAndFlush
@QueryHint(name="javax.persistence.FlushModeType", value="AUTO") <S extends E> S saveAndFlush(@NonNull @Valid @NotNull 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
-
flush
void flush()
Adds a flush method.
-
load
<S extends E> S load(@NonNull @NotNull @NotNull java.io.Serializable id)
Adds a load method.- Type Parameters:
S- the entity type- Parameters:
id- the entity ID- Returns:
- An uninitialized proxy
-
-