Skip to content

Commit

Permalink
Added annotation to locate classes that have an entity id type constant
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schnell committed Jan 14, 2024
1 parent ba77360 commit b293711
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/org/fuin/ddd4j/ddd/EntityIdTypeConstant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.fuin.ddd4j.ddd;

import java.lang.annotation.*;

/**
* A class that has a public static constant of type {@link EntityType}.
* The expected default name of the constant is <b>TYPE</b>.
*/
@Documented
@Target(ElementType.TYPE)
@Inherited
@Retention(RetentionPolicy.RUNTIME)
public @interface EntityIdTypeConstant {

/**
* Returns the name of a public static constant of type {@link EntityType} in the annotated class.
*
* @return Name of the public static constant.
*/
String value() default "TYPE";

}

0 comments on commit b293711

Please sign in to comment.