jp.mosp.common.dao
クラス CmUserDao

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

public class CmUserDao
extends BaseDao

ユーザーテーブルを操作をする機能を提供する。

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


フィールドの概要
static String COL_AUTHORITY
          ユーザーテーブル、列名(プログラム利用権限)。
static String COL_CHANGE_PASS
          ユーザーテーブル、列名(パスワード変更日)。
static String COL_DATA_LEVEL
          ユーザーテーブル、列名(データ参照レベル)。
static String COL_DELETE_FLAG
          ユーザーテーブル、列名(削除フラグ)。
static String COL_K_CODE
          ユーザーテーブル、列名(社員コード)。
static String COL_PASSWORD
          ユーザーテーブル、列名(パスワード)。
static String COL_USER_ID
          ユーザーテーブル、列名(ID)。
static String COL_USER_NAME
          ユーザーテーブル、列名(ユーザー名)。
static String KEY_01
          ユーザーテーブル、主キー。
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
 
コンストラクタの概要
CmUserDao()
          コンストラクタ。
CmUserDao(Properties cfg, String cmd, CmAspUserDto aspUser, CmUserDto user, Connection conn)
          コンストラクタ。
 
メソッドの概要
 List<CmUserDto> findAllCmUser()
          全データ取得。
 List<CmUserDto> findCmUserForCondition(String userId, String userName, String authority, String deleteFlag)
          条件文によるデータ取得。
 CmUserDto findForKey(String userId)
          キーによるデータ取得。
 CmUserDto findForUpdate(String userId)
          キーによる行ロック取得。
 int insert(CmUserDto dto)
          データ挿入。
 int update(CmUserDto 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, 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
ユーザーテーブル、主キー。

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

COL_USER_ID

public static final String COL_USER_ID
ユーザーテーブル、列名(ID)。

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

COL_PASSWORD

public static final String COL_PASSWORD
ユーザーテーブル、列名(パスワード)。

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

COL_K_CODE

public static final String COL_K_CODE
ユーザーテーブル、列名(社員コード)。

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

COL_USER_NAME

public static final String COL_USER_NAME
ユーザーテーブル、列名(ユーザー名)。

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

COL_AUTHORITY

public static final String COL_AUTHORITY
ユーザーテーブル、列名(プログラム利用権限)。

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

COL_DATA_LEVEL

public static final String COL_DATA_LEVEL
ユーザーテーブル、列名(データ参照レベル)。

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

COL_CHANGE_PASS

public static final String COL_CHANGE_PASS
ユーザーテーブル、列名(パスワード変更日)。

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

COL_DELETE_FLAG

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

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

CmUserDao

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


CmUserDao

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

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

findAllCmUser

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

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

findForKey

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

パラメータ:
userId - ユーザーID(検索キー)
戻り値:
検索結果(DTO)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findForUpdate

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

パラメータ:
userId - ユーザーID(検索キー)
戻り値:
検索結果(DTO)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

findCmUserForCondition

public List<CmUserDto> findCmUserForCondition(String userId,
                                              String userName,
                                              String authority,
                                              String deleteFlag)
                                       throws SQLException,
                                              IllegalAccessException,
                                              NoSuchFieldException
条件文によるデータ取得。

パラメータ:
userId - 検索ユーザーID
userName - 検索ユーザー名
authority - 検索MosP利用権限
deleteFlag - 検索削除フラグ
戻り値:
検索結果(DTOのList)
例外:
SQLException
IllegalAccessException
NoSuchFieldException

insert

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

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

update

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

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