Module org.tentackle.sql
Package org.tentackle.sql.datatypes
Class AbstractNumberType<T extends Number>
java.lang.Object
org.tentackle.sql.datatypes.AbstractDataType<T>
org.tentackle.sql.datatypes.AbstractNumberType<T>
- Type Parameters:
T- the java type
- All Implemented Interfaces:
DataType<T>
- Direct Known Subclasses:
BigDecimalType,ByteType,DoubleType,FloatType,IntegerType,LongType,ShortType
Base class for number data types.
-
Field Summary
Fields inherited from class org.tentackle.sql.datatypes.AbstractDataType
maxLinesInLiteral -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this is a numeric type.valueOfLiteralToCode(String str, Integer index) Creates the java code to apply the valueOf method to a String.Methods inherited from class org.tentackle.sql.datatypes.AbstractDataType
assertColumnCountNotBackendSpecific, createColumnNames, createColumnNamesAsString, equals, getColumnAlias, getColumnCount, getColumnGetter, getColumnSuffix, getColumnValue, getCommentSuffix, getDataTypeConstant, getMappedNullValue, getScale, getSize, getSortableColumns, getVariant, hashCode, isBool, isColumnCountBackendSpecific, isDateOrTime, isDowncastNecessary, isJavaTypeGenerified, isLiteralSupported, isMapNullSupported, isModelProvidingInnerType, isMutable, isPredefined, isPrimitive, isTimezoneApplicable, isUTCSupported, set, toLiteral, toNonPrimitive, toPrimitive, toString, toString, valueStringToCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tentackle.sql.DataType
get, getJavaType, getSqlType, set, valueOf
-
Constructor Details
-
AbstractNumberType
public AbstractNumberType()Parent constructor.
-
-
Method Details
-
isNumeric
public boolean isNumeric()Description copied from interface:DataTypeReturns whether this is a numeric type. -
valueOfLiteralToCode
Description copied from interface:DataTypeCreates the java code to apply the valueOf method to a String.- Specified by:
valueOfLiteralToCodein interfaceDataType<T extends Number>- Overrides:
valueOfLiteralToCodein classAbstractDataType<T extends Number>- Parameters:
str- the literal to be parsedindex- the column index, null if applies to object of this type- Returns:
- the java code
-