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 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 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)
Copyright © 2016, 2017 Oracle Corp. All Rights Reserved.