Interface PanacheManagedReactiveRepositoryOperations<Entity,Id>
- All Superinterfaces:
PanacheManagedRepositoryOperations<Entity,io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session>, io.smallrye.mutiny.Uni<Void>, io.smallrye.mutiny.Uni<Boolean>, Id>
- All Known Subinterfaces:
PanacheManagedReactiveRepository<Entity>,PanacheManagedReactiveRepositoryBase<Entity,,Id> PanacheRepository.Reactive<Entity,Id>
public interface PanacheManagedReactiveRepositoryOperations<Entity,Id>
extends PanacheManagedRepositoryOperations<Entity,io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session>,io.smallrye.mutiny.Uni<Void>,io.smallrye.mutiny.Uni<Boolean>,Id>
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.smallrye.mutiny.Uni<Void> Delete the given entity from the database, if it is already persisted.default io.smallrye.mutiny.Uni<Void> flush()Flushes all pending changes to the database using the Session for theentity class. default io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session> Returns theMutiny.Sessionfor theentity class for extra operations (eg. default io.smallrye.mutiny.Uni<Boolean> isPersistent(Entity entity) Returns true if the given entity is persistent in the database.default io.smallrye.mutiny.Uni<Void> Persist the given entity in the database, if not already persisted.default io.smallrye.mutiny.Uni<Void> Persist all given entities.default io.smallrye.mutiny.Uni<Void> Persist all given entities.default io.smallrye.mutiny.Uni<Void> Persist all given entities.default io.smallrye.mutiny.Uni<Void> persistAndFlush(Entity entity) Persist the given entity in the database, if not already persisted.
-
Method Details
-
getSession
default io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session> getSession()Returns theMutiny.Sessionfor theentity class for extra operations (eg. CriteriaQueries) - Specified by:
getSessionin interfacePanacheManagedRepositoryOperations<Entity,io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session>, io.smallrye.mutiny.Uni<Void>, io.smallrye.mutiny.Uni<Boolean>, Id> - Returns:
- the
Mutiny.Sessionfor theentity class
-
persist
Persist the given entity in the database, if not already persisted. -
persistAndFlush
Persist the given entity in the database, if not already persisted. Then flushes all pending changes to the database.- Specified by:
persistAndFlushin interfacePanacheManagedRepositoryOperations<Entity,io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session>, io.smallrye.mutiny.Uni<Void>, io.smallrye.mutiny.Uni<Boolean>, Id> - Parameters:
entity- the entity to persist.- See Also:
-
delete
Delete the given entity from the database, if it is already persisted. -
isPersistent
Returns true if the given entity is persistent in the database. If yes, all modifications to its persistent fields will be automatically committed to the database at transaction commit time.- Specified by:
isPersistentin interfacePanacheManagedRepositoryOperations<Entity,io.smallrye.mutiny.Uni<org.hibernate.reactive.mutiny.Mutiny.Session>, io.smallrye.mutiny.Uni<Void>, io.smallrye.mutiny.Uni<Boolean>, Id> - Parameters:
entity- the entity to check- Returns:
- true if the entity is persistent in the database.
-
flush
Flushes all pending changes to the database using the Session for theentity class. -
persist
Persist all given entities. -
persist
Persist all given entities. -
persist
Persist all given entities.
-