Package org.cyclos.entities
Annotation Type OwnerEntity
-
@Retention(RUNTIME) @Target(FIELD) public @interface OwnerEntity
This annotation can be used in a 'weak' entity to specify its owner (i.e the composite entity).
The concept of the owner here represents the strongest owner. For example: for a UserRecord, there will be two possible owners: the User and the RecordType, but the assigned user is the stronger owner. Also, the 'owner' relationship defined through this annotation must be immutable.
Another example: for a custom field possible value, the category and the field are possible owners, but the field is the strongest, moreover the category can be changed then it doesn't qualify as a possible owner. This information is used to validate the name and/or internal name uniqueness of an entity.
This information is used to validate name and/or internal name uniqueness of an entity, to find and entity by its qualified internal name (e.g. to find a transfer type: 'units.trade') and to automatically generate entity logs.