public class YearMonthTypeHandler extends BaseTypeHandler<YearMonth>
YearMonth
.
YearMonthTypeHandler relies upon
YearMonth.parse
. Therefore column values
are expected as strings. The format must be uuuu-MM. Example: "2016-08"
configuration
Constructor and Description |
---|
YearMonthTypeHandler() |
Modifier and Type | Method and Description |
---|---|
YearMonth |
getNullableResult(CallableStatement cs,
int columnIndex) |
YearMonth |
getNullableResult(ResultSet rs,
int columnIndex) |
YearMonth |
getNullableResult(ResultSet rs,
String columnName)
Gets the nullable result.
|
void |
setNonNullParameter(PreparedStatement ps,
int i,
YearMonth yearMonth,
JdbcType jt) |
getResult, getResult, getResult, setConfiguration, setParameter
getRawType, toString
public void setNonNullParameter(PreparedStatement ps, int i, YearMonth yearMonth, JdbcType jt) throws SQLException
setNonNullParameter
in class BaseTypeHandler<YearMonth>
SQLException
public YearMonth getNullableResult(ResultSet rs, String columnName) throws SQLException
BaseTypeHandler
getNullableResult
in class BaseTypeHandler<YearMonth>
rs
- the rscolumnName
- Colunm name, when configuration useColumnLabel
is false
SQLException
- the SQL exceptionpublic YearMonth getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult
in class BaseTypeHandler<YearMonth>
SQLException
public YearMonth getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult
in class BaseTypeHandler<YearMonth>
SQLException
Copyright © 2009–2021 MyBatis.org. All rights reserved.