Package oracle.pgx.common.types
Enum IdType
- java.lang.Object
-
- java.lang.Enum<IdType>
-
- oracle.pgx.common.types.IdType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdTypefromPropertyType(PropertyType propertyType)java.lang.Class<?>getTypeClass()Returns the Java type class that is associated with this IdType.static IdTypegetTypeFor(java.lang.Class<?> typeClass)Returns the IdType based on a typeClass.java.lang.Objectparse(java.lang.String input)Parses the given string into an object of this type.static IdTypeparseIdType(java.lang.String input)Parse IdType from a string value.java.lang.StringtoKey()Returns the key of this type as string.static PropertyTypetoPropertyType(IdType idType)Returns the equivalent PropertyType of the specified IdType.java.lang.StringtoString()Returns the key of this type as string.static IdTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static IdType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static IdType[] 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 (IdType c : IdType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IdType 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 IdType getTypeFor(java.lang.Class<?> typeClass)
Returns the IdType based on a typeClass.- Parameters:
typeClass- Use this typeClass to derive the IdType- Returns:
- The IdType that belongs to this typeClass
-
parseIdType
public static IdType parseIdType(java.lang.String input)
Parse IdType from a string value.- Parameters:
input- Value to use to parse an IdType from. You can use the output oftoString()as input.- Returns:
- The IdType derived from the string input.
-
toPropertyType
public static PropertyType toPropertyType(IdType idType)
Returns the equivalent PropertyType of the specified IdType.- Parameters:
idType- the key type to translate to a PropertyType- Returns:
- the equivalent property type of the specified IdType
-
getTypeClass
public java.lang.Class<?> getTypeClass()
Returns the Java type class that is associated with this IdType.- Specified by:
getTypeClassin interfaceType- Returns:
- the Java type class that is associated with this IdType.
-
parse
public java.lang.Object parse(java.lang.String input)
Parses the given string into an object of this type.- Parameters:
input- the string to parse- Returns:
- an object of this type.
-
toKey
public java.lang.String toKey()
Description copied from interface:TypeReturns the key of this type as string.
-
fromPropertyType
public static IdType fromPropertyType(PropertyType propertyType)
-
-