diff --git a/src/main/java/org/fuin/ddd4j/ddd/EntityIdTypeConstant.java b/src/main/java/org/fuin/ddd4j/ddd/EntityIdTypeConstant.java new file mode 100644 index 0000000..814bad4 --- /dev/null +++ b/src/main/java/org/fuin/ddd4j/ddd/EntityIdTypeConstant.java @@ -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 TYPE. + */ +@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"; + +}