Annotation Interface Relationship
@Retention(RUNTIME)
@Target(FIELD)
@Documented
@Inherited
@API(status=STABLE,
since="6.0")
public @interface Relationship
Annotation to configure mappings of relationship.
- Since:
- 6.0
- Author:
- Michael J. Simons
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of the direction a relationship can take. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionIfdirection
isRelationship.Direction.OUTGOING
, than the attribute annotated withRelationship
will be the target node of the relationship and the class containing the annotated attribute will be the start node.
-
Element Details
-
value
- Returns:
- See
type()
.
- Default:
- ""
-
type
- Returns:
- The type of the relationship.
- Default:
- ""
-
direction
Relationship.Direction directionIfdirection
isRelationship.Direction.OUTGOING
, than the attribute annotated withRelationship
will be the target node of the relationship and the class containing the annotated attribute will be the start node.If
direction
isRelationship.Direction.INCOMING
, than the attribute annotated withRelationship
will be the start node of the relationship and the class containing the annotated attribute will be the end node.- Returns:
- The direction of the relationship.
- Default:
- OUTGOING
-