-
- All Known Subinterfaces:
ValidatingRelationDescriptor<S,T>
- All Known Implementing Classes:
AbstractRelationDescriptor
,AuthenticatedUserRelationDescriptor
,CollaboratorRelationDescriptor
,CumulativeContributorRelationDescriptor
,DefaultValidatingRelationDescriptor
,FavouriteRelationDescriptor
,LikeRelationDescriptor
,NamedRelationDescriptor
,TouchedRelationDescriptor
@ExperimentalSpi public interface RelationDescriptor<S extends Relatable,T extends Relatable>
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
orNamedRelationDescriptor
- Since:
- 5.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getRelationName()
Get relation name.Class<S>
getSourceClass()
Returns class of source entity of the relation.Class<T>
getTargetClass()
Returns class of target entity of the relation.
-
-
-
Method Detail
-
getRelationName
String getRelationName()
Get relation name. Relation name should be unique per relation type. For example: "favouriteContentRelation", "watchRelation" etc.- Returns:
- relation name.
-
getSourceClass
Class<S> getSourceClass()
Returns class of source entity of the relation. Source entity is always subclass ofRelatable
- Returns:
- type of source entity
-
-