com.hamaf.hikyaku.dataobject
クラス RetrieveKeysBase

java.lang.Object
  上位を拡張 com.hamaf.hikyaku.dataobject.RetrieveKeysBase
すべての実装されたインタフェース:
RetrieveKeysInterface, java.lang.Iterable<java.util.List<java.lang.String>>
直系の既知のサブクラス:
CommonSelectSearchDto, GroupSearchDto, MessageSearchDto, PluginSearchDto, PossibleSearchDto, UserSearchDto, VInitSearchDto, VMenuSearchDto, VReserveSessionSearchDto, VRetrieveSearchDto

public abstract class RetrieveKeysBase
extends java.lang.Object
implements RetrieveKeysInterface

タイトル:RetrieveKeysBase is RetrieveKeysInterface implementation base class.

説明:プライマリキー一覧取得用のベースクラス。


継承したクラスは、以下の定義を行います。
  1. public final static intで使用する項目を定義する。
  2. コンストラクターにおいてString[] keyItemsで取得するキーの項目名を定義する。
利用する場合の考慮
・検索値が設定されている(空文字列("")以外)もののみ、対象となります。
・検索条件は設定が無い場合、等号("=")になります。
constCondに条件を設定すると、それが付加されます。(AND条件) ("AND"は不要です) サンプル
 public class XxxxxRetrieveKeyInstance extends RetrieveKeysBase {

    // DB項目名称でフィールドを定義する (値は 0 から順番に設定すること)
    public final static int USER_NAME = 0;
    public final static int MAIL_ADDR = 1;
    public final static int Sample = 2;
    // DB項目名と異なる場合は (上記 Sample)以下のようにして、DB項目名を指定する
    // 同一項目を別のフィールド名で複数定義することも可能です。
    public final static String Sample_FIELD = "実際の項目名";

    public XxxxxRetrieveKeyInstance() {
      // 取得するDB項目名を指定する(複数指定可能)(省略可)
      // 省略時はテーブル定義のPrimaryKey項目を取得します
      keyItems = new String[]{"USER_ID"};
    }
 }
 

著作権: Copyright (c) 2004/06/15

バージョン:
1.0
作成者:
y-hamanaka

フィールドの概要
protected  java.lang.String[] keyItems
           
 
コンストラクタの概要
RetrieveKeysBase()
           
 
メソッドの概要
 void addKey(java.util.List<java.lang.String> key)
          Method addKey is add key item value.
 void clearKeys()
          Method clearKeys is clear key item value.
 java.util.Map<java.lang.Integer,java.lang.String> getConditions()
          Method getConditions is return retrieve condition.
 java.lang.String getConstCond()
          Describe getAddCondition method : return Additional Condition.
 DetailItemsInterface.USE_FLG getDel()
           
 java.lang.String getItem(int pos)
          Describe getItem method : return item value.
 java.lang.String getKeyItem(int pos)
          Describe getKeyItem method : return item value.
 java.util.List<java.util.List<java.lang.String>> getKeys()
          Method getKeys is return key item list.
 java.util.Map<java.lang.Integer,java.lang.String> getOrderItems()
          Method getOrderItems is return order information.
 java.util.Map<java.lang.Integer,java.lang.Integer> getOrderPos()
          Describe getOrderPos method : setting orderinf.
 java.util.List<java.lang.String> getPkeyFld()
          Describe getPkeyFld method : return PrimaryKeu Fields Name.
 java.util.Map<java.lang.Integer,java.lang.String> getRetriveValues()
          Method getRetriveValues is return retrive item value.
 java.lang.String getSysId()
           
 int itemCount()
          Describe ItemCount method : return items count.
 java.util.Iterator<java.util.List<java.lang.String>> iterator()
          キーリストのIteratorを戻す.
 int keyCount()
          Describe keyCount method : return key items count.
 void setCondition(int item, java.lang.String cond)
          Method setRetriveCondition is set retrieve condition.
 void setConstCond(java.lang.String constCond)
          Describe setConstCond method : set Additional Condition.
 void setDel(DetailItemsInterface.USE_FLG del)
           
 void setKeys(java.util.List<java.util.List<java.lang.String>> keys)
          Method setKeys is set all key item value.
 void setOrderItem(int item, int seq)
          Method setOrderItem is set order.
 void setPkeyFld(java.util.List<java.lang.String> keys)
          Describe setPkeyFld method : set PrimaryKey Fields Name.
 void setRetrieveValue(int item, java.lang.String val)
          Method setRetrieveValue is set retrieve item value.
 void setSysId(java.lang.String sysId)
           
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

keyItems

protected java.lang.String[] keyItems
コンストラクタの詳細

RetrieveKeysBase

public RetrieveKeysBase()
メソッドの詳細

setRetrieveValue

public final void setRetrieveValue(int item,
                                   java.lang.String val)
                            throws java.lang.IllegalArgumentException
インタフェース RetrieveKeysInterface の記述:
Method setRetrieveValue is set retrieve item value.
検索項目とその値を設定する。
検索条件が"IN"の場合は、'値','値',・・・を設定し、 "BETWEENの場合は、'値' AND '値' を設定する。

定義:
インタフェース RetrieveKeysInterface 内の setRetrieveValue
パラメータ:
item - an int : 項目番号
val - a String : 検索値
例外:
java.lang.IllegalArgumentException

setCondition

public final void setCondition(int item,
                               java.lang.String cond)
                        throws java.lang.IllegalArgumentException
インタフェース RetrieveKeysInterface の記述:
Method setRetriveCondition is set retrieve condition.
検索条件("=","<","IN","LIKE","BETWEEN","IS" etc.)を設定する。
規定値は、等しい("=")とする。

定義:
インタフェース RetrieveKeysInterface 内の setCondition
パラメータ:
item - an int : 項目番号
cond - a String : 検索条件式
例外:
java.lang.IllegalArgumentException

setOrderItem

public final void setOrderItem(int item,
                               int seq)
                        throws java.lang.IllegalArgumentException
インタフェース RetrieveKeysInterface の記述:
Method setOrderItem is set order.
表示順の設定を行う。
表示順は、並び替え項目順に小さい値を設定する。
同一の表示順が設定された場合の動作は不定。
規定値は昇順とし、降順とする場合は、表示順にマイナス値で指定する。
マイナス値を指定した場合は、絶対値が順序とする。

定義:
インタフェース RetrieveKeysInterface 内の setOrderItem
パラメータ:
item - an int : 項目番号
seq - an int : 表示順
例外:
java.lang.IllegalArgumentException

clearKeys

public final void clearKeys()
インタフェース RetrieveKeysInterface の記述:
Method clearKeys is clear key item value.
Key項目値の保存領域を初期化する。

定義:
インタフェース RetrieveKeysInterface 内の clearKeys

addKey

public final void addKey(java.util.List<java.lang.String> key)
インタフェース RetrieveKeysInterface の記述:
Method addKey is add key item value.
検索で取得されたレコードのKey項目値を登録する。

定義:
インタフェース RetrieveKeysInterface 内の addKey
パラメータ:
key - an Object : キー値

setKeys

public final void setKeys(java.util.List<java.util.List<java.lang.String>> keys)
インタフェース RetrieveKeysInterface の記述:
Method setKeys is set all key item value.
検索で取得したレコードのキー値を一括して登録する。
キー値は引数のリストですべて置き換えられます。

定義:
インタフェース RetrieveKeysInterface 内の setKeys
パラメータ:
keys - a List : キー値が設定されたリスト

getKeys

public final java.util.List<java.util.List<java.lang.String>> getKeys()
インタフェース RetrieveKeysInterface の記述:
Method getKeys is return key item list.
キー項目値のリストを戻す。

定義:
インタフェース RetrieveKeysInterface 内の getKeys
戻り値:
List

iterator

public final java.util.Iterator<java.util.List<java.lang.String>> iterator()
キーリストのIteratorを戻す.

定義:
インタフェース java.lang.Iterable<java.util.List<java.lang.String>> 内の iterator
関連項目:
Iterable.iterator()

itemCount

public final int itemCount()
インタフェース RetrieveKeysInterface の記述:
Describe ItemCount method : return items count.
項目数を戻す。

定義:
インタフェース RetrieveKeysInterface 内の itemCount
戻り値:
an int : キー項目数

keyCount

public final int keyCount()
インタフェース RetrieveKeysInterface の記述:
Describe keyCount method : return key items count.
キー項目数を戻す。

定義:
インタフェース RetrieveKeysInterface 内の keyCount
戻り値:
an int : キー項目数

getOrderItems

public final java.util.Map<java.lang.Integer,java.lang.String> getOrderItems()
インタフェース RetrieveKeysInterface の記述:
Method getOrderItems is return order information.
設定されている表示順を渡す。
並び替え情報はMap<表示順(Integer),項目名+並び順(String)≥で設定される。

定義:
インタフェース RetrieveKeysInterface 内の getOrderItems
戻り値:
an Map<Integer, String> : 表示順

getOrderPos

public final java.util.Map<java.lang.Integer,java.lang.Integer> getOrderPos()
インタフェース RetrieveKeysInterface の記述:
Describe getOrderPos method : setting orderinf.
表示順の指定値をそのまま返す。

定義:
インタフェース RetrieveKeysInterface 内の getOrderPos
戻り値:
a Map : 指定された表示順情報

getRetriveValues

public final java.util.Map<java.lang.Integer,java.lang.String> getRetriveValues()
インタフェース RetrieveKeysInterface の記述:
Method getRetriveValues is return retrive item value.
設定されている検索値を渡す。
検索値はMap<項目番号(Integer),検索値(String)≥で設定される。

定義:
インタフェース RetrieveKeysInterface 内の getRetriveValues
戻り値:
a Map<Integer, String> : 検索値が設定されているMap

getConditions

public final java.util.Map<java.lang.Integer,java.lang.String> getConditions()
インタフェース RetrieveKeysInterface の記述:
Method getConditions is return retrieve condition.
設定されている検索条件を渡す。
検索条件はMap<項目番号(Integer),検索条件(String)≥で設定される。

定義:
インタフェース RetrieveKeysInterface 内の getConditions
戻り値:
a Map<Integer, String> : 検索条件式が設定されているMap

getConstCond

public final java.lang.String getConstCond()
インタフェース RetrieveKeysInterface の記述:
Describe getAddCondition method : return Additional Condition.
追加の検索条件を戻す。

定義:
インタフェース RetrieveKeysInterface 内の getConstCond
戻り値:
a String : 追加の検索条件

setConstCond

public final void setConstCond(java.lang.String constCond)
インタフェース RetrieveKeysInterface の記述:
Describe setConstCond method : set Additional Condition.
追加の検索条件を設定する。

定義:
インタフェース RetrieveKeysInterface 内の setConstCond
パラメータ:
constCond - a String : 追加の検索条件

getItem

public final java.lang.String getItem(int pos)
                               throws java.lang.IllegalArgumentException
インタフェース RetrieveKeysInterface の記述:
Describe getItem method : return item value.
指定された位置の項目内容を戻す。

定義:
インタフェース RetrieveKeysInterface 内の getItem
パラメータ:
pos - : 項目番号
戻り値:
a String : フィールド名
例外:
java.lang.IllegalArgumentException

getKeyItem

public final java.lang.String getKeyItem(int pos)
                                  throws java.lang.IllegalArgumentException
インタフェース RetrieveKeysInterface の記述:
Describe getKeyItem method : return item value.
指定された位置のKey項目名を戻す。

定義:
インタフェース RetrieveKeysInterface 内の getKeyItem
パラメータ:
pos - an int : Key項目の番号
戻り値:
a String : フィールド名
例外:
java.lang.IllegalArgumentException

getDel

public final DetailItemsInterface.USE_FLG getDel()
定義:
インタフェース RetrieveKeysInterface 内の getDel
戻り値:
削除フラグ

setDel

public final void setDel(DetailItemsInterface.USE_FLG del)
定義:
インタフェース RetrieveKeysInterface 内の setDel
パラメータ:
del - : 削除フラグ を設定します。

getSysId

public final java.lang.String getSysId()
定義:
インタフェース RetrieveKeysInterface 内の getSysId
戻り値:
システムID

setSysId

public final void setSysId(java.lang.String sysId)
定義:
インタフェース RetrieveKeysInterface 内の setSysId
パラメータ:
sysId - : システムID を設定します。

getPkeyFld

public final java.util.List<java.lang.String> getPkeyFld()
インタフェース RetrieveKeysInterface の記述:
Describe getPkeyFld method : return PrimaryKeu Fields Name.
キー項目名のリストを戻す。

定義:
インタフェース RetrieveKeysInterface 内の getPkeyFld
戻り値:
a List : キー項目のフィールド名

setPkeyFld

public final void setPkeyFld(java.util.List<java.lang.String> keys)
インタフェース RetrieveKeysInterface の記述:
Describe setPkeyFld method : set PrimaryKey Fields Name.
キー項目名のリストを設定する。

定義:
インタフェース RetrieveKeysInterface 内の setPkeyFld
パラメータ:
keys - a : キー項目のフィールド名

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString