public abstract class TypeGroup extends Object
TitanType
s. Grouping TitanTypes into a TypeGroup has the benefit
that all relations whose type is in a group can be retrieved at once using TitanVertexQuery.group(TypeGroup)
.
For example, one could define the edge labels father, mother, sibling to be in the TypeGroup
family. This would allow the retrieval of all father,mother and sibling edges for a given vertex
with one database call.
TypeMaker.group(TypeGroup)
.
Modifier and Type | Field and Description |
---|---|
static TypeGroup |
DEFAULT_GROUP
The default type group when no group is specified during type construction.
|
Modifier | Constructor and Description |
---|---|
protected |
TypeGroup() |
Modifier and Type | Method and Description |
---|---|
static TypeGroup |
getDefaultGroup()
Returns the default type group.
|
abstract short |
getID()
Returns the id of the type group
|
abstract String |
getName()
Returns the name of the type group
|
static TypeGroup |
of(int id,
String name)
Creates and returns a new type group with the specified id and name
|
public static final TypeGroup of(int id, String name)
id
- ID of the type groupname
- Name of the type groupIllegalArgumentException
- if an invalid id is providedpublic static final TypeGroup getDefaultGroup()
public abstract String getName()
public abstract short getID()
Copyright © 2012-2013. All Rights Reserved.