Package net.sf.jkniv.whinstone.types
Class ShortIntType
- java.lang.Object
-
- net.sf.jkniv.whinstone.types.ShortIntType
-
- All Implemented Interfaces:
Convertible<Short,Integer>
public class ShortIntType extends Object implements Convertible<Short,Integer>
Conversion type fromJava ShorttoJDBC Integer. This conversion has default usage. Numeric type promotion some drivers keep theShortvalues asInteger- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Constructor Summary
Constructors Constructor Description ShortIntType()ShortIntType(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnTypegetColumnType()Class<Short>getType()ShorttoAttribute(Integer jdbc)Convert the jdbc value to attribute format or typeIntegertoJdbc(Short attribute)Convert attribute to jdbc format or typeStringtoString()
-
-
-
Constructor Detail
-
ShortIntType
public ShortIntType()
-
ShortIntType
public ShortIntType(String pattern)
-
-
Method Detail
-
toJdbc
public Integer toJdbc(Short attribute)
Description copied from interface:ConvertibleConvert attribute to jdbc format or type- Specified by:
toJdbcin interfaceConvertible<Short,Integer>- Parameters:
attribute- the value of to be converted- Returns:
- the value to be stored for jdbc driver
-
toAttribute
public Short toAttribute(Integer jdbc)
Description copied from interface:ConvertibleConvert the jdbc value to attribute format or type- Specified by:
toAttributein interfaceConvertible<Short,Integer>- Parameters:
jdbc- the value stored at database- Returns:
- the value of attribute converted
-
getType
public Class<Short> getType()
- Specified by:
getTypein interfaceConvertible<Short,Integer>
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnTypein interfaceConvertible<Short,Integer>
-
-