/*********************************************************************
*   All Rights reserved,Copyright (c) K-Opticom
**********************************************************************
*＜プログラム内容＞
*   システム名      ：eo顧客基幹システム
*   モジュール名    ：JKUejbKU0021DBABase
*   ソースファイル名：JKUejbKU0021DBABase.java
*   作成者          ：富士通
*   日付            ：2011年07月12日
*＜機能概要＞
*   工事案件＜ｅｏ光ネット＞の制約部品クラス
*＜修正履歴＞
*   バージョン  修正日      修正者      修正内容
*   ｖ1.00.00	2011/07/12	FJ)日根		新規作成
*
**********************************************************************/

package eo.ejb.common.db;

import com.fujitsu.futurity.model.base.CAANMsg;
import com.fujitsu.futurity.model.ejb.common.fw.AgentDispatchContext;

import eo.ejb.cbm.entity.KU0061ETMsg;

/**
 * <p>
 * 工事案件＜ｅｏ光ネットマンション＞の制約部品クラスです。
 * </p>
 * @author 富士通
 */
public class JKUejbKU0061DBABase extends JPCejbDBABase
{

	/**
	 * <p>
	 * 新しいJKUejbKU0011DBABaseを作成します。
	 * </p>
	 */
	public JKUejbKU0061DBABase()
	{
		super(KU0061ETMsg.class.getName());
	}
	
	/**
	 * <p>
	 * 予約適用基準日となるカラム名を取得します。
	 * </p>
	 * @return 予約適用基準日となるカラム名
	 */
	protected String getCurrentColumn()
	{
		return null;
	}

	/**
	 * <p>
	 * 世代を管理するカラム名を取得します。
	 * </p>
	 * @return 世代を管理するカラム名
	 */
	protected String getGenerationColumn()
	{
		return null;
	}

	/**
	 * <p>
	 * 無効状態を管理するカラム名を取得します。
	 * </p>
	 * @return 無効状態を管理するカラム名
	 */
	protected String getInvalidColumn()
	{
		return KU0061ETMsg.MK_FLG;
	}

	/**
	 * <p>
	 * 予約の状態を管理するカラム名を取得します。
	 * </p>
	 * @return 予約の状態を管理するカラム名
	 */
	protected String getReserveStateColumn()
	{
		return null;
	}

	/**
	 * <p>
	 * 予約管理エンティティか判定します。
	 * </p>
	 * @return 予約管理エンティティの場合はtrue
	 */
	protected boolean isReserveMgr()
	{
		return false;
	}

	/**
	 * <p>
	 * 予約の状態を管理するエンティティか判定します。
	 * </p>
	 * @return 予約の状態を管理するエンティティの場合はtrue
	 */
	protected boolean isReserveStateMgr()
	{
		return false;
	}
	
	/**
	 * <p>
	 * プライマリキーによる存在チェックを行います。
	 * </p>
	 * @param inMsg 処理対象のメッセージキャリア
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param kojiakNo 工事案件番号
	 * @return データが存在する場合はtrue、存在しない場合はfalse
	 */
	public boolean isExistsPrimaryKey(CAANMsg inMsg,
						AgentDispatchContext inContext,
						String kojiakNo)
	{
		// 検索条件の設定
		CAANMsg msg = new CAANMsg(KU0061ETMsg.class.getName());
		msg.set(KU0061ETMsg.KOJIAK_NO, kojiakNo);

		// 検索処理の実行
		CAANMsg ret = super.findByPrimaryKey(msg);

		// 検索結果の判定
		if (ret == null)
		{
			return false;
		}

		return true;
	}

}
