public enum PropertyType extends java.lang.Enum<PropertyType> implements Type
Enum Constant and Description |
---|
BOOLEAN
Boolean type for properties
|
DATE
Date type for properties
|
DOUBLE
Double type for properties
|
EDGE
Edge type for properties
|
FLOAT
Float type for properties
|
INTEGER
Integer type for properties
|
LONG
Long type for properties
|
LONG_SET
Long set type for properties
|
RO_STRING_SET
String set type for properties
|
SPARSE
Sparse type for properties
|
STRING
String type for properties
|
VERTEX
Node type for properties
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatDate(java.util.Date obj)
Format a Date instance, using the
DEFAULT_DATE_FORMAT . |
static java.text.SimpleDateFormat |
getDefaultDateFormat()
Thread safe default date format using
DEFAULT_DATE_FORMAT |
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.
|
java.lang.Object |
parse(java.lang.String input)
Parses a sring into this property type.
|
static boolean |
parseBoolean(java.lang.String input)
Parse boolean value from a string input.
|
static java.util.Date |
parseDate(java.lang.String input)
Parse a string as Date, using the
DEFAULT_DATE_FORMAT . |
static PropertyType |
parsePropertyType(java.lang.String input)
Parse PropertyType from a string value.
|
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 DATE
public static final PropertyType DOUBLE
public static final PropertyType EDGE
public static final PropertyType FLOAT
public static final PropertyType INTEGER
public static final PropertyType LONG
public static final PropertyType LONG_SET
public static final PropertyType RO_STRING_SET
public static final PropertyType SPARSE
public static final PropertyType STRING
public static final PropertyType VERTEX
public static java.lang.String formatDate(java.util.Date obj)
DEFAULT_DATE_FORMAT
.obj
- Date instance to format.public static java.text.SimpleDateFormat getDefaultDateFormat()
DEFAULT_DATE_FORMAT
public java.lang.Object getDefaultValue()
public java.lang.Class<?> getTypeClass()
Type
getTypeClass
in interface Type
public static PropertyType getTypeFor(java.lang.Class<?> typeClass)
typeClass
- Use this typeClass to derive the PropertyTypepublic boolean isNodeOrEdge()
public boolean isNumericType()
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 java.util.Date parseDate(java.lang.String input) throws oracle.pgx.common.GmParseException
DEFAULT_DATE_FORMAT
.input
- String value to parse as Date.oracle.pgx.common.GmParseException
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 java.lang.String toKey()
Type
public 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);
Copyright © 2016, 2017 Oracle Corp. All Rights Reserved.