Package oracle.pgx.common.types
Enum PropertyType
- java.lang.Object
-
- java.lang.Enum<PropertyType>
-
- oracle.pgx.common.types.PropertyType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PropertyType>,Type
public enum PropertyType extends java.lang.Enum<PropertyType> implements Type
All supported graph property types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANBoolean type for propertiesDOUBLEDouble type for propertiesEDGEEdge type for propertiesFLOATFloat type for propertiesINTEGERInteger type for propertiesLOCAL_DATEDate type for propertiesLONGLong type for propertiesPOINT2DPoint type to save longitude and latitudeSTRINGString type for propertiesTIMETime type for propertiesTIME_WITH_TIMEZONETime with timezone type for propertiesTIMESTAMPTimestamp type for propertiesTIMESTAMP_WITH_TIMEZONETimestamp with timezone type for propertiesVERTEXVertex type for properties
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LABEL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetDefaultValue()Returns the default value that was used to create this PropertyType.java.lang.Class<?>getTypeClass()Gets the type class.static PropertyTypegetTypeFor(java.lang.Class<?> typeClass)Returns the PropertyType based on a typeClass.booleanisNodeOrEdge()Returns true if this PropertyType is an edge or node type.booleanisNumericType()Returns true if this PropertyType is a numeric type.booleanisTemporalType()Returns true if this PropertyType is a temporal type.java.lang.Objectparse(java.lang.String input)Parses a string into this property type.static booleanparseBoolean(java.lang.String input)Parse boolean value from a string input.static PropertyTypeparsePropertyType(java.lang.String input)Parse PropertyType from a string value.static java.time.temporal.TemporalparseTemporal(java.lang.String input, PropertyType type)java.util.Optional<EntityType>toEntityType()Converts this property type to anEntityType.java.lang.StringtoKey()Returns the key of this type as string.java.lang.StringtoString()Returns the key of this type as string.static PropertyTypevalueOf(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.
-
-
-
Enum Constant Detail
-
INTEGER
public static final PropertyType INTEGER
Integer type for properties
-
LONG
public static final PropertyType LONG
Long type for properties
-
FLOAT
public static final PropertyType FLOAT
Float type for properties
-
DOUBLE
public static final PropertyType DOUBLE
Double type for properties
-
BOOLEAN
public static final PropertyType BOOLEAN
Boolean type for properties
-
VERTEX
public static final PropertyType VERTEX
Vertex type for properties
-
EDGE
public static final PropertyType EDGE
Edge type for properties
-
STRING
public static final PropertyType STRING
String type for properties
-
LOCAL_DATE
public static final PropertyType LOCAL_DATE
Date type for properties- Since:
- 2.5.0
-
TIME
public static final PropertyType TIME
Time type for properties- Since:
- 2.5.0
-
TIMESTAMP
public static final PropertyType TIMESTAMP
Timestamp type for properties- Since:
- 2.5.0
-
TIME_WITH_TIMEZONE
public static final PropertyType TIME_WITH_TIMEZONE
Time with timezone type for properties- Since:
- 2.5.0
-
TIMESTAMP_WITH_TIMEZONE
public static final PropertyType TIMESTAMP_WITH_TIMEZONE
Timestamp with timezone type for properties- Since:
- 2.5.0
-
POINT2D
public static final PropertyType POINT2D
Point type to save longitude and latitude
-
-
Field Detail
-
DEFAULT_LABEL
public static final java.lang.String DEFAULT_LABEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static PropertyType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PropertyType c : PropertyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropertyType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getTypeFor
public static PropertyType getTypeFor(java.lang.Class<?> typeClass)
Returns the PropertyType based on a typeClass.- Parameters:
typeClass- Use this typeClass to derive the PropertyType- Returns:
- The PropertyType that belongs to this typeClass
-
parsePropertyType
public static PropertyType parsePropertyType(java.lang.String input)
Parse PropertyType from a string value.- Parameters:
input- Value to use to parse a PropertyType from. You can use the output oftoString()as input.- Returns:
- The PropertyType derived from the string input.
-
parseTemporal
public static java.time.temporal.Temporal parseTemporal(java.lang.String input, PropertyType type) throws oracle.pgx.common.GmParseException- Throws:
oracle.pgx.common.GmParseException
-
parseBoolean
public static boolean parseBoolean(java.lang.String input)
Parse boolean value from a string input.- Parameters:
input- String value to parse as boolean.- Returns:
- A boolean value that was parsed from the input.
-
getTypeClass
public java.lang.Class<?> getTypeClass()
Description copied from interface:TypeGets the type class.- Specified by:
getTypeClassin interfaceType- Returns:
- the Java class this type maps to
-
getDefaultValue
public java.lang.Object getDefaultValue()
Returns the default value that was used to create this PropertyType.- Returns:
- the default value that was used to create this PropertyType.
-
toKey
public java.lang.String toKey()
Description copied from interface:TypeReturns the key of this type as string.
-
toString
public java.lang.String toString()
Returns the key of this type as string. SeetoKey().- Overrides:
toStringin classjava.lang.Enum<PropertyType>- Returns:
- the String representation of this type, which is the enum key.
-
isNumericType
public boolean isNumericType()
Returns true if this PropertyType is a numeric type.- Returns:
- true if this PropertyType is a numeric type.
-
isTemporalType
public boolean isTemporalType()
Returns true if this PropertyType is a temporal type.- Returns:
- true if this PropertyType is a temporal type.
-
isNodeOrEdge
public boolean isNodeOrEdge()
Returns true if this PropertyType is an edge or node type.- Returns:
- true if this PropertyType is an edge or node type.
-
parse
public java.lang.Object parse(java.lang.String input) throws oracle.pgx.common.GmParseExceptionParses a string into this property type.- Parameters:
input-- Returns:
- the parsed object
- Throws:
oracle.pgx.common.GmParseException- if this property type cannot be parsed.
-
toEntityType
public java.util.Optional<EntityType> toEntityType()
Converts this property type to anEntityType.- Returns:
- An
Optionalmatching this property type. The returnedOptionalobject is empty if this property type cannot be converted toEntityType
-
-