Interface JpaRepositoryOperations
- All Superinterfaces:
io.micronaut.context.ApplicationContextProvider, io.micronaut.core.convert.ConversionServiceProvider, HintsCapableRepository, PrimaryRepositoryOperations, RepositoryOperations
Operations interface specific to JPA.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescription<T> voiddetach(@NonNull T entity) Detach the entity from the persistence context.voidflush()Flush the current session.@NonNull jakarta.persistence.EntityManager@NonNull jakarta.persistence.EntityManagerFactory<T> @NonNull TCreate an uninitialized proxy.<T> @NonNull Tmerge(@NonNull T entity) Merges the entity.<T> voidpersist(@NonNull T entity) Persist the entity.<T> voidrefresh(@NonNull T entity) Refresh the entity state from the database.<T> voidremove(@NonNull T entity) Remove the entity from the persistence context and schedule deletion.Methods inherited from interface io.micronaut.context.ApplicationContextProvider
getApplicationContextMethods inherited from interface io.micronaut.core.convert.ConversionServiceProvider
getConversionServiceMethods inherited from interface HintsCapableRepository
getQueryHintsMethods inherited from interface RepositoryOperations
count, delete, deleteAll, execute, executeDelete, executeUpdate, exists, findAll, findAll, findOne, findOne, findPage, findStream, findStream, getEntity, persist, persistAll, update, updateAll
-
Method Details
-
getCurrentEntityManager
@NonNull jakarta.persistence.EntityManager getCurrentEntityManager()- Returns:
- The current entity manager
-
getEntityManagerFactory
@NonNull jakarta.persistence.EntityManagerFactory getEntityManagerFactory()- Returns:
- The entity manager factory
-
load
-
merge
<T> @NonNull T merge(@NonNull T entity) Merges the entity.- Type Parameters:
T- The entity type- Parameters:
entity- The entity to be merged- Returns:
- merged entity
- See Also:
-
flush
void flush()Flush the current session. -
persist
<T> void persist(@NonNull T entity) Persist the entity.- Type Parameters:
T- The entity type- Parameters:
entity- The entity to persist- Since:
- 5.0
-
refresh
<T> void refresh(@NonNull T entity) Refresh the entity state from the database.- Type Parameters:
T- The entity type- Parameters:
entity- The entity to refresh- Since:
- 5.0
-
remove
<T> void remove(@NonNull T entity) Remove the entity from the persistence context and schedule deletion.- Type Parameters:
T- The entity type- Parameters:
entity- The entity to remove- Since:
- 5.0
-
detach
<T> void detach(@NonNull T entity) Detach the entity from the persistence context.- Type Parameters:
T- The entity type- Parameters:
entity- The entity to detach- Since:
- 5.0
-