public class DatatypeSystemDefault extends Object implements DatatypeSystemOld
| Modifier and Type | Field and Description |
|---|---|
static SqlDatatype |
_BOOLEAN |
static SqlDatatype |
_BYTE |
static SqlDatatype |
_DATE |
static SqlDatatype |
_DATE_TIME |
static SqlDatatype |
_DECIMAL |
static SqlDatatype |
_DOUBLE |
static SqlDatatype |
_FLOAT |
static SqlDatatype |
_GEOGRAPHY |
static SqlDatatype |
_GEOMETRY |
static SqlDatatype |
_INT |
static SqlDatatype |
_INTEGER |
static SqlDatatype |
_LONG |
static SqlDatatype |
_NEGATIVE_INTEGER |
static SqlDatatype |
_NON_NEGATIVE_INTEGER |
static SqlDatatype |
_NON_POSITIVE_INTEGER |
static SqlDatatype |
_NUMERIC |
static SqlDatatype |
_POSITIVE_INTEGER |
static SqlDatatype |
_SHORT |
static SqlDatatype |
_STRING |
static SqlDatatype |
_UNSIGNED_BYTE |
static SqlDatatype |
_UNSIGNED_INT |
static SqlDatatype |
_UNSIGNED_LONG |
static SqlDatatype |
_UNSIGNED_SHORT |
static org.aksw.commons.collections.multimaps.IBiSetMultimap<SqlDatatype,SqlDatatype> |
childToParent |
static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
DatatypeSystemDefault() |
| Modifier and Type | Method and Description |
|---|---|
Object |
cast(Object value,
SqlDatatype to) |
Factory1<SqlExpr> |
cast(SqlDatatype from,
SqlDatatype to)
Return a factory for creating cast-expressions between the given datatypes
Null if no such cast exists.
|
Integer |
compare(SqlDatatype a,
SqlDatatype b)
Returns -1, 0, 1 if a is more specific, equal, more general the b.
|
static SqlDatatype |
dt(String name) |
static SqlDatatype |
dt(String name,
com.hp.hpl.jena.rdf.model.Resource resource) |
static SqlDatatype |
dt(String name,
com.hp.hpl.jena.rdf.model.Resource resource,
Class<?> clazz) |
SqlDatatype |
getByClass(Class<?> clazz) |
SqlDatatype |
getByName(String name) |
SqlDatatype |
getDatatype(String name) |
static List<SqlDatatype> |
getDefaultDatatypes() |
Set<String> |
getRegisteredDatatypes()
Returns all registered datatype names.
|
static void |
main(String[] args) |
SqlDatatype |
mostGenericDatatype(SqlDatatype from,
SqlDatatype to)
Returns the top-most node of the tree of compatible datatypes
Hm, how to justify not returning object?
so integer and string -> numeric
string -> text
The rationale is, that all numeric types have similar semantics in regard
to comparison and arithmetic operations.
|
void |
registerDatatype(String name,
SqlDatatype datatype) |
SqlDatatype |
requireByName(String name) |
Set<SqlDatatype> |
supremumDatatypes(SqlDatatype a,
SqlDatatype b) |
public static final org.slf4j.Logger logger
public static final SqlDatatype _BYTE
public static final SqlDatatype _SHORT
public static final SqlDatatype _INT
public static final SqlDatatype _LONG
public static final SqlDatatype _INTEGER
public static final SqlDatatype _DECIMAL
public static final SqlDatatype _UNSIGNED_BYTE
public static final SqlDatatype _UNSIGNED_SHORT
public static final SqlDatatype _UNSIGNED_INT
public static final SqlDatatype _UNSIGNED_LONG
public static final SqlDatatype _POSITIVE_INTEGER
public static final SqlDatatype _NON_NEGATIVE_INTEGER
public static final SqlDatatype _NON_POSITIVE_INTEGER
public static final SqlDatatype _NEGATIVE_INTEGER
public static final SqlDatatype _FLOAT
public static final SqlDatatype _DOUBLE
public static final SqlDatatype _NUMERIC
public static final SqlDatatype _BOOLEAN
public static final SqlDatatype _DATE
public static final SqlDatatype _DATE_TIME
public static final SqlDatatype _STRING
public static final SqlDatatype _GEOMETRY
public static final SqlDatatype _GEOGRAPHY
public static final org.aksw.commons.collections.multimaps.IBiSetMultimap<SqlDatatype,SqlDatatype> childToParent
public static SqlDatatype dt(String name)
public static SqlDatatype dt(String name, com.hp.hpl.jena.rdf.model.Resource resource)
public static SqlDatatype dt(String name, com.hp.hpl.jena.rdf.model.Resource resource, Class<?> clazz)
public static List<SqlDatatype> getDefaultDatatypes()
public SqlDatatype getByName(String name)
getByName in interface DatatypeSystemOldpublic SqlDatatype requireByName(String name)
requireByName in interface DatatypeSystemOldpublic Set<String> getRegisteredDatatypes()
public void registerDatatype(String name, SqlDatatype datatype)
public SqlDatatype getDatatype(String name)
public Object cast(Object value, SqlDatatype to)
cast in interface DatatypeSystemOldpublic Factory1<SqlExpr> cast(SqlDatatype from, SqlDatatype to)
DatatypeSystemOldcast in interface DatatypeSystemOldpublic SqlDatatype mostGenericDatatype(SqlDatatype from, SqlDatatype to)
DatatypeSystemOldmostGenericDatatype in interface DatatypeSystemOldpublic Set<SqlDatatype> supremumDatatypes(SqlDatatype a, SqlDatatype b)
supremumDatatypes in interface DatatypeSystemOldpublic Integer compare(SqlDatatype a, SqlDatatype b)
DatatypeSystemOldcompare in interface DatatypeSystemOldpublic static void main(String[] args)
public SqlDatatype getByClass(Class<?> clazz)
getByClass in interface DatatypeSystemOldCopyright © 2014. All Rights Reserved.