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