- All Known Subinterfaces:
ValidatingRelationDescriptor<S,T>
- All Known Implementing Classes:
AbstractRelationDescriptor,AuthenticatedUserRelationDescriptor,CollaboratorRelationDescriptor,CumulativeContributorRelationDescriptor,DefaultValidatingRelationDescriptor,FavouriteRelationDescriptor,LikeRelationDescriptor,NamedRelationDescriptor,TouchedRelationDescriptor
Defines relation name, type and who may have such relations.
Please do implement ths interface directly, if you need to create your own relation please use
AbstractRelationDescriptor or
NamedRelationDescriptor
- Since:
- 5.9
-
Method Summary
Modifier and TypeMethodDescriptionGet relation name.Returns class of source entity of the relation.Returns class of target entity of the relation.
-
Method Details
-
getRelationName
String getRelationName()Get relation name. Relation name should be unique per relation type. For example: "favouriteContentRelation", "watchRelation" etc.- Returns:
- relation name.
-
getSourceClass
Returns class of source entity of the relation. Source entity is always subclass ofRelatable- Returns:
- type of source entity
-
getTargetClass
Returns class of target entity of the relation. Target entity is always subclass ofRelatable- Returns:
- type of target entity
-