public class ColumnSaver extends java.lang.Object implements ColumnStorable
修飾子とタイプ | クラスと説明 |
---|---|
static class |
ColumnSaver.LocalByteArrayInputStream |
static class |
ColumnSaver.LocalStringReader |
修飾子とタイプ | フィールドと説明 |
---|---|
protected static java.lang.reflect.Method |
bigDecimalToString |
protected static java.lang.reflect.Method |
binaryToLocalByteArrayInputStream |
protected static java.lang.reflect.Method |
booleanToInteger |
protected static java.lang.reflect.Method |
booleanToString |
protected static java.lang.reflect.Method |
bytesToLocalByteArrayInputStream |
protected static java.lang.reflect.Method |
byteToString |
protected Column |
column |
protected java.lang.reflect.Method[] |
convertors |
protected static java.lang.reflect.Method |
dateToSqlDate |
protected static java.lang.reflect.Method |
dateToSqlTime |
protected static java.lang.reflect.Method |
dateToSqlTimestamp |
protected static java.lang.reflect.Method |
dateToString |
protected static java.lang.reflect.Method |
doubleToString |
protected static java.lang.reflect.Method |
floatToString |
protected static java.lang.reflect.Method |
intToString |
protected java.lang.Integer |
isqlType |
protected static java.lang.reflect.Method |
longToString |
protected java.lang.reflect.Method[] |
methods |
protected static java.lang.Class[] |
nullParam |
protected static java.lang.reflect.Method |
psSetBigDecimal |
protected static java.lang.reflect.Method |
psSetBinaryStream |
protected static java.lang.reflect.Method |
psSetBoolean |
protected static java.lang.reflect.Method |
psSetByte |
protected static java.lang.reflect.Method |
psSetCharacterStream |
protected static java.lang.reflect.Method |
psSetDate |
protected static java.lang.reflect.Method |
psSetDouble |
protected static java.lang.reflect.Method |
psSetFloat |
protected static java.lang.reflect.Method |
psSetInteger |
protected static java.lang.reflect.Method |
psSetLong |
protected static java.lang.reflect.Method |
psSetNull |
protected static java.lang.reflect.Method |
psSetShort |
protected static java.lang.reflect.Method |
psSetString |
protected static java.lang.reflect.Method |
psSetTime |
protected static java.lang.reflect.Method |
psSetTimestamp |
protected java.lang.reflect.Method |
setter |
protected static java.lang.reflect.Method |
shortToString |
protected boolean |
streamType |
protected static java.lang.reflect.Method |
stringToLocalStringReader |
protected java.lang.Class |
targetClass |
protected static java.lang.reflect.Method |
timestampToString |
コンストラクタと説明 |
---|
ColumnSaver(Column column,
java.lang.Class targetClass)
コンストラクタ。
|
修飾子とタイプ | メソッドと説明 |
---|---|
static ColumnSaver.LocalByteArrayInputStream |
binaryToLocalByteArrayInputStream(Binary binary) |
static java.lang.Integer |
booleanToIntegerConverter(java.lang.Boolean b) |
static ColumnSaver.LocalByteArrayInputStream |
bytesToLocalByteArrayInputStream(byte[] bytes) |
protected java.lang.reflect.Method[] |
createMethods(java.lang.reflect.Method getter,
java.lang.reflect.Method value) |
static java.sql.Date |
dateToSqlDateConverter(java.util.Date date) |
static java.sql.Time |
dateToSqlTimeConverter(java.util.Date date) |
static java.sql.Timestamp |
dateToSqlTimestampConverter(java.util.Date date) |
static java.lang.String |
dateToStringConverter(java.util.Date date)
java.util.DateをStringに変換する。
|
Column |
getColumn()
カラムメタ情報を取得する。
|
java.lang.reflect.Method |
getColumnSetter()
カラムに値を設定する際に利用するメソッドを取得する。
|
java.lang.Class |
getTargetClass()
設定対象クラスを取得する。
|
java.lang.reflect.Method[] |
getValueConvertors()
観測値から保存値への変換に利用するメソッドchainを取得する。
|
java.lang.reflect.Method[] |
getValueGetterMethods()
観測値から保存値を取得する際に利用するメソッドchainを取得する。
|
protected void |
setMethod(java.lang.Class setClass,
java.lang.reflect.Method getter) |
void |
setValue(java.sql.PreparedStatement ps,
int index,
java.lang.Object value)
PreparedStatementに観測値を設定する。
|
static ColumnSaver.LocalStringReader |
stringToLocalStringReader(java.lang.String s) |
static java.lang.String |
timestampToStringConverter(java.sql.Timestamp ts)
java.sql.TimestmapをStringに変換する。
|
protected static java.lang.Class[] nullParam
protected static java.lang.reflect.Method booleanToString
protected static java.lang.reflect.Method byteToString
protected static java.lang.reflect.Method shortToString
protected static java.lang.reflect.Method intToString
protected static java.lang.reflect.Method longToString
protected static java.lang.reflect.Method floatToString
protected static java.lang.reflect.Method doubleToString
protected static java.lang.reflect.Method bigDecimalToString
protected static java.lang.reflect.Method dateToSqlDate
protected static java.lang.reflect.Method dateToSqlTime
protected static java.lang.reflect.Method dateToSqlTimestamp
protected static java.lang.reflect.Method stringToLocalStringReader
protected static java.lang.reflect.Method booleanToInteger
protected static java.lang.reflect.Method dateToString
protected static java.lang.reflect.Method timestampToString
protected static java.lang.reflect.Method binaryToLocalByteArrayInputStream
protected static java.lang.reflect.Method bytesToLocalByteArrayInputStream
protected static java.lang.reflect.Method psSetString
protected static java.lang.reflect.Method psSetBoolean
protected static java.lang.reflect.Method psSetByte
protected static java.lang.reflect.Method psSetShort
protected static java.lang.reflect.Method psSetInteger
protected static java.lang.reflect.Method psSetLong
protected static java.lang.reflect.Method psSetFloat
protected static java.lang.reflect.Method psSetDouble
protected static java.lang.reflect.Method psSetBigDecimal
protected static java.lang.reflect.Method psSetDate
protected static java.lang.reflect.Method psSetTime
protected static java.lang.reflect.Method psSetTimestamp
protected static java.lang.reflect.Method psSetNull
protected static java.lang.reflect.Method psSetBinaryStream
protected static java.lang.reflect.Method psSetCharacterStream
protected Column column
protected java.lang.Class targetClass
protected java.lang.reflect.Method setter
protected java.lang.reflect.Method[] methods
protected java.lang.reflect.Method[] convertors
protected java.lang.Integer isqlType
protected boolean streamType
public ColumnSaver(Column column, java.lang.Class targetClass) throws FatalException
column
- カラム・現象型マッピングメタ情報FatalException
public static java.lang.Integer booleanToIntegerConverter(java.lang.Boolean b)
public static java.sql.Date dateToSqlDateConverter(java.util.Date date)
public static java.sql.Time dateToSqlTimeConverter(java.util.Date date)
public static java.sql.Timestamp dateToSqlTimestampConverter(java.util.Date date)
public static java.lang.String dateToStringConverter(java.util.Date date)
date
- 変換対象Dateオブジェクトpublic static java.lang.String timestampToStringConverter(java.sql.Timestamp ts)
ts
- 変換対象Timestmapオブジェクトpublic static ColumnSaver.LocalStringReader stringToLocalStringReader(java.lang.String s)
public static ColumnSaver.LocalByteArrayInputStream binaryToLocalByteArrayInputStream(Binary binary)
public static ColumnSaver.LocalByteArrayInputStream bytesToLocalByteArrayInputStream(byte[] bytes)
public Column getColumn()
getColumn
インタフェース内 ColumnStorable
public java.lang.Class getTargetClass()
public java.lang.reflect.Method getColumnSetter()
public java.lang.reflect.Method[] getValueGetterMethods()
public java.lang.reflect.Method[] getValueConvertors()
public void setValue(java.sql.PreparedStatement ps, int index, java.lang.Object value) throws DBException, FatalException
setValue
インタフェース内 ColumnStorable
DBException
FatalException
protected void setMethod(java.lang.Class setClass, java.lang.reflect.Method getter) throws FatalException
setClass
- BusinessObjectFatalException
protected java.lang.reflect.Method[] createMethods(java.lang.reflect.Method getter, java.lang.reflect.Method value)