Annotation Interface EntityDefining


@Target(ANNOTATION_TYPE) @Retention(RUNTIME) @Documented public @interface EntityDefining
Designates an annotation as an entity-defining annotation type within the Jakarta Data framework.

Annotations marked with EntityDefining are recognized by annotation processors, CDI extensions, and other components of the Jakarta Data framework as declaring entity types. Jakarta Data providers and persistence models that provide custom entity-defining annotations (entity annotations other than jakarta.persistence.Entity and jakarta.nosql.Entity) must annotate each custom entity-defining annotation with this annotation. Applications must not use this annotation directly.

This allows other Jakarta Data providers and tools to recognize and process entities declared with custom entity-defining annotations.

Example of defining a custom entity annotation by a provider:

 @EntityDefining
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface CustomEntity {
 }
 
Example usage of a provider-defined custom entity annotation:

 @CustomEntity
 public class Book {
     // Implementation details here
 }