Package com.syncleus.ferma.annotations
Annotation Type Incidence
@Retention(RUNTIME) @Target(METHOD) public @interface Incidence
Incidences annotate getters and adders to represent a Vertex incident to an Edge. This annotation extends the
TinkerPop built-in Incidence annotation. It allows type arguments to be passed into the annotated method. This
ensures the returned type is of the specified type in the argument. The following method signatures are valid.
T add*(Class<T> type)
T get*(Class<T> type)
When annotating a get* class it ensures it only returns nodes of the specified type (including sub-classes). Any
Nodes which are not of this type will not be returned.
- Since:
- 2.0.0
-
Required Element Summary
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description org.apache.tinkerpop.gremlin.structure.Direction
direction
The direction of the edges.Incidence.Operation
operation
The operation the method is performing on the vertex.
-
Element Details
-
-
direction
org.apache.tinkerpop.gremlin.structure.Direction directionThe direction of the edges.- Returns:
- the edge direction
- Since:
- 2.0.0
- Default:
- org.apache.tinkerpop.gremlin.structure.Direction.OUT
-
operation
Incidence.Operation operationThe operation the method is performing on the vertex.- Returns:
- The operation to be performed.
- Default:
- com.syncleus.ferma.annotations.Incidence.Operation.AUTO
-