jp.mosp.common.dao
クラス CmCodeDao

java.lang.Object
  上位を拡張 jp.mosp.common.common.BaseDao
      上位を拡張 jp.mosp.common.dao.CmCodeDao

public class CmCodeDao
extends BaseDao

コードテーブルを操作をする機能を提供する。

CmCodeDtoを用いて、DBとJavaプログラム間でレコードを共有する。


フィールドの概要
static String COL_DELETE_FLAG
          コードテーブル、列名(削除フラグ)。
static String COL_T_CODE
          コードテーブル、列名(コード)。
static String COL_T_ID
          コードテーブル、列名(コードID)。
static String COL_T_NAME
          コードテーブル、列名(名称)。
static String COL_VIEW_INDEX
          コードテーブル、列名(表示順)。
static String KEY_01
          コードテーブル、主キー1。
static String KEY_02
          コードテーブル、主キー2。
static String TABLE
          コードテーブル名。
 
クラス jp.mosp.common.common.BaseDao から継承されたフィールド
aspUserId, cfg, cmd, cnt, conn, index, INSERT_DATE, INSERT_USER, ps, rs, UPDATE_DATE, UPDATE_USER, userId
 
コンストラクタの概要
CmCodeDao()
          コンストラクタ。
CmCodeDao(Properties cfg, String cmd, CmAspUserDto aspUser, CmUserDto user, Connection conn)
          コンストラクタ。
 
メソッドの概要
 List<CmCodeDto> findAll()
          全データ取得。
 List<CmCodeDto> findAllTId()
          全データ取得(T_IDのリスト)。
 List<CmCodeDto> findForCondition(String tId)
          条件文によるデータ取得。
 CmCodeDto findForKey(String tId, String tCode)
          キーによるデータ取得。
 List<CmCodeDto> findForSearch(String tId, String tCode, String tName, String deleteFlag)
          条件文によるデータ取得(検索用)。
 CmCodeDto findForUpdate(String tId, String tCode)
          キーによる行ロック取得。
 int insert(CmCodeDto dto)
          データ挿入。
 int update(CmCodeDto dto)
          データ更新。
 
クラス jp.mosp.common.common.BaseDao から継承されたメソッド
chkDelete, chkInsert, chkUpdate, clearParams, executeQuery, executeUpdate, executeUpdate, executeUpdate, getAddConditionForKey, getConditionForKey, getDeleteQuery, getDesc, getForUpdate, getInsertQuery, getInsertQuery, getLimit, getOffset, getOrderBy, getOrderForKey, getPageStatement, getRdbmsType, getSelectCountQuery, getSelectCountStatement, getSelectQuery, getSelectStatement, getSelectStatement, getTable, getTableDescriptionQuery, getUpdateQuery, initDao, mappingCommonInfo, prepareStatement, releasePreparedStatement, releaseResultSet, setBinaryParam, setCommonParams, setDateParam, setParam, setParam, setParam, setParam, setParam, setParam
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

TABLE

public static final String TABLE
コードテーブル名。

関連項目:
定数フィールド値

KEY_01

public static final String KEY_01
コードテーブル、主キー1。

関連項目:
定数フィールド値

KEY_02

public static final String KEY_02
コードテーブル、主キー2。

関連項目:
定数フィールド値

COL_T_ID

public static final String COL_T_ID
コードテーブル、列名(コードID)。

関連項目:
定数フィールド値

COL_T_CODE

public static final String COL_T_CODE
コードテーブル、列名(コード)。

関連項目:
定数フィールド値

COL_T_NAME

public static final String COL_T_NAME
コードテーブル、列名(名称)。

関連項目:
定数フィールド値

COL_VIEW_INDEX

public static final String COL_VIEW_INDEX
コードテーブル、列名(表示順)。

関連項目:
定数フィールド値

COL_DELETE_FLAG

public static final String COL_DELETE_FLAG
コードテーブル、列名(削除フラグ)。

関連項目:
定数フィールド値
コンストラクタの詳細

CmCodeDao

public CmCodeDao()
コンストラクタ。


CmCodeDao

public CmCodeDao(Properties cfg,
                 String cmd,
                 CmAspUserDto aspUser,
                 CmUserDto user,
                 Connection conn)
コンストラクタ。

パラメータ:
cfg - 設定ファイル
cmd - コマンド
aspUser - ASPユーザー
user - ユーザー
conn - DBコネクション
メソッドの詳細

findAll

public List<CmCodeDto> findAll()
                        throws SQLException,
                               IllegalAccessException,
                               NoSuchFieldException
全データ取得。

戻り値:
検索結果(DTOのList)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findAllTId

public List<CmCodeDto> findAllTId()
                           throws SQLException
全データ取得(T_IDのリスト)。

戻り値:
検索結果(DTOのList)
例外:
SQLException

findForKey

public CmCodeDto findForKey(String tId,
                            String tCode)
                     throws SQLException,
                            IllegalAccessException,
                            NoSuchFieldException
キーによるデータ取得。

パラメータ:
tId - コード区分(検索キー)
tCode - コード(検索キー)
戻り値:
検索結果(DTO)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findForUpdate

public CmCodeDto findForUpdate(String tId,
                               String tCode)
                        throws SQLException,
                               IllegalAccessException,
                               NoSuchFieldException
キーによる行ロック取得。

パラメータ:
tId - コード区分(検索キー)
tCode - コード(検索キー)
戻り値:
検索結果(DTO)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findForCondition

public List<CmCodeDto> findForCondition(String tId)
                                 throws SQLException,
                                        IllegalAccessException,
                                        NoSuchFieldException
条件文によるデータ取得。

パラメータ:
tId - コード区分(検索キー)
戻り値:
検索結果(DTOのList)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findForSearch

public List<CmCodeDto> findForSearch(String tId,
                                     String tCode,
                                     String tName,
                                     String deleteFlag)
                              throws SQLException,
                                     IllegalAccessException,
                                     NoSuchFieldException
条件文によるデータ取得(検索用)。

パラメータ:
tId - コード区分(検索キー)
tCode - コード(検索キー)
tName - コード名称(検索キー)
deleteFlag - 削除フラグ(検索キー)
戻り値:
検索結果(DTOのList)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

insert

public int insert(CmCodeDto dto)
           throws SQLException,
                  IllegalAccessException,
                  NoSuchFieldException,
                  MospException
データ挿入。

パラメータ:
dto - 挿入対象DTO
戻り値:
挿入結果(件数)
例外:
SQLException
IllegalAccessException
NoSuchFieldException
MospException

update

public int update(CmCodeDto dto)
           throws SQLException,
                  IllegalAccessException,
                  NoSuchFieldException,
                  MospException
データ更新。

パラメータ:
dto - 更新対象DTO
戻り値:
更新結果(件数)
例外:
SQLException
IllegalAccessException
NoSuchFieldException
MospException