org.seasar.extension.jdbc.where
クラス SimpleWhere

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

public class SimpleWhere
extends Object
implements Where

入力された項目をandでつなげていくような検索条件を組み立てるクラスです。

作成者:
higa

コンストラクタの概要
SimpleWhere()
          SimpleWhereを作成します。
 
メソッドの概要
protected  void addCondition(ConditionType conditionType, String propertyName, Object value)
          条件を追加します。
 SimpleWhere contains(String propertyName, String value)
          like '%?
 SimpleWhere ends(String propertyName, String value)
          like '%?'
 SimpleWhere eq(String propertyName, Object value)
          =の条件を追加します。
 SimpleWhere ge(String propertyName, Object value)
          >=の条件を追加します。
 String getCriteria()
          クライテリアを返します。
 Object[] getParams()
          パラメータの配列を返します。
 SimpleWhere gt(String propertyName, Object value)
          >の条件を追加します。
 SimpleWhere in(String propertyName, Object... values)
          inの条件を追加します。
 SimpleWhere isNotNull(String propertyName, Boolean value)
          is not nullの条件を追加します。
 SimpleWhere isNull(String propertyName, Boolean value)
          is nullの条件を追加します。
 SimpleWhere le(String propertyName, Object value)
          <=の条件を追加します。
 SimpleWhere like(String propertyName, String value)
          likeの条件を追加します。
 SimpleWhere lt(String propertyName, Object value)
          <の条件を追加します。
 SimpleWhere ne(String propertyName, Object value)
          <>の条件を追加します。
 SimpleWhere notIn(String propertyName, Object... values)
          not inの条件を追加します。
 SimpleWhere starts(String propertyName, String value)
          like '?
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SimpleWhere

public SimpleWhere()
SimpleWhereを作成します。

メソッドの詳細

addCondition

protected void addCondition(ConditionType conditionType,
                            String propertyName,
                            Object value)
条件を追加します。

パラメータ:
conditionType - 条件タイプ
propertyName - プロパティ名
value - 値

eq

public SimpleWhere eq(String propertyName,
                      Object value)
=の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

ne

public SimpleWhere ne(String propertyName,
                      Object value)
<>の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

lt

public SimpleWhere lt(String propertyName,
                      Object value)
<の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

le

public SimpleWhere le(String propertyName,
                      Object value)
<=の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

gt

public SimpleWhere gt(String propertyName,
                      Object value)
>の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

ge

public SimpleWhere ge(String propertyName,
                      Object value)
>=の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

in

public SimpleWhere in(String propertyName,
                      Object... values)
inの条件を追加します。

パラメータ:
propertyName -
values -
戻り値:
このインスタンス自身

notIn

public SimpleWhere notIn(String propertyName,
                         Object... values)
not inの条件を追加します。

パラメータ:
propertyName -
values -
戻り値:
このインスタンス自身

like

public SimpleWhere like(String propertyName,
                        String value)
likeの条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

starts

public SimpleWhere starts(String propertyName,
                          String value)
like '?%'の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

ends

public SimpleWhere ends(String propertyName,
                        String value)
like '%?'の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

contains

public SimpleWhere contains(String propertyName,
                            String value)
like '%?%'の条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

isNull

public SimpleWhere isNull(String propertyName,
                          Boolean value)
is nullの条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

isNotNull

public SimpleWhere isNotNull(String propertyName,
                             Boolean value)
is not nullの条件を追加します。

パラメータ:
propertyName -
value -
戻り値:
このインスタンス自身

getCriteria

public String getCriteria()
インタフェース Where の記述:
クライテリアを返します。

定義:
インタフェース Where 内の getCriteria
戻り値:
クライテリア

getParams

public Object[] getParams()
インタフェース Where の記述:
パラメータの配列を返します。

定義:
インタフェース Where 内の getParams
戻り値:
パラメータの配列


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