public final class TypeConverter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PropertyType |
entityTypeToPropertyType(EntityType type)
Converts an entity type to a property type.
|
static IdType |
getIdTypeForPropertyType(PropertyType propertyType)
Converts an IdType to the corresponding matching property type
|
static PropertyType |
getPropertyTypeForIdType(IdType idType)
Converts an IdType to the corresponding matching property type
|
static EntityType |
propertyTypeToEntityType(PropertyType type)
Delegate to
propertyTypeToEntityType(PropertyType, boolean) with strict = true |
static EntityType |
propertyTypeToEntityType(PropertyType type,
boolean strict)
Converts a property type to an entity type.
|
public static PropertyType entityTypeToPropertyType(EntityType type)
Converts
EntityType.VERTEX
to PropertyType.VERTEX
and EntityType.EDGE
to PropertyType.EDGE
.
type
- the entity type to convertpropertyTypeToEntityType(PropertyType, boolean)
public static IdType getIdTypeForPropertyType(PropertyType propertyType)
propertyType
- the id type we want to know the matching property type ofpublic static PropertyType getPropertyTypeForIdType(IdType idType)
idType
- the id type we want to know the matching property type ofpublic static EntityType propertyTypeToEntityType(PropertyType type)
propertyTypeToEntityType(PropertyType, boolean)
with strict = true
type
- the property type to convertpropertyTypeToEntityType(PropertyType, boolean)
public static EntityType propertyTypeToEntityType(PropertyType type, boolean strict)
strict
parameter is true, an exception is thrown when a PropertyType is not convertible to an
EntityType. Otherwise null
is returned.
Converts PropertyType.VERTEX
to EntityType.VERTEX
and PropertyType.EDGE
to EntityType.EDGE
.
type
- the property type to convertstrict
- if true throw exception on not convertible types. If false return null in that casepropertyTypeToEntityType(PropertyType)
,
entityTypeToPropertyType(EntityType)