Annotation Interface Data.PersistenceUnit

Enclosing class:
Data

@Target(TYPE) @Retention(CLASS) public static @interface Data.PersistenceUnit
Repository persistence unit name.

This is an optional repository annotation.

When used, the persistence unit name will be used to lookup appropriate instance of configured data.persistence-units to handle this repository. This is useful when multiple databases are used from a single application.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of a named persistence unit.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the named Data.PersistenceUnit is required.
  • Element Details

    • value

      String value
      Name of a named persistence unit. When using configuration, this is expected under data.persistence-units.provider-type, where provider-type is the provider of the persistence unit (such as jakarta).
      Returns:
      the name
    • required

      boolean required
      Whether the named Data.PersistenceUnit is required.
      Returns:
      value of true when the named Data.PersistenceUnit is required, false otherwise, to use the default configuration if a named one is not available
      Default:
      true