Module io.helidon.data
Package io.helidon.data
package io.helidon.data
Helidon Data Repository.
The Helidon Data Repository provides unified API to work with database queries. Data repository queries are an abstraction on top of Object–Relational Mapping (ORM). They allow compile time translation of interfaces with query definitions into implementing classes.
Data repository queries are methods of interfaces that extend Data.GenericRepository
.
Data repository queries can be implemented in three ways:
- using method annotated with
Data.Query
- using method name as query definition
- extending existing
Data.GenericRepository
child interfaces with common sets of query methods:Data.BasicRepository
to implement basic set of entity operationsData.CrudRepository
to implement entity CRUD operationsData.PageableRepository
to implement pageableData.BasicRepository.findAll()
queriesData.SessionRepository
to get access to persistence provider's session, e.g.jakarta.persistence.EntityManager
-
ClassDescriptionHelidon Data Repository annotations and interfaces.Data.BasicRepository<E,
ID> Data repository interface for basic entity operations.Data.CrudRepository<E,ID> Data repository interface for CRUD entity operations.Data.GenericRepository<E,ID> Data repository interface.Data.PageableRepository<E,ID> AData.GenericRepository
that supports pagination.Repository persistence unit name.Provider used to implement the repository.Qualifier used in generated code to reference which provider type to use when creating instances of repositories, such aseclipselink, jakarta, sql
.User supplied query.Repository interface.Data repository interface with persistence provider session support.ARuntimeException
that indicates an operation on a data repository has failed.Thrown when persistence entity being inserted already exists.Thrown when requested persistence entity cannot be found.Thrown when a query was expected to produce exactly one record but produced many instead.Thrown when a query was expected to produce a result, but did not.Thrown when an optimistic locking conflict occurs.Single rule of the dynamic ordering of the query result.Fluent API builder forOrder
.Fluent API builder base forOrder
.Generated implementation of the prototype, can be extended by descendant prototype implementations.Direction of the query result ordering.Page<T>Pageable query result as pages with total size of the result.Request pageable query result as page with page number and size.Fluent API builder forPageRequest
.PageRequest.BuilderBase<BUILDER extends PageRequest.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PageRequest> Fluent API builder base forPageRequest
.Generated implementation of the prototype, can be extended by descendant prototype implementations.Slice<T>Pageable query result as pages without total size of the result.Dynamic ordering of the query result.Fluent API builder forSort
.Fluent API builder base forSort
.Generated implementation of the prototype, can be extended by descendant prototype implementations.