com.thinkaurelius.titan.graphdb.types

## Class StandardRelationTypeMaker

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker

- All Implemented Interfaces:
    RelationTypeMaker
  Direct Known Subclasses:
    StandardEdgeLabelMaker, StandardPropertyKeyMaker

      public abstract class StandardRelationTypeMaker
      extends Object
      implements RelationTypeMaker

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AttributeHandling` | `attributeHandler`
    `protected IndexSerializer` | `indexSerializer`
    `protected StandardTitanTx` | `tx`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardRelationTypeMaker(StandardTitanTx tx, IndexSerializer indexSerializer, AttributeHandling attributeHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkName(String name)`
    `protected Multiplicity` | `getMultiplicity()`
    `String` | `getName()` Returns the name of this configured relation type.
    `protected boolean` | `hasSortKey()`
    `StandardRelationTypeMaker` | `hidden()`
    `protected TypeDefinitionMap` | `makeDefinition()`
    `StandardRelationTypeMaker` | `multiplicity(Multiplicity multiplicity)`
    `StandardRelationTypeMaker` | `name(String name)`
    `StandardRelationTypeMaker` | `signature(RelationType... types)` Configures the signature of this relation type.
    `StandardRelationTypeMaker` | `sortKey(RelationType... types)` Configures the composite sort key for this label.
    `StandardRelationTypeMaker` | `sortOrder(Order order)` Defines in which order to sort the relations for efficient retrieval, i.e.
    `StandardRelationTypeMaker` | `status(SchemaStatus status)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.thinkaurelius.titan.core.schema.RelationTypeMaker

      `make`

- - ### Field Detail

    - #### tx

          protected final StandardTitanTx tx

    - #### indexSerializer

          protected final IndexSerializer indexSerializer

    - #### attributeHandler

          protected final AttributeHandling attributeHandler

  - ### Constructor Detail

    - #### StandardRelationTypeMaker

          public StandardRelationTypeMaker(StandardTitanTx tx,
                                   IndexSerializer indexSerializer,
                                   AttributeHandling attributeHandler)

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `RelationTypeMaker`
      Returns the name of this configured relation type.
      Specified by:
        `getName` in interface `RelationTypeMaker`
      Returns:

    - #### hasSortKey

          protected boolean hasSortKey()

    - #### getMultiplicity

          protected Multiplicity getMultiplicity()

    - #### checkName

          public static void checkName(String name)

    - #### makeDefinition

          protected final TypeDefinitionMap makeDefinition()

    - #### multiplicity

          public StandardRelationTypeMaker multiplicity(Multiplicity multiplicity)

    - #### signature

          public StandardRelationTypeMaker signature(RelationType... types)

      Description copied from interface: `RelationTypeMaker`
      Configures the signature of this relation type.

      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.
      Specified by:
        `signature` in interface `RelationTypeMaker`
      Parameters:
        `types` - RelationTypes composing the signature for the configured relation type. The order is irrelevant.
      Returns:
        this RelationTypeMaker

    - #### status

          public StandardRelationTypeMaker status(SchemaStatus status)

    - #### sortKey

          public StandardRelationTypeMaker sortKey(RelationType... types)

      Configures the composite sort key for this label.

      Specifying the sort key of a type allows relations of this type to be efficiently retrieved in the order of the sort key.
      For instance, if the edge label friend has the sort key (since), which is a property key with a timestamp data type, then one can efficiently retrieve all edges with label friend in a specified time interval using `TitanVertexQuery.interval(com.thinkaurelius.titan.core.PropertyKey, Comparable, Comparable)`.
      In other words, relations are stored on disk in the order of the configured sort key. The sort key is empty by default.
      If multiple types are specified as sort key, then those are considered as a composite sort key, i.e. taken jointly in the given order.

      `RelationType`s used in the sort key must be either property out-unique keys or out-unique unidirected edge lables.
      Parameters:
        `types` - TitanTypes composing the sort key. The order is relevant.
      Returns:
        this LabelMaker

    - #### sortOrder

          public StandardRelationTypeMaker sortOrder(Order order)

      Defines in which order to sort the relations for efficient retrieval, i.e. either increasing (`Order.ASC`) or decreasing (`Order.DESC`). Note, that only one sort order can be specified and that a sort key must be defined to use a sort order.
      Parameters:
        `order` -
      Returns:
      See Also:
        `sortKey(RelationType...)`

    - #### name

          public StandardRelationTypeMaker name(String name)

    - #### hidden

          public StandardRelationTypeMaker hidden()

Copyright © 2012–2014. All rights reserved.