public interface EdgeLabelMaker extends RelationTypeMaker
EdgeLabel
s.
An edge label is defined by its name, Multiplicity
, its directionality, and its signature - all of which
can be specified in this builder.Modifier and Type | Method and Description |
---|---|
EdgeLabelMaker |
directed()
Configures the label to be directed.
|
EdgeLabel |
make()
Defines the
EdgeLabel specified by this EdgeLabelMaker and returns the resulting label |
EdgeLabelMaker |
multiplicity(Multiplicity multiplicity)
Sets the multiplicity of this label.
|
EdgeLabelMaker |
signature(PropertyKey... types)
Configures the signature of this relation type.
|
EdgeLabelMaker |
unidirected()
Configures the label to be unidirected.
|
getName
EdgeLabelMaker multiplicity(Multiplicity multiplicity)
Multiplicity.MULTI
.Multiplicity
EdgeLabelMaker directed()
By default, the label is directed.
EdgeLabel.isDirected()
EdgeLabelMaker unidirected()
By default, the type is directed.
EdgeLabel.isUnidirected()
EdgeLabelMaker signature(PropertyKey... types)
RelationTypeMaker
Specifying the signature of a type tells the graph database to expect that relations of this type
always have or are likely to have an incident property or unidirected edge of the type included in the
signature. This allows the graph database to store such relations more compactly and retrieve them more quickly.
For instance, if all edges with label friend have a property with key createdOn, then specifying
(createdOn) as the signature for label friend allows friend edges to be stored more efficiently.
RelationType
s used in the signature must be either property out-unique keys or out-unique unidirected edge labels.
The signature is empty by default.
signature
in interface RelationTypeMaker
types
- PropertyKey composing the signature for the configured relation type. The order is irrelevant.EdgeLabel make()
EdgeLabel
specified by this EdgeLabelMaker and returns the resulting labelmake
in interface RelationTypeMaker
EdgeLabel
Copyright © 2012–2024. All rights reserved.