com.hamaf.hikyaku.dataobject
クラス DetailItemsBase

java.lang.Object
  上位を拡張 com.hamaf.hikyaku.dataobject.DetailItemsBase
すべての実装されたインタフェース:
DetailItemsInterface
直系の既知のサブクラス:
BelongDto, CommonSelectDto, GroupDto, GroupUserDto, HatubanDto, InitDto, MenuDto, MessageDto, PluginInfDto, PossibleDto, RetrieveDto, UserDto, UserPwdDto, VGroupDto, VInitDto, VMenuDto, VPossibleDto, VRetrieveDto

public abstract class DetailItemsBase
extends java.lang.Object
implements DetailItemsInterface

タイトル:DetailItemsBase is DetailItemsInterface implementation base class.

説明:データ取得用の基本抽象クラス


継承クラスでの利用方法
  1. 項目毎の項目番号定義をpublic final static intで定義する
  2. pkeysにプライマリキーの項目番号をint配列で定義する
String constCondに条件を設定すると、それが付加されます。(AND条件) ("AND"は不要です)
String groupに集計項目名を','で繋げた文字列を設定するとGroup By句が生成されます。
サンプル
 public class XxxxxDetailItemsInstance extends DetailItemsBase {

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

    public XxxxxDetailItemsInstance() {
      // PrimaryKey項目を項目番号で指定する(省略可)
      // 省略時はテーブル定義のPrimaryKeyが使用されます
      pkeys = new int[]{0};         // new int[]{USER_ID}; でも可
    }
 }
 

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

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

入れ子のクラスの概要
 
インタフェース com.hamaf.hikyaku.dataobject.DetailItemsInterface から継承された入れ子のクラス/インタフェース
DetailItemsInterface.COMMFLD, DetailItemsInterface.USE_FLG
 
フィールドの概要
protected  int[] pkeys
           
 
コンストラクタの概要
DetailItemsBase()
           
 
メソッドの概要
 void clearNotFound()
          Describe clearNotFound method : clear not found condision.
 void clearRequest(int item)
          Method clearRequest is clear get item.
 java.lang.String getCommFld(DetailItemsInterface.COMMFLD fld)
          Describe getCommFld method : get common field value.
 java.lang.String getConstCond()
          Describe getConstCond method : 固定条件を戻す.
 java.lang.String getField(int pos)
          Describe getField method : 項目名を戻す.
 java.util.Collection<java.lang.String> getFieldNameList()
          Describe getFieldNameList method : return field name list.
 java.lang.String getFldValue(java.lang.String fld)
          Describe getFldValue method : get item value by Field name.
 java.lang.String getGroup()
          Describe getGroup method : グループ化項目を戻す.
 int getItemCount()
          Method getItemCount is return request item count.
 java.util.Set<java.lang.Integer> getItemNoList()
          Describe getItemNoList method : return item no list.
 java.lang.String getItemValue(int item)
          Method getItemValue is get Item Value.
 int[] getKeyFlds()
          Describe getKeyFlds method : key項目番号の配列を戻す.
 java.lang.String getSysId()
           
 boolean isKeyFld(int no)
          Describe isKeyFld method : check key field.
 boolean isNotFound()
          Describe isNotFound method : is data not found ?
 boolean isRequestItem(int no)
          Method isRequestItem return is reuest item-no.
 void setAllRequest()
          Describe setAllRequest method : set all items get.
 void setCommFld(DetailItemsInterface.COMMFLD fld, java.lang.String val)
          Describe setCommFld method : set common field.
 void setConstCond(java.lang.String constCond)
          Describe setConstCond method : 固定条件を設定する.
 void setFldValue(java.lang.String fld, java.lang.String val)
          Describe setFldValue method : setting item value by Field name.
 void setGroup(java.lang.String group)
          Describe setGroup method : group を設定します.
 void setItemValue(int item, java.lang.String val)
          Method setItemValue is setting item value.
 void setNotFound()
          Describe setNotFound method : set not found condision.
 void setRequestItem(int item)
          Method setRequestItem is setting get item.
 void setSysId(java.lang.String sysId)
           
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

pkeys

protected int[] pkeys
コンストラクタの詳細

DetailItemsBase

public DetailItemsBase()
メソッドの詳細

setRequestItem

public final void setRequestItem(int item)
                          throws java.lang.IllegalArgumentException
インタフェース DetailItemsInterface の記述:
Method setRequestItem is setting get item.
取得する項目を項目番号で指定する。

定義:
インタフェース DetailItemsInterface 内の setRequestItem
パラメータ:
item - an int : item number
例外:
java.lang.IllegalArgumentException

getItemCount

public final int getItemCount()
インタフェース DetailItemsInterface の記述:
Method getItemCount is return request item count.
取得する項目数を戻す。

定義:
インタフェース DetailItemsInterface 内の getItemCount
戻り値:
int

getFieldNameList

public java.util.Collection<java.lang.String> getFieldNameList()
インタフェース DetailItemsInterface の記述:
Describe getFieldNameList method : return field name list.
項目名のリストを戻す。

定義:
インタフェース DetailItemsInterface 内の getFieldNameList
戻り値:
a Collection<String> :

getItemNoList

public java.util.Set<java.lang.Integer> getItemNoList()
インタフェース DetailItemsInterface の記述:
Describe getItemNoList method : return item no list.
項目番号のリストを戻す。

定義:
インタフェース DetailItemsInterface 内の getItemNoList
戻り値:
a Set<Integer> :

isRequestItem

public final boolean isRequestItem(int no)
インタフェース DetailItemsInterface の記述:
Method isRequestItem return is reuest item-no.
指定された項目番号が取得対象かを戻す。
取得対象のときtrue

定義:
インタフェース DetailItemsInterface 内の isRequestItem
パラメータ:
no - an int : チェックする項目番号
戻り値:
boolean

isKeyFld

public boolean isKeyFld(int no)
インタフェース DetailItemsInterface の記述:
Describe isKeyFld method : check key field.
指定された項目番号がKey項目の場合 true を戻す。

定義:
インタフェース DetailItemsInterface 内の isKeyFld
パラメータ:
no - a boolean : 項目番号
戻り値:
a boolean : key項目の場合 true

clearRequest

public final void clearRequest(int item)
                        throws java.lang.IllegalArgumentException
インタフェース DetailItemsInterface の記述:
Method clearRequest is clear get item.
取得をクリアする項目を項目番号で指定する。

定義:
インタフェース DetailItemsInterface 内の clearRequest
パラメータ:
item - an int : item number
例外:
java.lang.IllegalArgumentException

setAllRequest

public final void setAllRequest()
インタフェース DetailItemsInterface の記述:
Describe setAllRequest method : set all items get.
設定されている全項目を取得する設定を行う。

定義:
インタフェース DetailItemsInterface 内の setAllRequest

setItemValue

public final void setItemValue(int item,
                               java.lang.String val)
                        throws java.lang.IllegalArgumentException
インタフェース DetailItemsInterface の記述:
Method setItemValue is setting item value.

定義:
インタフェース DetailItemsInterface 内の setItemValue
パラメータ:
item - an int : 項目番号
val - a String : 値の文字列
例外:
java.lang.IllegalArgumentException

setFldValue

public final void setFldValue(java.lang.String fld,
                              java.lang.String val)
インタフェース DetailItemsInterface の記述:
Describe setFldValue method : setting item value by Field name.
フィールド名で値を設定する。

定義:
インタフェース DetailItemsInterface 内の setFldValue
パラメータ:
fld - a String : フィールド名
val - a String : 設定する値

getItemValue

public final java.lang.String getItemValue(int item)
                                    throws java.lang.IllegalArgumentException
インタフェース DetailItemsInterface の記述:
Method getItemValue is get Item Value.

定義:
インタフェース DetailItemsInterface 内の getItemValue
パラメータ:
item - an int : 項目番号
戻り値:
a String : 値
例外:
java.lang.IllegalArgumentException

getFldValue

public java.lang.String getFldValue(java.lang.String fld)
インタフェース DetailItemsInterface の記述:
Describe getFldValue method : get item value by Field name.
フィールド名で値を取得する。

定義:
インタフェース DetailItemsInterface 内の getFldValue
パラメータ:
fld - a String : フィールド名
戻り値:
a String : 値

isNotFound

public final boolean isNotFound()
インタフェース DetailItemsInterface の記述:
Describe isNotFound method : is data not found ?
データの有無を確認する。データなしの場合true

定義:
インタフェース DetailItemsInterface 内の isNotFound
戻り値:
a boolean : データなしの場合 true

setNotFound

public final void setNotFound()
インタフェース DetailItemsInterface の記述:
Describe setNotFound method : set not found condision.
データなしの場合にその設定を行う。

定義:
インタフェース DetailItemsInterface 内の setNotFound

clearNotFound

public final void clearNotFound()
インタフェース DetailItemsInterface の記述:
Describe clearNotFound method : clear not found condision.
データなしの設定をクリアする。(データありにする)

定義:
インタフェース DetailItemsInterface 内の clearNotFound

setCommFld

public final void setCommFld(DetailItemsInterface.COMMFLD fld,
                             java.lang.String val)
インタフェース DetailItemsInterface の記述:
Describe setCommFld method : set common field.
共通項目の設定を行う。

定義:
インタフェース DetailItemsInterface 内の setCommFld
パラメータ:
fld - a COMMFLD
val - a String : 設定する値

getCommFld

public final java.lang.String getCommFld(DetailItemsInterface.COMMFLD fld)
インタフェース DetailItemsInterface の記述:
Describe getCommFld method : get common field value.
共通項目の設定値を戻す。

定義:
インタフェース DetailItemsInterface 内の getCommFld
パラメータ:
fld - a COMMFLD :
戻り値:
a String :

getField

public final java.lang.String getField(int pos)
インタフェース DetailItemsInterface の記述:
Describe getField method : 項目名を戻す.
指定された項目番号のDB項目名を戻す

定義:
インタフェース DetailItemsInterface 内の getField
パラメータ:
pos - an int : 項目番号
戻り値:
a String : 項目名

getKeyFlds

public final int[] getKeyFlds()
インタフェース DetailItemsInterface の記述:
Describe getKeyFlds method : key項目番号の配列を戻す.

定義:
インタフェース DetailItemsInterface 内の getKeyFlds
戻り値:
a int[] : キー項目番号の配列

getSysId

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

setSysId

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

getConstCond

public final java.lang.String getConstCond()
インタフェース DetailItemsInterface の記述:
Describe getConstCond method : 固定条件を戻す.

定義:
インタフェース DetailItemsInterface 内の getConstCond
戻り値:
a String : 条件式

setConstCond

public final void setConstCond(java.lang.String constCond)
インタフェース DetailItemsInterface の記述:
Describe setConstCond method : 固定条件を設定する.

定義:
インタフェース DetailItemsInterface 内の setConstCond

getGroup

public final java.lang.String getGroup()
インタフェース DetailItemsInterface の記述:
Describe getGroup method : グループ化項目を戻す.

定義:
インタフェース DetailItemsInterface 内の getGroup
戻り値:
a String[] : グループ化項目

setGroup

public final void setGroup(java.lang.String group)
インタフェース DetailItemsInterface の記述:
Describe setGroup method : group を設定します.

定義:
インタフェース DetailItemsInterface 内の setGroup
パラメータ:
group - a String :

toString

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