Package jakarta.data.repository


package jakarta.data.repository

A repository is an interface annotated with Repository that defines operations on entities. Entities represent data in the persistent store. In Domain-driven design, a repository participates in the domain but abstracts away storage and infrastructure details.

Repository interfaces can optionally inherit from built-in interfaces within this package,

Repository interfaces can also define their own lifecycle methods using the Insert, Update, Save, and Delete annotations, as well as a variety of other methods following the Query by Method Name pattern, the Parameter-based Conditions pattern, and the Query annotation.

The module Javadoc provides an overview of Jakarta Data.

  • Class
    Description
    A built-in repository supertype for performing basic operations on entities.
    Annotates a parameter of a repository method, specifying a mapping to a persistent field:
    A built-in repository supertype for performing Create, Read, Update, and Delete (CRUD) operations.
    A built-in repository supertype that is the root of all other built-in repository supertype interfaces.
    Lifecycle annotation for repository methods which perform delete operations; alternatively, annotates a repository method as a parameter-based automatic query method which deletes entities.
    Annotates a repository method returning entities as a parameter-based automatic query method.
    Lifecycle annotation for repository methods which perform insert operations.
    Annotates a repository method to request sorting of results.
    Enables multiple OrderBy annotations on the method.
    Annotates a parameter of a repository method to bind it to a named parameter of a Query.
    Annotates a repository method as a query method, specifying a query written in Jakarta Data Query Language (JDQL) or in Jakarta Persistence Query Language (JPQL).
    Annotates a repository interface to be implemented by the container/runtime.
    Lifecycle annotation for repository methods which conditionally perform insert or update operations.
    Lifecycle annotation for repository methods which perform update operations.