Package org.teiid.olingo.common
Class ODataTypeManager
- java.lang.Object
-
- org.teiid.olingo.common.ODataTypeManager
-
public class ODataTypeManager extends Object
-
-
Constructor Summary
Constructors Constructor Description ODataTypeManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
convertByteArrayToTeiidRuntimeType(Class<?> type, byte[] contents, String odataType, String srid)
static String
convertToODataURIValue(Object val, String odataType)
static org.apache.olingo.commons.api.edm.geo.Geospatial
convertToODataValue(InputStream wkb, boolean includesSrid)
static Object
convertToTeiidRuntimeType(Class<?> type, Object value, String odataType, String srid)
static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind
odataType(Class<?> teiidRuntimeTypeClass)
static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind
odataType(String teiidRuntimeType)
static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind
odataType(BaseColumn c)
static Object
parseLiteral(String odataType, String value)
static Object
parseLiteral(org.apache.olingo.commons.api.edm.EdmParameter edmParameter, Class<?> runtimeType, String value)
static Object
parseLiteral(org.apache.olingo.commons.api.edm.EdmProperty edmProperty, Class<?> runtimeType, String value)
static Object
rationalizePrecision(Integer precision, Integer scale, Object value)
static String
teiidType(String odataType, boolean array)
static String
teiidType(org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType odataType, boolean array)
-
-
-
Method Detail
-
teiidType
public static String teiidType(org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType odataType, boolean array)
-
odataType
public static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind odataType(Class<?> teiidRuntimeTypeClass)
-
odataType
public static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind odataType(BaseColumn c)
-
odataType
public static org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind odataType(String teiidRuntimeType)
-
convertToTeiidRuntimeType
public static Object convertToTeiidRuntimeType(Class<?> type, Object value, String odataType, String srid) throws TeiidException
- Parameters:
type
-value
-odataType
- type hint if the value could be a string containing a literal value of another type- Returns:
- Throws:
TeiidException
-
convertByteArrayToTeiidRuntimeType
public static Object convertByteArrayToTeiidRuntimeType(Class<?> type, byte[] contents, String odataType, String srid) throws TeiidException
- Throws:
TeiidException
-
parseLiteral
public static Object parseLiteral(org.apache.olingo.commons.api.edm.EdmParameter edmParameter, Class<?> runtimeType, String value) throws TeiidProcessingException
- Throws:
TeiidProcessingException
-
parseLiteral
public static Object parseLiteral(org.apache.olingo.commons.api.edm.EdmProperty edmProperty, Class<?> runtimeType, String value) throws TeiidException
- Throws:
TeiidException
-
parseLiteral
public static Object parseLiteral(String odataType, String value) throws TeiidException
- Throws:
TeiidException
-
rationalizePrecision
public static Object rationalizePrecision(Integer precision, Integer scale, Object value)
-
convertToODataValue
public static org.apache.olingo.commons.api.edm.geo.Geospatial convertToODataValue(InputStream wkb, boolean includesSrid) throws FunctionExecutionException
- Throws:
FunctionExecutionException
-
-