public final class EdmDateTimeOffset extends SingletonPrimitiveType
| Modifier and Type | Field and Description |
|---|---|
protected String |
uriPrefix |
protected String |
uriSuffix |
| Constructor and Description |
|---|
EdmDateTimeOffset() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
appendFractionalSeconds(StringBuilder result,
int fractionalSeconds,
boolean isNano,
Integer precision)
Appends the given milli- or nanoseconds to the given string builder, performance-optimized.
|
protected static void |
appendTwoDigits(StringBuilder result,
int number)
Appends the given number to the given string builder, assuming that the number has at most two digits,
performance-optimized.
|
protected static <T> T |
convertDateTime(Calendar dateTimeValue,
int nanoSeconds,
Class<T> returnType)
Converts a
Calendar value into the requested return type if possible. |
protected static <T> Calendar |
createDateTime(T value)
Creates a date/time value from the given value.
|
String |
fromUriLiteral(String literal) |
Class<?> |
getDefaultType() |
org.apache.olingo.commons.api.edm.FullQualifiedName |
getFullQualifiedName() |
static EdmDateTimeOffset |
getInstance() |
protected <T> T |
internalValueOfString(String value,
Boolean isNullable,
Integer maxLength,
Integer precision,
Integer scale,
Boolean isUnicode,
Class<T> returnType) |
protected <T> String |
internalValueToString(T value,
Boolean isNullable,
Integer maxLength,
Integer precision,
Integer scale,
Boolean isUnicode) |
boolean |
isCompatible(org.apache.olingo.commons.api.edm.EdmPrimitiveType primitiveType) |
String |
toString() |
String |
toUriLiteral(String literal) |
boolean |
validate(String value,
Boolean isNullable,
Integer maxLength,
Integer precision,
Integer scale,
Boolean isUnicode) |
<T> T |
valueOfString(String value,
Boolean isNullable,
Integer maxLength,
Integer precision,
Integer scale,
Boolean isUnicode,
Class<T> returnType) |
String |
valueToString(Object value,
Boolean isNullable,
Integer maxLength,
Integer precision,
Integer scale,
Boolean isUnicode) |
equals, getKind, getName, getNamespace, hashCodepublic static EdmDateTimeOffset getInstance()
public Class<?> getDefaultType()
protected <T> T internalValueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeExceptionprotected static <T> T convertDateTime(Calendar dateTimeValue, int nanoSeconds, Class<T> returnType) throws IllegalArgumentException, ClassCastException
Calendar value into the requested return type if possible.dateTimeValue - the valuenanoSeconds - nanoseconds part of the value; only used for the Timestamp return typereturnType - the class of the returned value; it must be one of Calendar, Long, Date,
or TimestampIllegalArgumentException - if the Calendar value is not validClassCastException - if the return type is not allowedprotected <T> String internalValueToString(T value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeExceptionprotected static <T> Calendar createDateTime(T value) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
protected static void appendTwoDigits(StringBuilder result, int number)
result - a StringBuildernumber - an integer that must satisfy 0 <= number <= 99protected static void appendFractionalSeconds(StringBuilder result, int fractionalSeconds, boolean isNano, Integer precision) throws IllegalArgumentException
result - a StringBuilderfractionalSeconds - fractional seconds (nonnegative and assumed to be in the valid range)isNano - whether the value is to be interpreted as nanoseconds (milliseconds if false)precision - the upper limit for decimal digits (optional, defaults to zero)IllegalArgumentException - if precision is not metpublic org.apache.olingo.commons.api.edm.FullQualifiedName getFullQualifiedName()
getFullQualifiedName in interface org.apache.olingo.commons.api.edm.EdmTypepublic boolean isCompatible(org.apache.olingo.commons.api.edm.EdmPrimitiveType primitiveType)
isCompatible in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypepublic boolean validate(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode)
validate in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypepublic final <T> T valueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
valueOfString in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypeorg.apache.olingo.commons.api.edm.EdmPrimitiveTypeExceptionpublic final String valueToString(Object value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
valueToString in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypeorg.apache.olingo.commons.api.edm.EdmPrimitiveTypeExceptionpublic String toUriLiteral(String literal)
toUriLiteral in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypepublic String fromUriLiteral(String literal) throws org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException
fromUriLiteral in interface org.apache.olingo.commons.api.edm.EdmPrimitiveTypeorg.apache.olingo.commons.api.edm.EdmPrimitiveTypeExceptionCopyright © 2013–2015 The Apache Software Foundation. All rights reserved.