Package org.apache.olingo.odata2.api.edm
Enum Class EdmSimpleTypeKind
- All Implemented Interfaces:
Serializable,Comparable<EdmSimpleTypeKind>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance for thisEdmSimpleTypeKindin the form ofEdmSimpleType.Returns theFullQualifiedNamefor this SimpleTypeKind.static EdmLiteralparseUriLiteral(String uriLiteral) Parses a URI literal and determines its EDM simple type on the way.static EdmSimpleTypeKindReturns the enum constant of this class with the specified name.static EdmSimpleTypeKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Binary
-
Boolean
-
Byte
-
DateTime
-
DateTimeOffset
-
Decimal
-
Double
-
Guid
-
Int16
-
Int32
-
Int64
-
SByte
-
Single
-
String
-
Time
-
Null
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getFullQualifiedName
Returns theFullQualifiedNamefor this SimpleTypeKind.- Returns:
FullQualifiedName
-
getEdmSimpleTypeInstance
Returns an instance for thisEdmSimpleTypeKindin the form ofEdmSimpleType.- Returns:
EdmSimpleTypeinstance
-
parseUriLiteral
Parses a URI literal and determines its EDM simple type on the way.
If the literal is
nullor consists of the literal string "null", the EDM simple typeNullis returned.The URI literal syntax of EDM simple types allows two ways of determining the type:
- The literal has an explicit type indicator (prefix or suffix).
- The value is of a type compatible to all other possible types, e.g., "256"
could be of type
Int16orInt32but all possible values ofInt16are also legal values ofInt32so callers could promote it toInt32in all cases where they deem it necessary.
For a given literal, always the narrowest possible type is chosen.
There are two cases where it is not possible to choose unambiguously a compatible type:
0or1could be a number but also a boolean value; therefore, the internal (system) typeBitis used for these values.- Integer values between
0and127(inclusive) could be of typeSByteorByteboth of which are not compatible to the other; therefore, the internal (system) typeUint7is used for these values.
- Parameters:
uriLiteral- the literal- Returns:
- an instance of
EdmLiteral, containing the literal in default String representation and the EDM simple type - Throws:
EdmLiteralException- if the literal is malformed
-