|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectorg.seasar.extension.dxo.converter.impl.AbstractConverter
org.seasar.extension.dxo.converter.impl.SqlTimestampConverter
任意のオブジェクトからTimestampへの変換を行うコンバータです。
変換は次のように行われます。
Timestampなら、変換元をそのまま変換先とします。Dateなら、同じ時刻を持つTimestampを変換先とします。Calendarなら、同じ時刻を持つTimestampを変換先とします。数なら、そのlong値を時刻とする
Timestampを変換先とします。Timestampに変換した結果を変換先とします。
| フィールドの概要 |
| クラス org.seasar.extension.dxo.converter.impl.AbstractConverter から継承したフィールド |
shallowCopy |
| コンストラクタの概要 | |
SqlTimestampConverter()
|
|
| メソッドの概要 | |
java.lang.Object |
convert(java.lang.Object source,
java.lang.Class destClass,
ConversionContext context)
sourceをdestClassに変換したオブジェクトを返します。 |
java.lang.Class |
getDestClass()
このコンバータがサポートしている変換先のクラスを返します。 |
java.lang.Class[] |
getSourceClasses()
このコンバータがサポートしている変換元のクラスを配列で返します。 |
protected java.sql.Timestamp |
toTimestamp(java.util.Calendar calendar)
CalendarをTimestampに変換して返します。 |
protected java.sql.Timestamp |
toTimestamp(java.util.Date date)
DateをTimestampに変換して返します。 |
protected java.sql.Timestamp |
toTimestamp(java.lang.Number date)
NumberをTimestampに変換して返します。 |
protected java.sql.Timestamp |
toTimestamp(java.lang.String date,
java.text.DateFormat dateFormat)
文字列を Timestampに変換して返します。 |
| クラス org.seasar.extension.dxo.converter.impl.AbstractConverter から継承したメソッド |
convert, getEnumName, getEnumOrdinal, isEnum, setShallowCopy |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public SqlTimestampConverter()
| メソッドの詳細 |
public java.lang.Class[] getSourceClasses()
Converter の記述: 最低でも1以上の長さを持つ配列を返します。
public java.lang.Class getDestClass()
Converter の記述:
public java.lang.Object convert(java.lang.Object source,
java.lang.Class destClass,
ConversionContext context)
Converter の記述: sourceをdestClassに変換したオブジェクトを返します。
source - 変換元のオブジェクトdestClass - 変換先のクラスcontext - 変換コンテキスト
destClassのインスタンスです。protected java.sql.Timestamp toTimestamp(java.util.Date date)
DateをTimestampに変換して返します。
date - 変換元のDate
Timestampprotected java.sql.Timestamp toTimestamp(java.util.Calendar calendar)
CalendarをTimestampに変換して返します。
calendar - 変換元のCalendar
Timestampprotected java.sql.Timestamp toTimestamp(java.lang.Number date)
NumberをTimestampに変換して返します。
date - 変換元のNumber
Timestamp
protected java.sql.Timestamp toTimestamp(java.lang.String date,
java.text.DateFormat dateFormat)
Timestampに変換して返します。
date - 変換元のオブジェクトの文字列表現dateFormat - フォーマット
Timestamp
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||