Package org.apache.ibatis.type
Class YearMonthTypeHandler
- java.lang.Object
-
- org.apache.ibatis.type.TypeReference<T>
-
- org.apache.ibatis.type.BaseTypeHandler<java.time.YearMonth>
-
- org.apache.ibatis.type.YearMonthTypeHandler
-
- All Implemented Interfaces:
TypeHandler<java.time.YearMonth>
public class YearMonthTypeHandler extends BaseTypeHandler<java.time.YearMonth>
Type Handler forYearMonth
YearMonthTypeHandler relies uponYearMonth.parse
. Therefore column values are expected as strings. The format must be uuuu-MM. Example: "2016-08"- Since:
- 3.4.5
- Author:
- Björn Raupach
-
-
Field Summary
-
Fields inherited from class org.apache.ibatis.type.BaseTypeHandler
configuration
-
-
Constructor Summary
Constructors Constructor Description YearMonthTypeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.YearMonth
getNullableResult(java.sql.CallableStatement cs, int columnIndex)
java.time.YearMonth
getNullableResult(java.sql.ResultSet rs, int columnIndex)
java.time.YearMonth
getNullableResult(java.sql.ResultSet rs, java.lang.String columnName)
void
setNonNullParameter(java.sql.PreparedStatement ps, int i, java.time.YearMonth yearMonth, JdbcType jt)
-
Methods inherited from class org.apache.ibatis.type.BaseTypeHandler
getResult, getResult, getResult, setConfiguration, setParameter
-
Methods inherited from class org.apache.ibatis.type.TypeReference
getRawType, toString
-
-
-
-
Method Detail
-
setNonNullParameter
public void setNonNullParameter(java.sql.PreparedStatement ps, int i, java.time.YearMonth yearMonth, JdbcType jt) throws java.sql.SQLException
- Specified by:
setNonNullParameter
in classBaseTypeHandler<java.time.YearMonth>
- Throws:
java.sql.SQLException
-
getNullableResult
public java.time.YearMonth getNullableResult(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<java.time.YearMonth>
- Throws:
java.sql.SQLException
-
getNullableResult
public java.time.YearMonth getNullableResult(java.sql.ResultSet rs, int columnIndex) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<java.time.YearMonth>
- Throws:
java.sql.SQLException
-
getNullableResult
public java.time.YearMonth getNullableResult(java.sql.CallableStatement cs, int columnIndex) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<java.time.YearMonth>
- Throws:
java.sql.SQLException
-
-