Class MySQLDBTypeFactory
- java.lang.Object
-
- it.unibz.inf.ontop.model.type.impl.DefaultSQLDBTypeFactory
-
- it.unibz.inf.ontop.model.type.impl.MySQLDBTypeFactory
-
- All Implemented Interfaces:
DBTypeFactory,SQLDBTypeFactory
public class MySQLDBTypeFactory extends DefaultSQLDBTypeFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unibz.inf.ontop.model.type.impl.DefaultSQLDBTypeFactory
DefaultSQLDBTypeFactory.DefaultTypeCode
-
Nested classes/interfaces inherited from interface it.unibz.inf.ontop.model.type.DBTypeFactory
DBTypeFactory.Factory
-
-
Field Summary
Fields Modifier and Type Field Description static StringBIT_ONE_STRstatic StringBIT_STRstatic StringDATETIME_STRprotected static StringENUM_STRprotected static StringLONGBLOB_STRprotected static StringLONGTEXT_STRprotected static StringMEDIUMBLOB_STRprotected static StringMEDIUMINT_STRprotected static StringMEDIUMTEXT_STRprotected static StringSET_STRprotected static StringTINYBLOB_STRprotected static StringTINYTEXT_STRprotected static StringUNSIGNED_SUFFIXstatic StringYEAR_STR-
Fields inherited from class it.unibz.inf.ontop.model.type.impl.DefaultSQLDBTypeFactory
ABSTRACT_DB_TYPE_STR, BIGINT_STR, BINARY_LARGE_STR, BINARY_STR, BINARY_VAR_STR, BLOB_STR, BOOLEAN_STR, CHAR_LARGE_STR, CHAR_STR, CHAR_VAR_STR, CHARACTER_STR, CLOB_STR, DATE_STR, DECIMAL_STR, defaultStrictEqSupport, DOUBLE_PREC_STR, DOUBLE_STR, FLOAT_STR, INT_STR, INTEGER_STR, NATIONAL_CHAR_LARGE_STR, NATIONAL_CHAR_STR, NATIONAL_CHAR_VAR_STR, NATIONAL_TEXT_STR, NCHAR_STR, NTEXT_STR, NUMERIC_STR, NVARCHAR_STR, REAL_STR, SMALLINT_STR, TEXT_STR, TIME_STR, TIMESTAMP_STR, TINYINT_STR, VARBINARY_STR, VARCHAR_STR
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMySQLDBTypeFactory(TermType rootTermType, TypeFactory typeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static it.unibz.inf.ontop.com.google.common.collect.ImmutableMap<DefaultSQLDBTypeFactory.DefaultTypeCode,String>createMySQLCodeMap()protected static Map<String,DBTermType>createMySQLTypeMap(TermType rootTermType, TypeFactory typeFactory)StringgetDBFalseLexicalValue()NB: FALSE is an alias of 0Optional<String>getDBNaNLexicalValue()StringgetDBTrueLexicalValue()NB: TRUE is an alias of 1protected StringpreprocessTypeName(String typeName)Keeps the parameters for BIT(1).protected StringpreprocessTypeName(String typeName, int columnSize)Transforms (BIT, 1) and (TINYINT, 1) into BIT(1) and BOOLEAN (alias)-
Methods inherited from class it.unibz.inf.ontop.model.type.impl.DefaultSQLDBTypeFactory
createDefaultSQLCodeMap, createDefaultSQLTypeMap, getAbstractRootDBType, getDBBooleanType, getDBDateTimestampType, getDBDateType, getDBDecimalType, getDBDoubleType, getDBGeographyType, getDBGeometryType, getDBHexBinaryType, getDBLargeIntegerType, getDBStringType, getDBTermType, getDBTermType, getDBTimeType, getNullLexicalValue, supportsDBDistanceSphere, supportsDBGeographyType, supportsDBGeometryType
-
-
-
-
Field Detail
-
BIT_STR
public static final String BIT_STR
- See Also:
- Constant Field Values
-
BIT_ONE_STR
public static final String BIT_ONE_STR
- See Also:
- Constant Field Values
-
TINYBLOB_STR
protected static final String TINYBLOB_STR
- See Also:
- Constant Field Values
-
MEDIUMBLOB_STR
protected static final String MEDIUMBLOB_STR
- See Also:
- Constant Field Values
-
LONGBLOB_STR
protected static final String LONGBLOB_STR
- See Also:
- Constant Field Values
-
TINYTEXT_STR
protected static final String TINYTEXT_STR
- See Also:
- Constant Field Values
-
MEDIUMTEXT_STR
protected static final String MEDIUMTEXT_STR
- See Also:
- Constant Field Values
-
LONGTEXT_STR
protected static final String LONGTEXT_STR
- See Also:
- Constant Field Values
-
SET_STR
protected static final String SET_STR
- See Also:
- Constant Field Values
-
ENUM_STR
protected static final String ENUM_STR
- See Also:
- Constant Field Values
-
MEDIUMINT_STR
protected static final String MEDIUMINT_STR
- See Also:
- Constant Field Values
-
UNSIGNED_SUFFIX
protected static final String UNSIGNED_SUFFIX
- See Also:
- Constant Field Values
-
YEAR_STR
public static final String YEAR_STR
- See Also:
- Constant Field Values
-
DATETIME_STR
public static final String DATETIME_STR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MySQLDBTypeFactory
protected MySQLDBTypeFactory(TermType rootTermType, TypeFactory typeFactory)
-
-
Method Detail
-
createMySQLTypeMap
protected static Map<String,DBTermType> createMySQLTypeMap(TermType rootTermType, TypeFactory typeFactory)
-
createMySQLCodeMap
protected static it.unibz.inf.ontop.com.google.common.collect.ImmutableMap<DefaultSQLDBTypeFactory.DefaultTypeCode,String> createMySQLCodeMap()
-
getDBNaNLexicalValue
public Optional<String> getDBNaNLexicalValue()
- Specified by:
getDBNaNLexicalValuein interfaceDBTypeFactory- Overrides:
getDBNaNLexicalValuein classDefaultSQLDBTypeFactory
-
preprocessTypeName
protected String preprocessTypeName(String typeName)
Keeps the parameters for BIT(1). Transforms TINYINT(1) into BOOLEAN (alias) For the other type strings, performs the standard pre-processing.- Overrides:
preprocessTypeNamein classDefaultSQLDBTypeFactory
-
preprocessTypeName
protected String preprocessTypeName(String typeName, int columnSize)
Transforms (BIT, 1) and (TINYINT, 1) into BIT(1) and BOOLEAN (alias)- Overrides:
preprocessTypeNamein classDefaultSQLDBTypeFactory
-
getDBTrueLexicalValue
public String getDBTrueLexicalValue()
NB: TRUE is an alias of 1- Specified by:
getDBTrueLexicalValuein interfaceDBTypeFactory- Overrides:
getDBTrueLexicalValuein classDefaultSQLDBTypeFactory
-
getDBFalseLexicalValue
public String getDBFalseLexicalValue()
NB: FALSE is an alias of 0- Specified by:
getDBFalseLexicalValuein interfaceDBTypeFactory- Overrides:
getDBFalseLexicalValuein classDefaultSQLDBTypeFactory
-
-