org.seasar.extension.jdbc.types
クラス EnumOrdinalType

java.lang.Object
  上位を拡張 org.seasar.extension.jdbc.types.AbstractValueType
      上位を拡張 org.seasar.extension.jdbc.types.EnumOrdinalType
すべての実装されたインタフェース:
ValueType

public class EnumOrdinalType
extends AbstractValueType

Enumの序数をJDBCで扱うためのクラスです。

作成者:
koichik

コンストラクタの概要
EnumOrdinalType(Class<? extends Enum> enumClass)
          インスタンスを構築します。
 
メソッドの概要
 void bindValue(CallableStatement cs, String parameterName, Object value)
           
 void bindValue(PreparedStatement ps, int index, Object value)
           
 Object getValue(CallableStatement cs, int index)
           
 Object getValue(CallableStatement cs, String parameterName)
           
 Object getValue(ResultSet resultSet, int index)
           
 Object getValue(ResultSet resultSet, String columnName)
           
protected  Enum toEnum(int ordinal)
          Enumに変換します。
 String toText(Object value)
           
 
クラス org.seasar.extension.jdbc.types.AbstractValueType から継承されたメソッド
getSqlType, registerOutParameter, registerOutParameter, setNull, setNull
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

EnumOrdinalType

public EnumOrdinalType(Class<? extends Enum> enumClass)
インスタンスを構築します。

パラメータ:
enumClass -
メソッドの詳細

getValue

public Object getValue(ResultSet resultSet,
                       int index)
                throws SQLException
例外:
SQLException

getValue

public Object getValue(ResultSet resultSet,
                       String columnName)
                throws SQLException
例外:
SQLException

getValue

public Object getValue(CallableStatement cs,
                       int index)
                throws SQLException
例外:
SQLException

getValue

public Object getValue(CallableStatement cs,
                       String parameterName)
                throws SQLException
例外:
SQLException

bindValue

public void bindValue(PreparedStatement ps,
                      int index,
                      Object value)
               throws SQLException
例外:
SQLException

bindValue

public void bindValue(CallableStatement cs,
                      String parameterName,
                      Object value)
               throws SQLException
例外:
SQLException

toText

public String toText(Object value)

toEnum

protected Enum toEnum(int ordinal)
Enumに変換します。

パラメータ:
ordinal - 序数
戻り値:
Enum


Copyright ? 2004-2008 The Seasar Foundation. All Rights Reserved.