-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added annotation to locate classes that have an entity id type constant
- Loading branch information
1 parent
ba77360
commit b293711
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/org/fuin/ddd4j/ddd/EntityIdTypeConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
||
} |