Annotation Interface TypeName
Gives a persistent and human-readable type name for Entity or ValueObject.
This name is used everywhere by JaVers, instead of a fragile, fully-qualified class name.
Naming types is recommended if you are using
Usage example:
Important
All classes with @TypeName should be registered using
or
Naming types is recommended if you are using
JaversRepository.
It fosters refactoring of package names and class names.
Usage example:
@Entity
@TypeName("Person")
class Person {
@Id
private int id;
private String name;
}
@TypeName works similarly to org.springframework.data.annotation.TypeAlias
in Spring Data.
Important
All classes with @TypeName should be registered using
JaversBuilder.withPackagesToScan(String)or
javers.packagesToScan Spring Boot starter property.- Since:
- 1.4
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueThe type name to be used when comparing and persisting
-