public enum PropertyType extends java.lang.Enum<PropertyType> implements Type
| Enum Constant and Description |
|---|
BOOLEAN
Boolean type for properties
|
DOUBLE
Double type for properties
|
EDGE
Edge type for properties
|
FLOAT
Float type for properties
|
INTEGER
Integer type for properties
|
LOCAL_DATE
Date type for properties
|
LONG
Long type for properties
|
POINT2D
Point type to save longitude and latitude
|
STRING
String type for properties
|
TIME
Time type for properties
|
TIME_WITH_TIMEZONE
Time with timezone type for properties
|
TIMESTAMP
Timestamp type for properties
|
TIMESTAMP_WITH_TIMEZONE
Timestamp with timezone type for properties
|
VERTEX
Vertex type for properties
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_LABEL |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getDefaultValue()
Returns the default value that was used to create this PropertyType.
|
java.lang.Class<?> |
getTypeClass()
Gets the type class.
|
static PropertyType |
getTypeFor(java.lang.Class<?> typeClass)
Returns the PropertyType based on a typeClass.
|
boolean |
isNodeOrEdge()
Returns true if this PropertyType is an edge or node type.
|
boolean |
isNumericType()
Returns true if this PropertyType is a numeric type.
|
boolean |
isTemporalType()
Returns true if this PropertyType is a temporal type.
|
java.lang.Object |
parse(java.lang.String input)
Parses a string into this property type.
|
static boolean |
parseBoolean(java.lang.String input)
Parse boolean value from a string input.
|
static PropertyType |
parsePropertyType(java.lang.String input)
Parse PropertyType from a string value.
|
static java.time.temporal.Temporal |
parseTemporal(java.lang.String input,
PropertyType type) |
java.util.Optional<EntityType> |
toEntityType()
Converts this property type to an
EntityType. |
java.lang.String |
toKey()
Returns the key of this type as string.
|
java.lang.String |
toString()
Returns the key of this type as string.
|
static PropertyType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PropertyType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertyType BOOLEAN
public static final PropertyType DOUBLE
public static final PropertyType EDGE
public static final PropertyType FLOAT
public static final PropertyType INTEGER
public static final PropertyType LOCAL_DATE
public static final PropertyType LONG
public static final PropertyType POINT2D
public static final PropertyType STRING
public static final PropertyType TIME
public static final PropertyType TIME_WITH_TIMEZONE
public static final PropertyType TIMESTAMP
public static final PropertyType TIMESTAMP_WITH_TIMEZONE
public static final PropertyType VERTEX
public static final java.lang.String DEFAULT_LABEL
public java.lang.Object getDefaultValue()
public java.lang.Class<?> getTypeClass()
TypegetTypeClass in interface Typepublic static PropertyType getTypeFor(java.lang.Class<?> typeClass)
typeClass - Use this typeClass to derive the PropertyTypepublic boolean isNodeOrEdge()
public boolean isNumericType()
public boolean isTemporalType()
public java.lang.Object parse(java.lang.String input)
throws oracle.pgx.common.GmParseException
input - oracle.pgx.common.GmParseException - if this property type cannot be parsed.public static boolean parseBoolean(java.lang.String input)
input - String value to parse as boolean.public static PropertyType parsePropertyType(java.lang.String input)
input - Value to use to parse a PropertyType from. You can use the output of toString() as input.public static java.time.temporal.Temporal parseTemporal(java.lang.String input,
PropertyType type)
throws oracle.pgx.common.GmParseException
oracle.pgx.common.GmParseExceptionpublic java.util.Optional<EntityType> toEntityType()
EntityType.Optional matching this property type. The returned Optional
object is empty if this property type cannot be converted to EntityTypepublic java.lang.String toKey()
Typepublic java.lang.String toString()
toKey().toString in class java.lang.Enum<PropertyType>public static PropertyType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static PropertyType[] values()
for (PropertyType c : PropertyType.values()) System.out.println(c);