- java.lang.Object
-
- org.tentackle.sql.datatypes.AbstractDataType<java.lang.String>
-
- org.tentackle.sql.datatypes.StringType
-
- org.tentackle.sql.datatypes.LargeStringType
-
- All Implemented Interfaces:
DataType<java.lang.String>
@Service(DataType.class) public class LargeStringType extends StringType
Datatype forString.Notice that there are two types of strings. This one is for the SQL type
CLOB.
-
-
Constructor Summary
Constructors Constructor Description LargeStringType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(Backend backend, java.sql.ResultSet resultSet, int[] pos, boolean mapNull, java.lang.Integer size)Gets the object from a result set.
Must be implemented ifDataType.isPredefined()returns false.SqlTypegetSqlType(int index)Gets the SQL type.java.lang.StringgetVariant()Gets the optional variant of the type.java.lang.Object[]set(Backend backend, java.sql.PreparedStatement statement, int pos, java.lang.String object, boolean mapNull, java.lang.Integer size)Sets the object into a prepared statement.
Must be implemented ifDataType.isPredefined()returns false.-
Methods inherited from class org.tentackle.sql.datatypes.StringType
getJavaType, isMapNullSupported, valueOf, valueOfLiteralToCode
-
Methods inherited from class org.tentackle.sql.datatypes.AbstractDataType
equals, getColumnCount, getColumnGetter, getColumnSuffix, getColumnValue, getCommentSuffix, getDataTypeConstant, getScale, getSize, hashCode, isBool, isDateOrTime, isDowncastNecessary, isJavaTypeGenerified, isLiteralSupported, isModelProvidingInnerType, isMutable, isNumeric, isPredefined, isPrimitive, isUTCSupported, set, toLiteral, toNonPrimitive, toPrimitive, toString, toString
-
-
-
-
Method Detail
-
getVariant
public java.lang.String getVariant()
Description copied from interface:DataTypeGets the optional variant of the type.- Specified by:
getVariantin interfaceDataType<java.lang.String>- Overrides:
getVariantin classAbstractDataType<java.lang.String>- Returns:
- the variant, empty string if none, never null
-
getSqlType
public SqlType getSqlType(int index)
Description copied from interface:DataTypeGets the SQL type.- Specified by:
getSqlTypein interfaceDataType<java.lang.String>- Overrides:
getSqlTypein classStringType- Parameters:
index- the column index- Returns:
- the SQL type
-
set
public java.lang.Object[] set(Backend backend, java.sql.PreparedStatement statement, int pos, java.lang.String object, boolean mapNull, java.lang.Integer size) throws java.sql.SQLException
Description copied from interface:DataTypeSets the object into a prepared statement.
Must be implemented ifDataType.isPredefined()returns false. Not invoked by framework otherwise.- Specified by:
setin interfaceDataType<java.lang.String>- Overrides:
setin classStringType- Parameters:
backend- the database backendstatement- the prepared statementpos- the position of the first SQL valueobject- the object, may be nullmapNull- true if map null-values to non-null valuessize- the optional size specified in the model- Returns:
- the values stored in the prepared statement
- Throws:
java.sql.SQLException- if failed
-
get
public java.lang.String get(Backend backend, java.sql.ResultSet resultSet, int[] pos, boolean mapNull, java.lang.Integer size) throws java.sql.SQLException
Description copied from interface:DataTypeGets the object from a result set.
Must be implemented ifDataType.isPredefined()returns false. Not invoked by framework otherwise.- Specified by:
getin interfaceDataType<java.lang.String>- Overrides:
getin classStringType- Parameters:
backend- the database backendresultSet- the result setpos- the column positions in the result setmapNull- true if unmap null-values from non-null valuessize- the optional size specified in the model- Returns:
- the object or null if column(s) IS NULL
- Throws:
java.sql.SQLException- if failed
-
-