Class EdmDateTime
- java.lang.Object
-
- org.apache.olingo.odata2.core.edm.AbstractSimpleType
-
- org.apache.olingo.odata2.core.edm.EdmDateTime
-
- All Implemented Interfaces:
EdmNamed,EdmSimpleType,EdmType
public class EdmDateTime extends AbstractSimpleType
Implementation of the EDM simple type DateTime.
-
-
Field Summary
-
Fields inherited from interface org.apache.olingo.odata2.api.edm.EdmSimpleType
EDM_NAMESPACE, SYSTEM_NAMESPACE
-
-
Constructor Summary
Constructors Constructor Description EdmDateTime()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidappendFractionalSeconds(StringBuilder result, int fractionalSeconds, boolean isNano, EdmFacets facets)Appends the given milli- or nanoseconds to the given string builder, performance-optimized.Class<?>getDefaultType()static EdmDateTimegetInstance()protected <T> TinternalValueOfString(String value, EdmLiteralKind literalKind, EdmFacets facets, Class<T> returnType)protected <T> StringinternalValueToString(T value, EdmLiteralKind literalKind, EdmFacets facets)StringtoUriLiteral(String literal)<T> StringvalueToObjectKeyString(T value, EdmLiteralKind literalKind, EdmFacets facets)-
Methods inherited from class org.apache.olingo.odata2.core.edm.AbstractSimpleType
equals, getKind, getName, getNamespace, hashCode, isCompatible, toString, validate, valueOfString, valueOfString, valueToString
-
-
-
-
Method Detail
-
getInstance
public static EdmDateTime getInstance()
-
getDefaultType
public Class<?> getDefaultType()
-
internalValueOfString
protected <T> T internalValueOfString(String value, EdmLiteralKind literalKind, EdmFacets facets, Class<T> returnType) throws EdmSimpleTypeException
- Specified by:
internalValueOfStringin classAbstractSimpleType- Throws:
EdmSimpleTypeException
-
valueToObjectKeyString
public <T> String valueToObjectKeyString(T value, EdmLiteralKind literalKind, EdmFacets facets) throws EdmSimpleTypeException
- Overrides:
valueToObjectKeyStringin classAbstractSimpleType- Throws:
EdmSimpleTypeException
-
internalValueToString
protected <T> String internalValueToString(T value, EdmLiteralKind literalKind, EdmFacets facets) throws EdmSimpleTypeException
- Specified by:
internalValueToStringin classAbstractSimpleType- Throws:
EdmSimpleTypeException
-
appendFractionalSeconds
protected static void appendFractionalSeconds(StringBuilder result, int fractionalSeconds, boolean isNano, EdmFacets facets) throws IllegalArgumentException
Appends the given milli- or nanoseconds to the given string builder, performance-optimized.- Parameters:
result- aStringBuilderfractionalSeconds- fractional seconds (nonnegative and assumed to be in the valid range)isNano- whether the value is to be interpreted as nanoseconds (milliseconds if false)facets- the EDM facets containing an upper limit for decimal digits (optional, defaults to zero)- Throws:
IllegalArgumentException- if precision is not met
-
toUriLiteral
public String toUriLiteral(String literal) throws EdmSimpleTypeException
- Specified by:
toUriLiteralin interfaceEdmSimpleType- Overrides:
toUriLiteralin classAbstractSimpleType- Throws:
EdmSimpleTypeException
-
-