/*******************************************************************************
*	 All Rights reserved,Copyright (c) K-Opticom 
********************************************************************************
*＜プログラム内容＞
*	システム名		：eo顧客基幹システム
*	モジュール名	：JSYejbKK0351KRCK
*	ソースファイル名：JSYejbKK0351KRCK.java
*	作成者			：EK944346
*	日付			：2017年04月18日
*＜機能概要＞
*	関連チェック部品です。
*＜修正履歴＞
*	バージョン	修正日		修正者		修正内容
*	ｖ1.00.00
*
********************************************************************************/

package eo.ejb.cbm.entity;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.text.ParsePosition;
import com.fujitsu.futurity.model.ejb.common.JSYejbLog;
import com.fujitsu.futurity.model.ejb.common.JSYejbConnection;
import com.fujitsu.futurity.model.ejb.common.StatusCodes;
import com.fujitsu.futurity.model.ejb.common.fw.AgentDispatchContext;
import eo.ejb.common.EventIDList;
import com.fujitsu.futurity.model.ejb.common.fw.KanrenCheckHandler;
import eo.ejb.common.JKKModelCommon;

import com.fujitsu.futurity.model.base.CAANConnectionMgr;
import com.fujitsu.futurity.model.base.CAANJDBCUtil;
import com.fujitsu.futurity.model.base.CAANMsg;
import com.fujitsu.futurity.model.base.CAANRuntimeException;

/**
 * オプションサービス契約関連チェッククラスです。
 * ＜メソッド一覧＞
 * invoke
 *	execIKK0081D042_3
 *	execIKK0081D042_9
 *	execIKK0081D045_3
 *	execIKK0081D049_3
 *	execIKK0081D050_3
 *	execIKK0081D051_3
 *	execIKK0321D017_6
 *	execIKK0341D002_9
 *	execIKK0351C001_1
 *	execIKK0351C002_1
 *	execIKK0351C004_1
 *	execIKK0351C006_1
 *	execIKK0351C010_1
 *	execIKK0351C011_1
 *	execIKK0351C012_1
 *	execIKK0351C013_1
 *	execIKK0351D003_1
 *	execIKK0351D003_2
 *	execIKK0351D003_10
 *	execIKK0351D003_14
 *	execIKK0351D005_1
 *	execIKK0351D005_2
 *	execIKK0351D007_1
 *	execIKK0351D007_2
 *	execIKK0351D007_12
 *	execIKK0351D007_13
 *	execIKK0351D007_14
 *	execIKK0351D007_15
 *	execIKK0351D007_16
 *	execIKK0351D008_1
 *	execIKK0351D008_2
 *	execIKK0351D008_12
 *	execIKK0351D012_1
 *	execIKK0351D012_2
 *	execIKK0351D012_11
 *	execIKK0351D012_12
 *	execIKK0351D012_13
 *	execIKK0351D012_14
 *	execIKK0351D012_15
 *	execIKK0351D012_16
 *	execIKK0351D012_17
 *	execIKK0351D012_18
 *	execIKK0351D012_19
 *	execIKK0351D012_20
 *	execIKK0351D012_21
 *	execIKK0351D012_22
 *	execIKK0351D012_23
 *	execIKK0351D012_24
 *	execIKK0351D012_25
 *	execIKK0351D012_26
 *	execIKK0351D012_28
 *	execIKK0351D012_29
 *	execIKK0351D012_30
 *	execIKK0351D012_31
 *	execIKK0351D012_32
 *	execIKK0351D012_33
 *	execIKK0351D012_34
 *	execIKK0351D012_35
 *	execIKK0351D012_36
 *	execIKK0351D012_37
 *	execIKK0351D012_38
 *	execIKK0351D012_39
 *	execIKK0351D012_40
 *	execIKK0351D012_41
 *	execIKK0351D012_43
 *	execIKK0351D013_1
 *	execIKK0351D013_2
 *	execIKK0351D014_1
 *	execIKK0351D014_2
 *	execIKK0351D015_1
 *	execIKK0351D015_2
 *	execIKK0351D016_1
 *	execIKK0351D016_2
 *	execIKK0351D017_1
 *	execIKK0351D017_2
 *	execIKK0351D018_1
 *	execIKK0351D018_2
 *	execIKK0351D019_1
 *	execIKK0351D019_2
 *	execIKK0351D020_1
 *	execIKK0351D020_2
 *	execIKK0351D020_4
 *	execIKK0351D020_5
 *	execIKK0351D020_6
 *	execIKK0351D020_7
 *	execIKK0351D020_8
 *	execIKK0351D020_9
 *	execIKK0351D020_10
 *	execIKK0351D020_11
 *	execIKK0351D020_12
 *	execIKK0351D020_13
 *	execIKK0351D020_14
 *	execIKK0351D020_15
 *	execIKK0351D020_22
 *	execIKK0351D021_1
 *	execIKK0351D021_2
 *	execIKK0351D022_1
 *	execIKK0351D022_2
 *	execIKK0351D023_1
 *	execIKK0351D023_2
 *	execIKK0351D023_10
 *	execIKK0351D023_12
 *	execIKK0351D026_1
 *	execIKK0351D026_2
 *	execIKK0351D027_1
 *	execIKK0351D027_2
 *	execIKK0351D028_1
 *	execIKK0351D028_2
 *	execIKK0351D029_1
 *	execIKK0351D029_2
 *	execIKK0351D030_1
 *	execIKK0351D030_2
 *	execIKK0351D031_1
 *	execIKK0351D031_2
 *	execIKK0351D032_1
 *	execIKK0351D032_2
 *	execIKK0351D032_12
 *	execIKK0351D032_14
 *	execIKK0351D033_1
 *	execIKK0351D033_2
 *	execIKK0351D034_1
 *	execIKK0351D034_2
 *	execIKK0351D035_1
 *	execIKK0351D035_2
 *	execIKK0351D036_1
 *	execIKK0351D036_2
 *	execIKK0351D037_1
 *	execIKK0351D037_2
 *	execIKK0351D040_1
 *	execIKK0351D040_2
 *	execIKK0351D042_1
 *	execIKK0351D042_2
 *	execIKK0351D043_1
 *	execIKK0351D043_2
 *	execIKK0351D043_6
 *	execIKK0351D043_7
 *	execIKK0351D044_1
 *	execIKK0351D044_2
 *	execIKK0351D045_1
 *	execIKK0351D045_2
 *	execIKK0351D046_1
 *	execIKK0351D046_2
 *	execIKK0351D047_1
 *	execIKK0351D047_2
 *	execIKK0351D048_1
 *	execIKK0351D048_2
 *	execIKK0351D049_1
 *	execIKK0351D049_2
 *	execIKK0351D050_1
 *	execIKK0351D050_2
 *	execIKK0351D051_1
 *	execIKK0351D051_2
 *	execIKK0351D052_1
 *	execIKK0351D052_2
 *	execIKK0351D053_1
 *	execIKK0351D053_2
 *	execIKK0351D053_6
 *	execIKK0351D054_1
 *	execIKK0351D054_2
 *	execIKK0351D054_5
 *	execIKK0351D056_1
 *	execIKK0351D056_2
 *	execIKK0351D057_1
 *	execIKK0351D057_2
 *	execIKK0401D002_4
 *	execIKK0401D006_4
 *	execIKK0401D020_3
 *	execIKK0481D002_6
 *	execIKK0481D005_5
 *	execIKK0961D001_4
 *	execIKK1021D001_6
 *	execIKK1041D001_5
 *	execIKK1051D001_7
 *	execIKK1071D001_7
 *	execIKK1081D001_5
 *	execIKK1091D001_10
 *	execIKK1401D001_6
 *	execIKK1551D001_6
 *	execIKK1551D001_12
 *	execIKK2421D001_3
 *	execIKK2931D001_15
 *
 */

public class JSYejbKK0351KRCK implements KanrenCheckHandler {

	/**
	 * コンストラクタ
	 */

	public JSYejbKK0351KRCK() {
	}

	/**
	 * オプションサービス契約関連チェックを行います。
	 * 
	 * @param inETMsg エンティティ
	 * @param inContext Agentから渡されたAgentDispatchContext
	 */

	public void invoke(CAANMsg inETMsg, AgentDispatchContext inContext) {

		JSYejbLog.println(JSYejbLog.DEBUG, getClass(), "call:JSYejbKK0351KRCK.invoke");

		// inETMsgのチェック
		if(inETMsg == null) {
			throw new CAANRuntimeException("inETMsgがnullです。");
		}

		// 振舞IDの取り出し
		String eventID = inETMsg.getString("eventID");
		if(eventID == null) {
			throw new CAANRuntimeException("振舞IDがnullです。");
		}

		// 処理の振り分け
		// イベントの振り分け
		if(eventID.equals(EventIDList.IKK0081D042)){
			/** サービス契約<eo光ネット>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0081D042_3(inETMsg, inContext, "ED");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0081D042_9(inETMsg, inContext, "EH");
			}

		}else if(eventID.equals(EventIDList.IKK0081D045)){
			/** サービス契約<eoADSL>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0081D045_3(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0081D049)){
			/** サービス契約<eo光TV>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0081D049_3(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0081D050)){
			/** サービス契約<eo光電話>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0081D050_3(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0081D051)){
			/** サービス契約<eoモバイル>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0081D051_3(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0321D017)){
			/** 課金先登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0321D017_6(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0341D002)){
			/** 機器提供サービス契約登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0341D002_9(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C001)){
			/** オプションサービス契約審査振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C001_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C002)){
			/** オプションサービス契約予約適用年月日入力振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C002_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C004)){
			/** オプションサービス契約料金プラン変更中止振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C004_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C006)){
			/** オプションサービス契約料金プラン変更確定振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C006_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C010)){
			/** オプションサービス契約解約手続完了振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C010_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C011)){
			/** オプションサービス契約論理削除振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C011_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C012)){
			/** オプションサービス契約論理削除（世代指定）振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C012_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351C013)){
			/** オプションサービス契約<ISP>情報変更(更新)振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351C013_1(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0351D003)){
			/** オプションサービス契約料金プラン変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D003_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D003_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D003_10(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D003_14(inETMsg, inContext, "ED");
			}

		}else if(eventID.equals(EventIDList.IKK0351D005)){
			/** オプションサービス契約<ISP>情報変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D005_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D005_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D007)){
			/** オプションサービス契約<サポート>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D007_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_12(inETMsg, inContext, "EE");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_13(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_14(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_15(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D007_16(inETMsg, inContext, "EC");
			}

		}else if(eventID.equals(EventIDList.IKK0351D008)){
			/** オプションサービス契約<TV>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D008_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D008_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D008_12(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D012)){
			/** オプションサービス契約<ISP>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D012_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_11(inETMsg, inContext, "ED");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_12(inETMsg, inContext, "EE");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_13(inETMsg, inContext, "EF");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_14(inETMsg, inContext, "EG");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_15(inETMsg, inContext, "EH");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_16(inETMsg, inContext, "EI");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_17(inETMsg, inContext, "EJ");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_18(inETMsg, inContext, "EK");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_19(inETMsg, inContext, "EL");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_20(inETMsg, inContext, "EM");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_21(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_22(inETMsg, inContext, "EN");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_23(inETMsg, inContext, "EO");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_24(inETMsg, inContext, "EP");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_25(inETMsg, inContext, "EQ");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_26(inETMsg, inContext, "ER");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_28(inETMsg, inContext, "ET");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_29(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_30(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_31(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_32(inETMsg, inContext, "WA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_33(inETMsg, inContext, "ES");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_34(inETMsg, inContext, "EU");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_35(inETMsg, inContext, "EV");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_36(inETMsg, inContext, "EW");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_37(inETMsg, inContext, "EX");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_38(inETMsg, inContext, "EY");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_39(inETMsg, inContext, "EC");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_40(inETMsg, inContext, "EZ");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_41(inETMsg, inContext, "EC");
			}

			if(Rtn <= StatusCodes.WARNING){
//				Rtn = execIKK0351D012_43(inETMsg, inContext, "EE");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D012_44(inETMsg, inContext, "EF");
			}

		}else if(eventID.equals(EventIDList.IKK0351D013)){
			/** オプションサービス契約<ISP>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D013_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D013_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D014)){
			/** オプションサービス契約サービス契約内訳変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D014_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D014_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D015)){
			/** 照査後オプションサービス契約キャンセル取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D015_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D015_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D016)){
			/** オプションサービス契約解約確定取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D016_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D016_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D017)){
			/** オプションサービス契約<ISP>照査締結振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D017_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D017_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D018)){
			/** オプションサービス契約<ISP>オーダ発行振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D018_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D018_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D019)){
			/** オプションサービス契約<TV>オーダ発行振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D019_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D019_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D020)){
			/** オプションサービス契約回復振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D020_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_4(inETMsg, inContext, "EC");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_5(inETMsg, inContext, "ED");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_6(inETMsg, inContext, "EE");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_7(inETMsg, inContext, "EF");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_8(inETMsg, inContext, "EG");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_9(inETMsg, inContext, "EI");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_10(inETMsg, inContext, "EJ");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_11(inETMsg, inContext, "EH");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_12(inETMsg, inContext, "EK");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_13(inETMsg, inContext, "EA");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_14(inETMsg, inContext, "EM");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_15(inETMsg, inContext, "EN");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D020_22(inETMsg, inContext, "EU");
			}

		}else if(eventID.equals(EventIDList.IKK0351D021)){
			/** 休止中オプションサービス契約回復振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D021_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D021_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D022)){
			/** 照査前オプションサービス契約キャンセル取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D022_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D022_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D023)){
			/** オプションサービス契約手続中料金プラン変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D023_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D023_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D023_10(inETMsg, inContext, "ED");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D023_12(inETMsg, inContext, "EA");
			}

		}else if(eventID.equals(EventIDList.IKK0351D026)){
			/** オプションサービス契約<サポート>オーダ発行振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D026_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D026_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D027)){
			/** オプションサービス契約<TV>照査締結振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D027_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D027_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D028)){
			/** オプションサービス契約<TV>情報変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D028_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D028_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D029)){
			/** オプションサービス契約キャンセル振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D029_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D029_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D030)){
			/** オプションサービス契約後続業務依頼振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D030_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D030_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D031)){
			/** オプションサービス契約<サポート>照査締結振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D031_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D031_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D032)){
			/** オプションサービス契約<電話>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D032_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D032_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D032_12(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D032_14(inETMsg, inContext, "EE");
			}

		}else if(eventID.equals(EventIDList.IKK0351D033)){
			/** オプションサービス契約<ISP>照査振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D033_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D033_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D034)){
			/** オプションサービス契約<電話>照査振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D034_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D034_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D035)){
			/** オプションサービス契約<TV>照査振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D035_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D035_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D036)){
			/** オプションサービス契約<サポート>照査振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D036_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D036_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D037)){
			/** ISPオプションパスワード変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D037_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D037_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D040)){
			/** オプションサービス契約<電話>照査締結振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D040_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D040_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D042)){
			/** オプションサービス契約停止振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D042_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D042_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D043)){
			/** オプションサービス契約解約取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D043_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D043_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D043_6(inETMsg, inContext, "EC");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D043_7(inETMsg, inContext, "ED");
			}

		}else if(eventID.equals(EventIDList.IKK0351D044)){
			/** オプションサービス契約<サポート>情報変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D044_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D044_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D045)){
			/** オプションサービス契約停止解除振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D045_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D045_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D046)){
			/** オプションサービス契約<サポート>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D046_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D046_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D047)){
			/** オプションサービス契約<電話>オーダ発行振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D047_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D047_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D048)){
			/** オプションサービス契約<電話>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D048_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D048_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D049)){
			/** オプションサービス契約<TV>照査取消振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D049_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D049_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D050)){
			/** オプションサービス契約<ISP>締結振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D050_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D050_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D051)){
			/** 有効SYSID変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D051_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D051_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D052)){
			/** オプションサービス契約<電話>情報変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D052_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D052_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D053)){
			/** POPパスワード再振出振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D053_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D053_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D053_6(inETMsg, inContext, "ED");
			}

		}else if(eventID.equals(EventIDList.IKK0351D054)){
			/** WEBIDパスワード再振出振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D054_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D054_2(inETMsg, inContext, "EB");
			}

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D054_5(inETMsg, inContext, "ED");
			}

		}else if(eventID.equals(EventIDList.IKK0351D056)){
			/** オプションサービス契約<TV>課金開始日変更振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D056_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D056_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0351D057)){
			/** 休止中オプションサービス契約停止解除振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0351D057_1(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK0351D057_2(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK0401D002)){
			/** サブオプションサービス契約<ISP>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0401D002_4(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0401D006)){
			/** サブオプションサービス契約<TV>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0401D006_4(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0401D020)){
			/** サブオプションサービス契約<電話>登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0401D020_3(inETMsg, inContext, "ED");

		}else if(eventID.equals(EventIDList.IKK0481D002)){
			/** 割引サービス対象契約登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0481D002_6(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0481D005)){
			/** 割引サービス契約登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0481D005_5(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK0961D001)){
			/** 利用停止期間登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK0961D001_4(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1021D001)){
			/** 一時金設定登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1021D001_6(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1041D001)){
			/** オーダ設定登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1041D001_5(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1051D001)){
			/** 契約一時金登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1051D001_7(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1071D001)){
			/** 審査登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1071D001_7(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1081D001)){
			/** オーダ発行条件登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1081D001_5(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1091D001)){
			/** 進捗登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1091D001_10(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1401D001)){
			/** データ抽出項目設定対象契約登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1401D001_6(inETMsg, inContext, "EA");

		}else if(eventID.equals(EventIDList.IKK1551D001)){
			/** オーダ情報作成ワーク登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK1551D001_6(inETMsg, inContext, "EA");

			if(Rtn <= StatusCodes.WARNING){
				Rtn = execIKK1551D001_12(inETMsg, inContext, "EB");
			}

		}else if(eventID.equals(EventIDList.IKK2421D001)){
			/** フェムトセル異動通知登録振舞内部 */
			int Rtn = 0;
			Rtn = execIKK2421D001_3(inETMsg, inContext, "EB");

		}else if(eventID.equals(EventIDList.IKK2931D001)){
			/** 申込時登録不可契約予約振舞内部 */
			int Rtn = 0;
			Rtn = execIKK2931D001_15(inETMsg, inContext, "EA");

		}

		JSYejbLog.println(JSYejbLog.DEBUG, getClass(), "end:JSYejbKK0351KRCK.invoke");

	}

	/**
	 * IKK0081D042_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D042_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkOpHktgiKK0081(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0081D042_制約ＮＯ9チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D042_9(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkSonzaiFemtOpKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0081D045_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D045_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkOpHktgiKK0081(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0081D049_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D049_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkOpHktgiKK0081(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0081D050_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D050_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkOpHktgiKK0081(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0081D051_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0081D051_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0081ETMsg.SVC_KEI_NO);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0081ETMsg.SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isChkOpHktgiKK0081(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0081ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0081ETMsg.STATUS)) {
			inETMsg.set(KK0081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0321D017_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0321ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0321D017_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0321ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0321ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0321ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0321ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0321ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0321ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0321ETMsg.STATUS)) {
			inETMsg.set(KK0321ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0341D002_制約ＮＯ9チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0341ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0341D002_9(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0341ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0341ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0341ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0341ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0341ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0341ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0341ETMsg.STATUS)) {
			inETMsg.set(KK0341ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C001_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C001_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C002_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C002_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C004_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C004_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C006_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C006_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C010_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C010_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C011_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C011_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C012_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C012_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351C013_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351C013_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D003_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D003_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D003_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D003_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D003_制約ＮＯ10チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D003_10(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B020";

			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isConPremonPlanZumiKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.PLAN_STAYMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D003_制約ＮＯ14チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D003_14(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.PCRS_CD) && !inETMsg.isNull(KK0351ETMsg.PPLAN_CD)) { 
			// 判定条件
			if(JKKModelCommon.isPcrsPplanSameCheckKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.PCRS_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D005_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D005_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D005_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D005_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append(joken_1);

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B021";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ13チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_13(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if ((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) { 
			// 判定条件
			if(JKKModelCommon.isSvcTagYmdFutureChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ14チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_14(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcRsvValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ15チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_15(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.RSV_TSTA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.RSV_TSTA_KIBO_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.RSV_TSTA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcRsvValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.RSV_TSTA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D007_制約ＮＯ16チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D007_16(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && !inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isTagYmdFtrShosaTiktChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D008_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D008_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D008_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D008_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append(joken_1);

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D008_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D008_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken7_2 = "B068";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_KEI_NO);
			}

			Object joken_1_prm_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_2 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && !inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)) && joken7_1.compareTo(joken7_2) != 0) { 
			// 判定条件
			if(JKKModelCommon.isNotExistOpSvcKeiTvKK0351(inETMsg, inContext, joken_1_prm_1, joken_1_prm_2 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append(joken_1);

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ11チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_11(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B001";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B003";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ13チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_13(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B016";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ14チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_14(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B020";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ15チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_15(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00009";

			String joken8_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken8_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken8_2 = "00019";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) != 0) && joken8_1.compareTo(joken8_2) != 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ16チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_16(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B015";

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isAddRsvSvcKeiNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ17チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_17(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B015";

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isExistKeiKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ18チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_18(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B015";

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isDslRsvSvcKeiNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ19チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_19(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B004";

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isDslRsvSvcKeiNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ20チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_20(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B004";

			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isAddRsvSvcKeiNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ21チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_21(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B004";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			// チェック条件
			if ((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isKojiStatusKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ22チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_22(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6AddChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ23チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_23(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ24チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_24(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6AddKitenChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ25チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_25(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6AddKitenCentChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ26チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_26(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6AddShuyakCentChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ28チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_28(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotExistKoujiNotFin2Op(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ29チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_29(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if ((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) { 
			// 判定条件
			if(JKKModelCommon.isSvcTagYmdFutureChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ30チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_30(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcRsvValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ31チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_31(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.RSV_TSTA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.RSV_TSTA_KIBO_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.RSV_TSTA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcRsvValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.RSV_TSTA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ32チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_32(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken2_2 = "B070";

			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken3_2 = "01";

			String joken5_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken5_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken5_2 = "03";

			// 制約部品引数定義
			// チェック条件
			if (((joken3_1.compareTo(joken3_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken5_1.compareTo(joken5_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken2_1.compareTo(joken2_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isKitenSyuyakuMatchKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ33チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_33(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6RouteKikiChkKK0341(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ34チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_34(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B077";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ35チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_35(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B015";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B004";

			// チェック条件
			if (((joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO)) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isAddRsvSvcKeiUcwkNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ36チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_36(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B015";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B004";

			// チェック条件
			if (((joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO)) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isDslRsvSvcKeiUcwkNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ37チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_37(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B015";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B015";

			// チェック条件
			if (((joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO)) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isAddRsvSvcKeiUcwkNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ38チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_38(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B015";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00031";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B015";

			// チェック条件
			if (((joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO)) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isDslRsvSvcKeiUcwkNoKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ39チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_39(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && !inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isTagYmdFtrShosaTiktChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ40チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_40(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B015";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken7_2 = "00009";

			String joken8_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.IDO_DIV)){
				joken8_1 = inETMsg.getObject(KK0351ETMsg.IDO_DIV).toString();
			}

			String joken8_2 = "00019";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) && joken7_1.compareTo(joken7_2) != 0) && joken8_1.compareTo(joken8_2) != 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ41チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_41(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6RouteKikiOpChkKK0341(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ43チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_43(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B130";

			String joken7_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken7_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken7_2 = "B131";

			String joken8_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken8_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken8_2 = "B132";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && ((joken6_1.compareTo(joken6_2) == 0 || joken7_1.compareTo(joken7_2) == 0) || joken8_1.compareTo(joken8_2) == 0)) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.PCRS_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D012_制約ＮＯ44チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D012_44(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			String joken6_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken6_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken6_2 = "B138";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && joken6_1.compareTo(joken6_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.PCRS_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D013_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D013_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D013_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D013_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D014_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D014_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D014_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D014_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D015_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D015_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D015_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D015_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D016_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D016_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D016_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D016_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D017_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D017_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D017_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D017_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D018_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D018_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D018_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D018_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D019_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D019_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D019_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D019_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ4チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_4(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B016";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B016";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ5チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_5(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B021";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B021";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B070";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B070";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ7チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_7(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isIPv6RouteKikiChkKK0341(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ8チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_8(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B070";

			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isCentCdMatchKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ9チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_9(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B020";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B020";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ10チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_10(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B003";

			// 制約部品引数定義
			Object joken_1_prm_1 = "B003";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ11チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_11(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isCheckDlreCdCurrentKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B075";

			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOpFmtKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ13チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_13(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.KAIHK_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.KAIHK_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.KAIHK_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcKaihkValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.KAIHK_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ14チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_14(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(!(JKKModelCommon.isChkSameOpSonzaiKihkKK0351(inETMsg, inContext ) == false)){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ15チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_15(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isMyHPOpKaihkKhChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D020_制約ＮＯ22チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D020_22(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B015";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isNotOverLimitOp(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D021_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D021_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D021_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D021_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D022_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D022_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D022_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D022_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D023_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D023_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D023_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D023_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D023_制約ＮＯ10チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D023_10(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.PCRS_CD) && !inETMsg.isNull(KK0351ETMsg.PPLAN_CD)) { 
			// 判定条件
			if(JKKModelCommon.isPcrsPplanSameCheckKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.PCRS_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D023_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D023_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD)){
				joken3_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_CD).toString();
			}

			String joken3_2 = "B020";

			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && joken3_1.compareTo(joken3_2) == 0) { 
			// 判定条件
			if(JKKModelCommon.isConPremonPlanZumiKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.PLAN_STAYMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D026_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D026_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D026_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D026_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D027_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D027_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D027_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D027_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D028_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D028_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D028_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D028_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D029_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D029_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D029_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D029_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D030_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D030_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D030_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D030_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D031_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D031_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D031_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D031_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D032_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D032_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D032_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D032_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append(joken_1);

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D032_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D032_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			String joken2_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken2_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken2_2 = "01";

			String joken4_1 = new String();
			if(!inETMsg.isNull(KK0351ETMsg.OYA_KEI_SKBT_CD)){
				joken4_1 = inETMsg.getObject(KK0351ETMsg.OYA_KEI_SKBT_CD).toString();
			}

			String joken4_2 = "03";

			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_USE_STA_KIBO_YMD);
			}

			// チェック条件
			if (((joken2_1.compareTo(joken2_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_NO)) || (joken4_1.compareTo(joken4_2) == 0 && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO))) && !inETMsg.isNull(KK0351ETMsg.SVC_USE_STA_KIBO_YMD)) { 
			// 判定条件
			if(JKKModelCommon.isTagYmdFtrShosaTiktChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.SVC_USE_STA_KIBO_YMD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D032_制約ＮＯ14チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D032_14(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_CD) && !inETMsg.isNull(KK0351ETMsg.SVC_KEI_UCWK_NO)) { 
			// 判定条件
			if(!(JKKModelCommon.isChkSameOpSonzaiKK0351(inETMsg, inContext ) == false)){
					inETMsg.set(KK0351ETMsg.OP_SVC_CD_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D033_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D033_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D033_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D033_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D034_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D034_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D034_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D034_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D035_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D035_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D035_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D035_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D036_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D036_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D036_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D036_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D037_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D037_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D037_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D037_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D040_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D040_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D040_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D040_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D042_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D042_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D042_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D042_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D043_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D043_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D043_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D043_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D043_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D043_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.SVC_DSL_CL_YMD)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.SVC_DSL_CL_YMD);
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcKaihkValidChkKK0351(inETMsg, inContext, joken_1_prm_1 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D043_制約ＮＯ7チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D043_7(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isMyHPOpKaihkKhChkKK0351(inETMsg, inContext ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D044_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D044_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D044_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D044_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D045_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D045_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D045_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D045_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D046_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D046_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D046_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D046_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D047_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D047_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D047_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D047_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D048_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D048_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D048_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D048_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D049_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D049_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D049_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D049_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D050_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D050_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D050_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D050_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D051_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D051_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D051_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D051_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D052_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D052_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D052_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D052_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D053_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D053_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D053_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D053_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D053_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D053_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO);
			}

			Object joken_1_prm_2 = "B001";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcCdChkKK0351(inETMsg, inContext, joken_1_prm_1, joken_1_prm_2 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D054_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D054_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D054_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D054_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D054_制約ＮＯ5チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D054_5(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

			// チェック条件定数
			// 制約部品引数定義
			Object joken_1_prm_1 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken_1_prm_1 = inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO);
			}

			Object joken_1_prm_2 = "B002";

			Object joken_1_prm_3 = "B005";

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 
			// 判定条件
			if(JKKModelCommon.isOpSvcCdChkTaisho2KK0351(inETMsg, inContext, joken_1_prm_1, joken_1_prm_2, joken_1_prm_3 ) == false){
					inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
					if("W".equals(errFlag.substring(0,1))){
						rtn = StatusCodes.WARNING;
					} else {
						rtn = StatusCodes.RELATION_ERR;
					}
				}
			}

		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D056_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D056_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D056_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D056_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D057_制約ＮＯ1チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D057_1(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0351D057_制約ＮＯ2チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0351ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0351D057_2(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0351ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)){
				joken2_2 = new String(inETMsg.getObject(KK0351ETMsg.GENE_ADD_DTM).toString());
			}

			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0351ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK0351ETMsg.GENE_ADD_DTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(rsltQuery.getLong("CNT")>0){
						inETMsg.set(KK0351ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0351ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0351ETMsg.STATUS)) {
			inETMsg.set(KK0351ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0401D002_制約ＮＯ4チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0401ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0401D002_4(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0401ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0401ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0401ETMsg.STATUS)) {
			inETMsg.set(KK0401ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0401D006_制約ＮＯ4チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0401ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0401D006_4(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0401ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0401ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0401ETMsg.STATUS)) {
			inETMsg.set(KK0401ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0401D020_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0401ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0401D020_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0401ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0401ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0401ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0401ETMsg.STATUS)) {
			inETMsg.set(KK0401ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0481D002_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0481ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0481D002_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0481ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0481ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0481ETMsg.OP_SVC_KEI_NO) && inETMsg.isNull(KK0481ETMsg.SBOP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0481ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0481ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0481ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0481ETMsg.STATUS)) {
			inETMsg.set(KK0481ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0481D005_制約ＮＯ5チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0481ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0481D005_5(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0481ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0481ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0481ETMsg.OP_SVC_KEI_NO) && inETMsg.isNull(KK0481ETMsg.SBOP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0481ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0481ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0481ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0481ETMsg.STATUS)) {
			inETMsg.set(KK0481ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK0961D001_制約ＮＯ4チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK0961ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK0961D001_4(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK0961ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK0961ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK0961ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK0961ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK0961ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK0961ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK0961ETMsg.STATUS)) {
			inETMsg.set(KK0961ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1021D001_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1021ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1021D001_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1021ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1021ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1021ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1021ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1021ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1021ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1021ETMsg.STATUS)) {
			inETMsg.set(KK1021ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1041D001_制約ＮＯ5チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1041ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1041D001_5(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1041ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1041ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1041ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1041ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1041ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1041ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1041ETMsg.STATUS)) {
			inETMsg.set(KK1041ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1051D001_制約ＮＯ7チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1051ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1051D001_7(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1051ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1051ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1051ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1051ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1051ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1051ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1051ETMsg.STATUS)) {
			inETMsg.set(KK1051ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1071D001_制約ＮＯ7チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1071ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1071D001_7(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1071ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1071ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1071ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1071ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1071ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1071ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1071ETMsg.STATUS)) {
			inETMsg.set(KK1071ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1081D001_制約ＮＯ5チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1081ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1081D001_5(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1081ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1081ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1081ETMsg.OP_SVC_KEI_NO) && inETMsg.isNull(KK1081ETMsg.SBOP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1081ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1081ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1081ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1081ETMsg.STATUS)) {
			inETMsg.set(KK1081ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1091D001_制約ＮＯ10チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1091ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1091D001_10(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1091ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1091ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1091ETMsg.OP_SVC_KEI_NO) && inETMsg.isNull(KK1091ETMsg.SBOP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1091ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1091ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1091ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1091ETMsg.STATUS)) {
			inETMsg.set(KK1091ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1401D001_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1401ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1401D001_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1401ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1401ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1401ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1401ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1401ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1401ETMsg.STATUS)) {
			inETMsg.set(KK1401ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1551D001_制約ＮＯ6チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1551ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1551D001_6(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1551ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1551ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK1551ETMsg.OPSVKEI_GADTM)){
				joken2_2 = new String(inETMsg.getObject(KK1551ETMsg.OPSVKEI_GADTM).toString());
			}

			String joken5_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_5 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken5_2 == null){
				joken_5 += " IS NULL ";
			}else{
				joken_5 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1551ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK1551ETMsg.OPSVKEI_GADTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_5 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken5_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken5_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1551ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1551ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1551ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1551ETMsg.STATUS)) {
			inETMsg.set(KK1551ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK1551D001_制約ＮＯ12チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK1551ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK1551D001_12(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK1551ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK1551ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = null;
			if(!inETMsg.isNull(KK1551ETMsg.CHBF_OPSVKEI_GADTM)){
				joken2_2 = new String(inETMsg.getObject(KK1551ETMsg.CHBF_OPSVKEI_GADTM).toString());
			}

			String joken3_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.GENE_ADD_DTM);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			String joken_3 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken3_2 == null){
				joken_3 += " IS NULL ";
			}else{
				joken_3 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK1551ETMsg.OP_SVC_KEI_NO) && !inETMsg.isNull(KK1551ETMsg.CHBF_OPSVKEI_GADTM)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + "(" + joken_1 + " AND " + joken_2 + " ) " + " AND " + joken_3 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}
				if(joken3_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken3_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK1551ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK1551ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK1551ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK1551ETMsg.STATUS)) {
			inETMsg.set(KK1551ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK2421D001_制約ＮＯ3チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK2421ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK2421D001_3(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK2421ETMsg.OP_SVC_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK2421ETMsg.OP_SVC_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (!inETMsg.isNull(KK2421ETMsg.OP_SVC_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK2421ETMsg.OP_SVC_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK2421ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK2421ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK2421ETMsg.STATUS)) {
			inETMsg.set(KK2421ETMsg.STATUS, rtn);
		}

		return rtn;

	}

	/**
	 * IKK2931D001_制約ＮＯ15チェック
	 *
	 * @param inETMsg チェック対象のETMsg(KK2931ETMsg)
	 * @param inContext Agentから渡されたAgentDispatchContext
	 * @param errFlag ERRフラグ
	 * @return int チェック結果
	 */
	private int execIKK2931D001_15(CAANMsg inETMsg, AgentDispatchContext inContext, String errFlag){

		// ステータス
		int rtn = 0;

		Connection con = JSYejbConnection.getConnection(KK0351ETMsg.getTableName());

		PreparedStatement pstmtQuery = null;
		ResultSet rsltQuery = null;
		StringBuffer sqlQuery = new StringBuffer();

		try{

			// チェック条件定数
			String joken3_1 = new String();
			if(!inETMsg.isNull(KK2931ETMsg.SETE_TG_KEI_SKBT_CD)){
				joken3_1 = inETMsg.getObject(KK2931ETMsg.SETE_TG_KEI_SKBT_CD).toString();
			}

			String joken3_2 = "04";

			// ＳＱＬ引数定義
			String joken1_2 = null;
			if(!inETMsg.isNull(KK2931ETMsg.SETE_TG_KEI_NO)){
				joken1_2 = new String(inETMsg.getObject(KK2931ETMsg.SETE_TG_KEI_NO).toString());
			}

			String joken2_2 = "0";
			// 条件文定義
			String joken_1 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.OP_SVC_KEI_NO);
			if(joken1_2 == null){
				joken_1 += " IS NULL ";
			}else{
				joken_1 += " = ? ";
			}

			String joken_2 = KK0351ETMsg.getDBColumnName(KK0351ETMsg.MK_FLG);
			if(joken2_2 == null){
				joken_2 += " IS NULL ";
			}else{
				joken_2 += " = ? ";
			}

			// チェック条件
			if (joken3_1.compareTo(joken3_2) == 0 && !inETMsg.isNull(KK2931ETMsg.SETE_TG_KEI_NO)) { 

				// ＳＱＬ文の組み立て
				sqlQuery.append("SELECT COUNT(*) CNT FROM ").append(KK0351ETMsg.getTableName()).append(" WHERE ")
					.append("(" + joken_1 + " AND " + joken_2 + " ) ");

				// ＳＱＬ文の解析
				pstmtQuery = con.prepareStatement(sqlQuery.toString());

				// パラメータの設定
				int para_idx = 1;
				if(joken1_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken1_2);
				}
				if(joken2_2 != null){
					CAANJDBCUtil.setParam(pstmtQuery, para_idx++ , joken2_2);
				}

				// ＳＱＬ文の実行
				rsltQuery = pstmtQuery.executeQuery();

				if(rsltQuery.next()){
				// 判定条件
					if(!(rsltQuery.getLong("CNT")>0)){
						inETMsg.set(KK2931ETMsg.SETE_TG_KEI_NO_ERR, errFlag);
						if("W".equals(errFlag.substring(0,1))){
							rtn = StatusCodes.WARNING;
						} else {
							rtn = StatusCodes.RELATION_ERR;
						}
					}
				}

			}

		} catch(SQLException e) {
			inETMsg.set(KK2931ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
			throw new CAANRuntimeException(e);
		} finally {
			// このメソッドで確保した資源の解放
			try {
				if(rsltQuery != null) {
					rsltQuery.close();
				}
				if(pstmtQuery != null) {
					pstmtQuery.close();
				}
				if(con != null) {
					CAANConnectionMgr.getInstance().close(con);
				}
			} catch(SQLException e) {
				inETMsg.set(KK2931ETMsg.STATUS, StatusCodes.FIND_DB_ERR);
				throw new CAANRuntimeException(e);
			}
		}
		
		// ステータスのセット
		if (rtn > inETMsg.getInt(KK2931ETMsg.STATUS)) {
			inETMsg.set(KK2931ETMsg.STATUS, rtn);
		}

		return rtn;

	}

}

