/*
 * MosP - Mind Open Source Project    http://www.mosp.jp/
 * Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
/**
 * 
 */
package jp.mosp.mospcommon.system.vo;

import javax.servlet.http.HttpServletRequest;

import jp.mosp.common.CommonConst;
import jp.mosp.common.MosPMenuConst;
import jp.mosp.common.MosPVo;
import jp.mosp.common.common.MospException;
import jp.mosp.common.utils.NumberUtil;
import jp.mosp.common.utils.TimeUtil;
import jp.mosp.mospcommon.system.dto.CmLimitStandardDto;

/**
 * @author nakamura
 *
 */
public class LimitStandardMasterCardVo extends MosPVo {
	
	private static final long	serialVersionUID				= -2692577633142378846L;
	
	// 定数
	/**
	 * 新規登録モード
	 */
	public static final int		MODE_INSERT						= 0;
	
	/**
	 * 更新モード
	 */
	public static final int		MODE_UPDATE						= 1;
	
	// パラメータ名
	/**
	 * 限度基準コード
	 */
	public static final String	PRM_TXT_LCODE					= "txtLCode";
	
	/**
	 * 限度基準名称
	 */
	public static final String	PRM_TXT_LNAME					= "txtLName";
	
	/**
	 * 期間の種類
	 */
	public static final String	PRM_PLT_TERM_TYPE				= "pltTermType";
	
	/**
	 * 所定労働時間(時)
	 */
	public static final String	PRM_TXT_PRESCRIBED_TIME_HOUR	= "txtPrescribedTimeHour";
	
	/**
	 * 所定労働時間(分)
	 */
	public static final String	PRM_TXT_PRESCRIBED_TIME_MIN		= "txtPrescribedTimeMin";
	
	/**
	 * 1日の警告時間(時)
	 */
	public static final String	PRM_TXT_CAUTION_DAY_HOUR		= "txtCautionDayHour";
	
	/**
	 * 1日の警告時間(分)
	 */
	public static final String	PRM_TXT_CAUTION_DAY_MIN			= "txtCautionDayMin";
	
	/**
	 * 指定期間の警告時間(時)
	 */
	public static final String	PRM_TXT_CAUTION_TERM_HOUR		= "txtCautionTermHour";
	
	/**
	 * 指定期間の警告時間(分)
	 */
	public static final String	PRM_TXT_CAUTION_TERM_MIN		= "txtCautionTermMin";
	
	/**
	 * 1年の警告時間(時)
	 */
	public static final String	PRM_TXT_CAUTION_YEAR_HOUR		= "txtCautionYearHour";
	
	/**
	 * 1年の警告時間(分)
	 */
	public static final String	PRM_TXT_CAUTION_YEAR_MIN		= "txtCautionYearMin";
	
	/**
	 * 1日の限度時間(時)
	 */
	public static final String	PRM_TXT_LIMIT_DAY_HOUR			= "txtLimitDayHour";
	
	/**
	 * 1日の限度時間(分)
	 */
	public static final String	PRM_TXT_LIMIT_DAY_MIN			= "txtLimitDayMin";
	
	/**
	 * 指定期間の限度時間(時)
	 */
	public static final String	PRM_TXT_LIMIT_TERM_HOUR			= "txtLimitTermHour";
	
	/**
	 * 指定期間の限度時間(分)
	 */
	public static final String	PRM_TXT_LIMIT_TERM_MIN			= "txtLimitTermMin";
	
	/**
	 * 1年の限度時間(時)
	 */
	public static final String	PRM_TXT_LIMIT_YEAR_HOUR			= "txtLimitYearHour";
	
	/**
	 * 1年の限度時間(分)
	 */
	public static final String	PRM_TXT_LIMIT_YEAR_MIN			= "txtLimitYearMin";
	
	/**
	 * 指定期間の割増率
	 */
	public static final String	PRM_TXT_RATE_TERM				= "txtRateTerm";
	
	/**
	 * 1年の割増率
	 */
	public static final String	PRM_TXT_RATE_YEAR				= "txtRateYear";
	
	/**
	 * 削除フラグ
	 */
	public static final String	PRM_PLT_DELETE_FLAG				= "txtDeleteFlag";
	
	// フィールド
	private String				txtLCode;
	private String				txtLName;
	private String				pltTermType;
	private String				txtPrescribedTimeHour;
	private String				txtPrescribedTimeMin;
	private String				txtCautionDayHour;
	private String				txtCautionDayMin;
	private String				txtCautionTermHour;
	private String				txtCautionTermMin;
	private String				txtCautionYearHour;
	private String				txtCautionYearMin;
	private String				txtLimitDayHour;
	private String				txtLimitDayMin;
	private String				txtLimitTermHour;
	private String				txtLimitTermMin;
	private String				txtLimitYearHour;
	private String				txtLimitYearMin;
	private String				txtRateTerm;
	private String				txtRateYear;
	private String				pltDeleteFlag;
	
	// プルダウンリスト
	/**
	 * 期間の種類
	 */
	public String[][]			aryPltTermType;
	
	// モード(0：新規登録、1：更新)
	private int					mode;
	
	// フィールド名及び制限
	/**
	 * 限度基準コード
	 */
	public String				NAM_LCODE;
	
	/**
	 * 限度基準名称
	 */
	public String				NAM_LNAME;
	
	/**
	 * 期間の種類
	 */
	public String				NAM_TERM_TYPE;
	
	/**
	 * 所定労働時間
	 */
	public String				NAM_PRESCRIBED_TIME;
	
	/**
	 * 所定労働時間(時)
	 */
	public String				NAM_PRESCRIBED_TIME_HOUR;
	
	/**
	 * 所定労働時間(分)
	 */
	public String				NAM_PRESCRIBED_TIME_MIN;
	
	/**
	 * 1日の警告時間
	 */
	public String				NAM_CAUTION_DAY;
	
	/**
	 * 1日の警告時間(時)
	 */
	public String				NAM_CAUTION_DAY_HOUR;
	
	/**
	 * 1日の警告時間(分)
	 */
	public String				NAM_CAUTION_DAY_MIN;
	
	/**
	 * 指定期間の警告時間
	 */
	public String				NAM_CAUTION_TERM;
	
	/**
	 * 指定期間の警告時間(時)
	 */
	public String				NAM_CAUTION_TERM_HOUR;
	
	/**
	 * 指定期間の警告時間(分)
	 */
	public String				NAM_CAUTION_TERM_MIN;
	
	/**
	 * 1年の警告時間
	 */
	public String				NAM_CAUTION_YEAR;
	
	/**
	 * 1年の警告時間(時)
	 */
	public String				NAM_CAUTION_YEAR_HOUR;
	
	/**
	 * 1年の警告時間(分)
	 */
	public String				NAM_CAUTION_YEAR_MIN;
	
	/**
	 * 1日の限度時間
	 */
	public String				NAM_LIMIT_DAY;
	
	/**
	 * 1日の限度時間(時)
	 */
	public String				NAM_LIMIT_DAY_HOUR;
	
	/**
	 * 1日の限度時間(分)
	 */
	public String				NAM_LIMIT_DAY_MIN;
	
	/**
	 * 指定期間の限度時間
	 */
	public String				NAM_LIMIT_TERM;
	
	/**
	 * 指定期間の限度時間(時)
	 */
	public String				NAM_LIMIT_TERM_HOUR;
	
	/**
	 * 指定期間の限度時間(分)
	 */
	public String				NAM_LIMIT_TERM_MIN;
	
	/**
	 * 1年の限度時間
	 */
	public String				NAM_LIMIT_YEAR;
	
	/**
	 * 1年の限度時間(時)
	 */
	public String				NAM_LIMIT_YEAR_HOUR;
	
	/**
	 * 1年の限度時間(分)
	 */
	public String				NAM_LIMIT_YEAR_MIN;
	
	/**
	 * 指定期間の割増率
	 */
	public String				NAM_RATE_TERM;
	
	/**
	 * 1年の割増率
	 */
	public String				NAM_RATE_YEAR;
	
	/**
	 * 削除フラグ
	 */
	public String				NAM_DELETE_FLAG;
	
	/**
	 * 一日
	 */
	public String				LBL_ONE_DAY;
	
	/**
	 * 指定期間
	 */
	public String				LBL_SPECIFIED_PERIOD;
	
	/**
	 * 一年
	 */
	public String				LBL_ONE_YEAR;
	
	/**
	 * 警告時間
	 */
	public String				LBL_CAUTION_TIME;
	
	/**
	 * 限度時間
	 */
	public String				LBL_LIMIT_TIME;
	
	/**
	 * 割増率
	 */
	public String				LBL_RATE;
	
	/**
	 * 限度基準コード
	 */
	public int					LEN_LCODE;
	
	/**
	 * 限度基準名称
	 */
	public int					LEN_LNAME;
	
	/**
	 * 所定労働時間(時)
	 */
	public int					LEN_PRESCRIBED_TIME_HOUR;
	
	/**
	 * 所定労働時間(分)
	 */
	public int					LEN_PRESCRIBED_TIME_MIN;
	
	/**
	 * 1日の警告時間(時)
	 */
	public int					LEN_CAUTION_DAY_HOUR;
	
	/**
	 * 1日の警告時間(分)
	 */
	public int					LEN_CAUTION_DAY_MIN;
	
	/**
	 * 指定期間の警告時間(時)
	 */
	public int					LEN_CAUTION_TERM_HOUR;
	
	/**
	 * 指定期間の警告時間(分)
	 */
	public int					LEN_CAUTION_TERM_MIN;
	
	/**
	 * 1年の警告時間(時)
	 */
	public int					LEN_CAUTION_YEAR_HOUR;
	
	/**
	 * 1年の警告時間(分)
	 */
	public int					LEN_CAUTION_YEAR_MIN;
	
	/**
	 * 1日の限度時間(時)
	 */
	public int					LEN_LIMIT_DAY_HOUR;
	
	/**
	 * 1日の限度時間(分)
	 */
	public int					LEN_LIMIT_DAY_MIN;
	
	/**
	 * 指定期間の限度時間(時)
	 */
	public int					LEN_LIMIT_TERM_HOUR;
	
	/**
	 * 指定期間の限度時間(分)
	 */
	public int					LEN_LIMIT_TERM_MIN;
	
	/**
	 * 1年の限度時間(時)
	 */
	public int					LEN_LIMIT_YEAR_HOUR;
	
	/**
	 * 1年の限度時間(分)
	 */
	public int					LEN_LIMIT_YEAR_MIN;
	
	/**
	 * 指定期間の割増率
	 */
	public int					LEN_RATE_TERM;
	
	/**
	 * 1年の割増率
	 */
	public int					LEN_RATE_YEAR;
	

	/**
	 * コンストラクター
	 */
	public LimitStandardMasterCardVo() {
		super();
		mode = 0;
		setViewPath(getClassName());
	}
	
	@Override
	protected void setSubTitle() {
		subTitle = CommonConst.TTL_LIMIT_STANDARD;
		createAryMenu(CMD_MENU_SYSTEM2, MosPMenuConst.getMenuLaborAgreement());
	}
	
	@Override
	protected void setFieldsName() {
		NAM_LCODE = CommonConst.NAM_LIMIT_STANDARD + CommonConst.NAM_COMMON_CODE;
		NAM_LNAME = CommonConst.NAM_LIMIT_STANDARD + CommonConst.NAM_COMMON_MEISYO;
		NAM_TERM_TYPE = CommonConst.NAM_ACCOUNTING_PERIOD + CommonConst.MSG_OF + CommonConst.NAM_TYPE;
		NAM_PRESCRIBED_TIME = CommonConst.NAM_STATUTORY_HOUR;
		NAM_PRESCRIBED_TIME_HOUR = CommonConst.NAM_STATUTORY_HOUR + CommonConst.MSG_HOUR;
		NAM_PRESCRIBED_TIME_MIN = CommonConst.NAM_STATUTORY_HOUR + CommonConst.MSG_MINUTES;
		NAM_CAUTION_DAY = NumberUtil.NAM_ONE + CommonConst.NAM_DAY + CommonConst.MSG_OF + CommonConst.NAM_CAUTION_TIME;
		NAM_CAUTION_DAY_HOUR = NAM_CAUTION_DAY + CommonConst.MSG_HOUR;
		NAM_CAUTION_DAY_MIN = NAM_CAUTION_DAY + CommonConst.MSG_MINUTES;
		NAM_CAUTION_TERM = CommonConst.NAM_SPECIFIED_PERIOD + CommonConst.MSG_OF + CommonConst.NAM_CAUTION_TIME;
		NAM_CAUTION_TERM_HOUR = NAM_CAUTION_TERM + CommonConst.MSG_HOUR;
		NAM_CAUTION_TERM_MIN = NAM_CAUTION_TERM + CommonConst.MSG_MINUTES;
		NAM_CAUTION_YEAR = NumberUtil.NAM_ONE + CommonConst.NAM_YEAR + CommonConst.MSG_OF
				+ CommonConst.NAM_CAUTION_TIME;
		NAM_CAUTION_YEAR_HOUR = NAM_CAUTION_YEAR + CommonConst.MSG_HOUR;
		NAM_CAUTION_YEAR_MIN = NAM_CAUTION_YEAR + CommonConst.MSG_MINUTES;
		NAM_LIMIT_DAY = NumberUtil.NAM_ONE + CommonConst.NAM_DAY + CommonConst.MSG_OF + CommonConst.NAM_LIMIT_TIME;
		NAM_LIMIT_DAY_HOUR = NAM_LIMIT_DAY + CommonConst.MSG_HOUR;
		NAM_LIMIT_DAY_MIN = NAM_LIMIT_DAY + CommonConst.MSG_MINUTES;
		NAM_LIMIT_TERM = CommonConst.NAM_SPECIFIED_PERIOD + CommonConst.MSG_OF + CommonConst.NAM_LIMIT_TIME;
		NAM_LIMIT_TERM_HOUR = NAM_LIMIT_TERM + CommonConst.MSG_HOUR;
		NAM_LIMIT_TERM_MIN = NAM_LIMIT_TERM + CommonConst.MSG_MINUTES;
		NAM_LIMIT_YEAR = NumberUtil.NAM_ONE + CommonConst.NAM_YEAR + CommonConst.MSG_OF + CommonConst.NAM_LIMIT_TIME;
		NAM_LIMIT_YEAR_HOUR = NAM_LIMIT_YEAR + CommonConst.MSG_HOUR;
		NAM_LIMIT_YEAR_MIN = NAM_LIMIT_YEAR + CommonConst.MSG_MINUTES;
		NAM_RATE_TERM = CommonConst.NAM_SPECIFIED_PERIOD + CommonConst.MSG_OF + CommonConst.NAM_PREMIUM_RATE;
		NAM_RATE_YEAR = NumberUtil.NAM_ONE + CommonConst.NAM_YEAR + CommonConst.MSG_OF + CommonConst.NAM_PREMIUM_RATE;
		NAM_DELETE_FLAG = CommonConst.NAM_DELETE_FLAG;
		LBL_ONE_DAY = NumberUtil.NAM_ONE + CommonConst.NAM_DAY;
		LBL_SPECIFIED_PERIOD = CommonConst.NAM_SPECIFIED_PERIOD;
		LBL_ONE_YEAR = NumberUtil.NAM_ONE + CommonConst.NAM_YEAR;
		LBL_CAUTION_TIME = CommonConst.NAM_CAUTION + CommonConst.NAM_COMMON_TIME;
		LBL_LIMIT_TIME = CommonConst.NAM_LIMIT_TIME;
		LBL_RATE = CommonConst.NAM_PREMIUM_RATE;
		LEN_LCODE = 10;
		LEN_LNAME = 50;
		LEN_PRESCRIBED_TIME_HOUR = 2;
		LEN_PRESCRIBED_TIME_MIN = 2;
		LEN_CAUTION_DAY_HOUR = 2;
		LEN_CAUTION_DAY_MIN = 2;
		LEN_CAUTION_TERM_HOUR = 3;
		LEN_CAUTION_TERM_MIN = 2;
		LEN_CAUTION_YEAR_HOUR = 3;
		LEN_CAUTION_YEAR_MIN = 2;
		LEN_LIMIT_DAY_HOUR = 2;
		LEN_LIMIT_DAY_MIN = 2;
		LEN_LIMIT_TERM_HOUR = 3;
		LEN_LIMIT_TERM_MIN = 2;
		LEN_LIMIT_YEAR_HOUR = 3;
		LEN_LIMIT_YEAR_MIN = 2;
		LEN_RATE_TERM = 3;
		LEN_RATE_YEAR = 3;
	}
	
	/**
	 * 初期値設定
	 */
	public void setDefaultValues() {
		setTxtLCode("");
		setTxtLName("");
		setTxtPrescribedTimeHour("8");
		setTxtPrescribedTimeMin("0");
		setTxtCautionDayHour("0");
		setTxtCautionDayMin("0");
		setTxtCautionTermHour("0");
		setTxtCautionTermMin("0");
		setTxtCautionYearHour("0");
		setTxtCautionYearMin("0");
		setTxtLimitDayHour("15");
		setTxtLimitDayMin("0");
		setTxtLimitTermHour("15");
		setTxtLimitTermMin("0");
		setTxtLimitYearHour("360");
		setTxtLimitYearMin("0");
		setTxtRateTerm("125");
		setTxtRateYear("125");
		setPltDeleteFlag("0");
	}
	
	@Override
	public void setParams(HttpServletRequest request) {
		txtLCode = request.getParameter(PRM_TXT_LCODE);
		txtLName = request.getParameter(PRM_TXT_LNAME);
		txtPrescribedTimeHour = request.getParameter(PRM_TXT_PRESCRIBED_TIME_HOUR);
		txtPrescribedTimeMin = request.getParameter(PRM_TXT_PRESCRIBED_TIME_MIN);
		/*
				pltTermType = request.getParameter(PRM_PLT_TERM_TYPE);
				txtCautionDayHour = request.getParameter(PRM_TXT_CAUTION_DAY_HOUR);
				txtCautionDayMin = request.getParameter(PRM_TXT_CAUTION_DAY_MIN);
				txtCautionTermHour = request.getParameter(PRM_TXT_CAUTION_TERM_HOUR);
				txtCautionTermMin = request.getParameter(PRM_TXT_CAUTION_TERM_MIN);
				txtCautionYearHour = request.getParameter(PRM_TXT_CAUTION_YEAR_HOUR);
				txtCautionYearMin = request.getParameter(PRM_TXT_CAUTION_YEAR_MIN);
				txtLimitDayHour = request.getParameter(PRM_TXT_LIMIT_DAY_HOUR);
				txtLimitDayMin = request.getParameter(PRM_TXT_LIMIT_DAY_MIN);
				txtLimitTermHour = request.getParameter(PRM_TXT_LIMIT_TERM_HOUR);
				txtLimitTermMin = request.getParameter(PRM_TXT_LIMIT_TERM_MIN);
				txtLimitYearHour = request.getParameter(PRM_TXT_LIMIT_YEAR_HOUR);
				txtLimitYearMin = request.getParameter(PRM_TXT_LIMIT_YEAR_MIN);
				txtRateTerm = request.getParameter(PRM_TXT_RATE_TERM);
				txtRateYear = request.getParameter(PRM_TXT_RATE_YEAR);
		*/
		pltDeleteFlag = request.getParameter(PRM_PLT_DELETE_FLAG);
	}
	
	/**
	 * フィールド設定
	 * @param dto 限度基準マスタDTO
	 */
	public void setFields(CmLimitStandardDto dto) {
		txtLCode = dto.getLimitCode();
		txtLName = dto.getLimitName();
		txtPrescribedTimeHour = TimeUtil.convIntegerTimeToStringHour(dto.getPrescribedTime());
		txtPrescribedTimeMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getPrescribedTime());
		/*
				pltTermType = dto.getTermType();
				txtCautionDayHour = TimeUtil.convIntegerTimeToStringHour(dto.getCautionDay());
				txtCautionDayMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getCautionDay());
				txtCautionTermHour = TimeUtil.convIntegerTimeToStringHour(dto.getCautionTerm());
				txtCautionTermMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getCautionTerm());
				txtCautionYearHour = TimeUtil.convIntegerTimeToStringHour(dto.getCautionYear());
				txtCautionYearMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getCautionYear());
				txtLimitDayHour = TimeUtil.convIntegerTimeToStringHour(dto.getLimitDay());
				txtLimitDayMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getLimitDay());
				txtLimitTermHour = TimeUtil.convIntegerTimeToStringHour(dto.getLimitTerm());
				txtLimitTermMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getLimitTerm());
				txtLimitYearHour = TimeUtil.convIntegerTimeToStringHour(dto.getLimitYear());
				txtLimitYearMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getLimitYear());
				txtRateTerm = String.valueOf(dto.getRateTerm());
				txtRateYear = String.valueOf(dto.getRateYear());
		*/
		pltDeleteFlag = String.valueOf(dto.getDeleteFlag());
	}
	
	/**
	 * フィールド設定(DTOに対するVO情報のセット)
	 * @param dto 設定対象DTO
	 */
	public void setDtoFields(CmLimitStandardDto dto) {
		dto.setLimitCode(txtLCode);
		dto.setLimitName(txtLName);
		dto.setPrescribedTime(TimeUtil.convStringTimeToIntegerTime(txtPrescribedTimeHour, txtPrescribedTimeMin));
		/*
				dto.setTermType(pltTermType);
				dto.setCautionDay(TimeUtil.convStringTimeToIntegerTime(txtCautionDayHour, txtCautionDayMin));
				dto.setCautionTerm(TimeUtil.convStringTimeToIntegerTime(txtCautionTermHour, txtCautionTermMin));
				dto.setCautionYear(TimeUtil.convStringTimeToIntegerTime(txtCautionYearHour, txtCautionYearMin));
				dto.setLimitDay(TimeUtil.convStringTimeToIntegerTime(txtLimitDayHour, txtLimitDayMin));
				dto.setLimitTerm(TimeUtil.convStringTimeToIntegerTime(txtLimitTermHour, txtLimitTermMin));
				dto.setLimitYear(TimeUtil.convStringTimeToIntegerTime(txtLimitYearHour, txtLimitYearMin));
				dto.setRateTerm(Integer.parseInt(txtRateTerm));
				dto.setRateYear(Integer.parseInt(txtRateYear));
		*/
		dto.setDeleteFlag(Integer.parseInt(pltDeleteFlag));
	}
	
	/**
	 * フィールドの妥当性確認
	 * @throws MospException	MosP例外処理が発生した場合
	 */
	public void validate() throws MospException {
		// 妥当性確認開始時処理
		startValidation();
		// 必須確認
		checkRequired(txtLCode, NAM_LCODE, PRM_TXT_LCODE);
		checkRequired(txtLName, NAM_LNAME, PRM_TXT_LNAME);
		checkRequired(txtPrescribedTimeHour, NAM_PRESCRIBED_TIME_HOUR, PRM_TXT_PRESCRIBED_TIME_HOUR);
		checkRequired(txtPrescribedTimeMin, NAM_PRESCRIBED_TIME_MIN, PRM_TXT_PRESCRIBED_TIME_MIN);
		/*
				checkRequired(txtCautionDayHour, NAM_CAUTION_DAY_HOUR, PRM_TXT_CAUTION_DAY_HOUR);
				checkRequired(txtCautionDayMin, NAM_CAUTION_DAY_MIN, PRM_TXT_CAUTION_DAY_MIN);
				checkRequired(txtCautionTermHour, NAM_CAUTION_TERM_HOUR, PRM_TXT_CAUTION_TERM_HOUR);
				checkRequired(txtCautionTermMin, NAM_CAUTION_TERM_MIN, PRM_TXT_CAUTION_TERM_MIN);
				checkRequired(txtCautionYearHour, NAM_CAUTION_YEAR_HOUR, PRM_TXT_CAUTION_YEAR_HOUR);
				checkRequired(txtCautionYearMin, NAM_CAUTION_YEAR_MIN, PRM_TXT_CAUTION_YEAR_MIN);
				checkRequired(txtLimitDayHour, NAM_LIMIT_DAY_HOUR, PRM_TXT_LIMIT_DAY_HOUR);
				checkRequired(txtLimitDayMin, NAM_LIMIT_DAY_MIN, PRM_TXT_LIMIT_DAY_MIN);
				checkRequired(txtLimitTermHour, NAM_LIMIT_TERM_HOUR, PRM_TXT_LIMIT_TERM_HOUR);
				checkRequired(txtLimitTermMin, NAM_LIMIT_TERM_MIN, PRM_TXT_LIMIT_TERM_MIN);
				checkRequired(txtLimitYearHour, NAM_LIMIT_YEAR_HOUR, PRM_TXT_LIMIT_YEAR_HOUR);
				checkRequired(txtLimitYearMin, NAM_LIMIT_YEAR_MIN, PRM_TXT_LIMIT_YEAR_MIN);
				checkRequired(txtRateTerm, NAM_RATE_TERM, PRM_TXT_RATE_TERM);
				checkRequired(txtRateYear, NAM_RATE_YEAR, PRM_TXT_RATE_YEAR);
		*/
		// 文字タイプ確認
		checkCode(txtLCode, NAM_LCODE, PRM_TXT_LCODE);
		checkNumber(txtPrescribedTimeHour, NAM_PRESCRIBED_TIME_HOUR, PRM_TXT_PRESCRIBED_TIME_HOUR);
		checkNumber(txtPrescribedTimeMin, NAM_PRESCRIBED_TIME_MIN, PRM_TXT_PRESCRIBED_TIME_MIN);
		/*
				checkNumber(txtCautionDayHour, NAM_CAUTION_DAY_HOUR, PRM_TXT_CAUTION_DAY_HOUR);
				checkNumber(txtCautionDayMin, NAM_CAUTION_DAY_MIN, PRM_TXT_CAUTION_DAY_MIN);
				checkNumber(txtCautionTermHour, NAM_CAUTION_TERM_HOUR, PRM_TXT_CAUTION_TERM_HOUR);
				checkNumber(txtCautionTermMin, NAM_CAUTION_TERM_MIN, PRM_TXT_CAUTION_TERM_MIN);
				checkNumber(txtCautionYearHour, NAM_CAUTION_YEAR_HOUR, PRM_TXT_CAUTION_YEAR_HOUR);
				checkNumber(txtCautionYearMin, NAM_CAUTION_YEAR_MIN, PRM_TXT_CAUTION_YEAR_MIN);
				checkNumber(txtLimitDayHour, NAM_LIMIT_DAY_HOUR, PRM_TXT_LIMIT_DAY_HOUR);
				checkNumber(txtLimitDayMin, NAM_LIMIT_DAY_MIN, PRM_TXT_LIMIT_DAY_MIN);
				checkNumber(txtLimitTermHour, NAM_LIMIT_TERM_HOUR, PRM_TXT_LIMIT_TERM_HOUR);
				checkNumber(txtLimitTermMin, NAM_LIMIT_TERM_MIN, PRM_TXT_LIMIT_TERM_MIN);
				checkNumber(txtLimitYearHour, NAM_LIMIT_YEAR_HOUR, PRM_TXT_LIMIT_YEAR_HOUR);
				checkNumber(txtLimitYearMin, NAM_LIMIT_YEAR_MIN, PRM_TXT_LIMIT_YEAR_MIN);
				checkNumber(txtRateTerm, NAM_RATE_TERM, PRM_TXT_RATE_TERM);
				checkNumber(txtRateYear, NAM_RATE_YEAR, PRM_TXT_RATE_YEAR);
		*/
		// 文字列長確認
		checkLength(txtLCode, LEN_LCODE, NAM_LCODE, PRM_TXT_LCODE);
		checkLength(txtLName, LEN_LNAME, NAM_LNAME, PRM_TXT_LNAME);
		checkLength(txtPrescribedTimeHour, LEN_PRESCRIBED_TIME_HOUR, NAM_PRESCRIBED_TIME_HOUR,
				PRM_TXT_PRESCRIBED_TIME_HOUR);
		checkLength(txtPrescribedTimeMin, LEN_PRESCRIBED_TIME_MIN, NAM_PRESCRIBED_TIME_MIN, PRM_TXT_PRESCRIBED_TIME_MIN);
		/*
				checkLength(txtCautionDayHour, LEN_CAUTION_DAY_HOUR, NAM_CAUTION_DAY_HOUR, PRM_TXT_CAUTION_DAY_HOUR);
				checkLength(txtCautionDayMin, LEN_CAUTION_DAY_MIN, NAM_CAUTION_DAY_MIN, PRM_TXT_CAUTION_DAY_MIN);
				checkLength(txtCautionTermHour, LEN_CAUTION_TERM_HOUR, NAM_CAUTION_TERM_HOUR, PRM_TXT_CAUTION_TERM_HOUR);
				checkLength(txtCautionTermMin, LEN_CAUTION_TERM_MIN, NAM_CAUTION_TERM_MIN, PRM_TXT_CAUTION_TERM_MIN);
				checkLength(txtCautionYearHour, LEN_CAUTION_YEAR_HOUR, NAM_CAUTION_YEAR_HOUR, PRM_TXT_CAUTION_YEAR_HOUR);
				checkLength(txtCautionYearMin, LEN_CAUTION_YEAR_MIN, NAM_CAUTION_YEAR_MIN, PRM_TXT_CAUTION_YEAR_MIN);
				checkLength(txtLimitDayHour, LEN_LIMIT_DAY_HOUR, NAM_LIMIT_DAY_HOUR, PRM_TXT_LIMIT_DAY_HOUR);
				checkLength(txtLimitDayMin, LEN_LIMIT_DAY_MIN, NAM_LIMIT_DAY_MIN, PRM_TXT_LIMIT_DAY_MIN);
				checkLength(txtLimitTermHour, LEN_LIMIT_TERM_HOUR, NAM_LIMIT_TERM_HOUR, PRM_TXT_LIMIT_TERM_HOUR);
				checkLength(txtLimitTermMin, LEN_LIMIT_TERM_MIN, NAM_LIMIT_TERM_MIN, PRM_TXT_LIMIT_TERM_MIN);
				checkLength(txtLimitYearHour, LEN_LIMIT_YEAR_HOUR, NAM_LIMIT_YEAR_HOUR, PRM_TXT_LIMIT_YEAR_HOUR);
				checkLength(txtLimitYearMin, LEN_LIMIT_YEAR_MIN, NAM_LIMIT_YEAR_MIN, PRM_TXT_LIMIT_YEAR_MIN);
				checkLength(txtRateTerm, LEN_RATE_TERM, NAM_RATE_TERM, PRM_TXT_RATE_TERM);
				checkLength(txtRateYear, LEN_RATE_YEAR, NAM_RATE_YEAR, PRM_TXT_RATE_YEAR);
		*/
		// 妥当性確認終了時処理
		endValidation();
	}
	
	@Override
	public String getDirectJs(Class<?> cls, Object obj) throws IllegalAccessException {
		StringBuffer sb = new StringBuffer();
		sb.append(super.getDirectJs(cls, obj));
		sb.append("var MODE = ");
		sb.append(mode);
		sb.append(";");
		return sb.toString();
	}
	
	/**
	 * @return txtLCode
	 */
	public String getTxtLCode() {
		return txtLCode;
	}
	
	/**
	 * @return txtLName
	 */
	public String getTxtLName() {
		return txtLName;
	}
	
	/**
	 * @return pltTermType
	 */
	public String getPltTermType() {
		return pltTermType;
	}
	
	/**
	 * @return txtPrescribedTimeHour
	 */
	public String getTxtPrescribedTimeHour() {
		return txtPrescribedTimeHour;
	}
	
	/**
	 * @return txtPrescribedTimeMin
	 */
	public String getTxtPrescribedTimeMin() {
		return txtPrescribedTimeMin;
	}
	
	/**
	 * @return txtCautionDayHour
	 */
	public String getTxtCautionDayHour() {
		return txtCautionDayHour;
	}
	
	/**
	 * @return txtCautionDayMin
	 */
	public String getTxtCautionDayMin() {
		return txtCautionDayMin;
	}
	
	/**
	 * @return txtCautionTermHour
	 */
	public String getTxtCautionTermHour() {
		return txtCautionTermHour;
	}
	
	/**
	 * @return txtCautionTermMin
	 */
	public String getTxtCautionTermMin() {
		return txtCautionTermMin;
	}
	
	/**
	 * @return txtCautionYearHour
	 */
	public String getTxtCautionYearHour() {
		return txtCautionYearHour;
	}
	
	/**
	 * @return txtCautionYearMin
	 */
	public String getTxtCautionYearMin() {
		return txtCautionYearMin;
	}
	
	/**
	 * @return txtLimitDayHour
	 */
	public String getTxtLimitDayHour() {
		return txtLimitDayHour;
	}
	
	/**
	 * @return txtLimitDayMin
	 */
	public String getTxtLimitDayMin() {
		return txtLimitDayMin;
	}
	
	/**
	 * @return txtLimitTermHour
	 */
	public String getTxtLimitTermHour() {
		return txtLimitTermHour;
	}
	
	/**
	 * @return txtLimitTermMin
	 */
	public String getTxtLimitTermMin() {
		return txtLimitTermMin;
	}
	
	/**
	 * @return txtLimitYearHour
	 */
	public String getTxtLimitYearHour() {
		return txtLimitYearHour;
	}
	
	/**
	 * @return txtLimitYearMin
	 */
	public String getTxtLimitYearMin() {
		return txtLimitYearMin;
	}
	
	/**
	 * @return txtRateTerm
	 */
	public String getTxtRateTerm() {
		return txtRateTerm;
	}
	
	/**
	 * @return txtRateYear
	 */
	public String getTxtRateYear() {
		return txtRateYear;
	}
	
	/**
	 * @return txtDeleteFlag
	 */
	public String getPltDeleteFlag() {
		return pltDeleteFlag;
	}
	
	/**
	 * @return txtLCode
	 */
	public String getEscTxtLCode() {
		return escapeHTML(txtLCode);
	}
	
	/**
	 * @return txtLName
	 */
	public String getEscTxtLName() {
		return escapeHTML(txtLName);
	}
	
	/**
	 * @return txtPrescribedTimeHour
	 */
	public String getEscTxtPrescribedTimeHour() {
		return escapeHTML(txtPrescribedTimeHour);
	}
	
	/**
	 * @return txtPrescribedTimeMin
	 */
	public String getEscTxtPrescribedTimeMin() {
		return escapeHTML(txtPrescribedTimeMin);
	}
	
	/**
	 * @return txtCautionDayHour
	 */
	public String getEscTxtCautionDayHour() {
		return escapeHTML(txtCautionDayHour);
	}
	
	/**
	 * @return txtCautionDayMin
	 */
	public String getEscTxtCautionDayMin() {
		return escapeHTML(txtCautionDayMin);
	}
	
	/**
	 * @return txtCautionTermHour
	 */
	public String getEscTxtCautionTermHour() {
		return escapeHTML(txtCautionTermHour);
	}
	
	/**
	 * @return txtCautionTermMin
	 */
	public String getEscTxtCautionTermMin() {
		return escapeHTML(txtCautionTermMin);
	}
	
	/**
	 * @return txtCautionYearHour
	 */
	public String getEscTxtCautionYearHour() {
		return escapeHTML(txtCautionYearHour);
	}
	
	/**
	 * @return txtCautionYearMin
	 */
	public String getEscTxtCautionYearMin() {
		return escapeHTML(txtCautionYearMin);
	}
	
	/**
	 * @return txtLimitDayHour
	 */
	public String getEscTxtLimitDayHour() {
		return escapeHTML(txtLimitDayHour);
	}
	
	/**
	 * @return txtLimitDayMin
	 */
	public String getEscTxtLimitDayMin() {
		return escapeHTML(txtLimitDayMin);
	}
	
	/**
	 * @return txtLimitTermHour
	 */
	public String getEscTxtLimitTermHour() {
		return escapeHTML(txtLimitTermHour);
	}
	
	/**
	 * @return txtLimitTermMin
	 */
	public String getEscTxtLimitTermMin() {
		return escapeHTML(txtLimitTermMin);
	}
	
	/**
	 * @return txtLimitYearHour
	 */
	public String getEscTxtLimitYearHour() {
		return escapeHTML(txtLimitYearHour);
	}
	
	/**
	 * @return txtLimitYearMin
	 */
	public String getEscTxtLimitYearMin() {
		return escapeHTML(txtLimitYearMin);
	}
	
	/**
	 * @return txtRateTerm
	 */
	public String getEscTxtRateTerm() {
		return escapeHTML(txtRateTerm);
	}
	
	/**
	 * @return txtRateYear
	 */
	public String getEscTxtRateYear() {
		return escapeHTML(txtRateYear);
	}
	
	/**
	 * @return mode
	 */
	public int getMode() {
		return mode;
	}
	
	/**
	 * @param txtLCode セットする txtLCode
	 */
	public void setTxtLCode(String txtLCode) {
		this.txtLCode = txtLCode;
	}
	
	/**
	 * @param txtLName セットする txtLName
	 */
	public void setTxtLName(String txtLName) {
		this.txtLName = txtLName;
	}
	
	/**
	 * @param pltTermType セットする pltTermType
	 */
	public void setPltTermType(String pltTermType) {
		this.pltTermType = pltTermType;
	}
	
	/**
	 * @param txtPrescribedTimeHour セットする txtPrescribedTimeHour
	 */
	public void setTxtPrescribedTimeHour(String txtPrescribedTimeHour) {
		this.txtPrescribedTimeHour = txtPrescribedTimeHour;
	}
	
	/**
	 * @param txtPrescribedTimeMin セットする txtPrescribedTimeMin
	 */
	public void setTxtPrescribedTimeMin(String txtPrescribedTimeMin) {
		this.txtPrescribedTimeMin = txtPrescribedTimeMin;
	}
	
	/**
	 * @param txtCautionDayHour セットする txtCautionDayHour
	 */
	public void setTxtCautionDayHour(String txtCautionDayHour) {
		this.txtCautionDayHour = txtCautionDayHour;
	}
	
	/**
	 * @param txtCautionDayMin セットする txtCautionDayMin
	 */
	public void setTxtCautionDayMin(String txtCautionDayMin) {
		this.txtCautionDayMin = txtCautionDayMin;
	}
	
	/**
	 * @param txtCautionTermHour セットする txtCautionTermHour
	 */
	public void setTxtCautionTermHour(String txtCautionTermHour) {
		this.txtCautionTermHour = txtCautionTermHour;
	}
	
	/**
	 * @param txtCautionTermMin セットする txtCautionTermMin
	 */
	public void setTxtCautionTermMin(String txtCautionTermMin) {
		this.txtCautionTermMin = txtCautionTermMin;
	}
	
	/**
	 * @param txtCautionYearHour セットする txtCautionYearHour
	 */
	public void setTxtCautionYearHour(String txtCautionYearHour) {
		this.txtCautionYearHour = txtCautionYearHour;
	}
	
	/**
	 * @param txtCautionYearMin セットする txtCautionYearMin
	 */
	public void setTxtCautionYearMin(String txtCautionYearMin) {
		this.txtCautionYearMin = txtCautionYearMin;
	}
	
	/**
	 * @param txtLimitDayHour セットする txtLimitDayHour
	 */
	public void setTxtLimitDayHour(String txtLimitDayHour) {
		this.txtLimitDayHour = txtLimitDayHour;
	}
	
	/**
	 * @param txtLimitDayMin セットする txtLimitDayMin
	 */
	public void setTxtLimitDayMin(String txtLimitDayMin) {
		this.txtLimitDayMin = txtLimitDayMin;
	}
	
	/**
	 * @param txtLimitTermHour セットする txtLimitTermHour
	 */
	public void setTxtLimitTermHour(String txtLimitTermHour) {
		this.txtLimitTermHour = txtLimitTermHour;
	}
	
	/**
	 * @param txtLimitTermMin セットする txtLimitTermMin
	 */
	public void setTxtLimitTermMin(String txtLimitTermMin) {
		this.txtLimitTermMin = txtLimitTermMin;
	}
	
	/**
	 * @param txtLimitYearHour セットする txtLimitYearHour
	 */
	public void setTxtLimitYearHour(String txtLimitYearHour) {
		this.txtLimitYearHour = txtLimitYearHour;
	}
	
	/**
	 * @param txtLimitYearMin セットする txtLimitYearMin
	 */
	public void setTxtLimitYearMin(String txtLimitYearMin) {
		this.txtLimitYearMin = txtLimitYearMin;
	}
	
	/**
	 * @param txtRateTerm セットする txtRateTerm
	 */
	public void setTxtRateTerm(String txtRateTerm) {
		this.txtRateTerm = txtRateTerm;
	}
	
	/**
	 * @param txtRateYear セットする txtRateYear
	 */
	public void setTxtRateYear(String txtRateYear) {
		this.txtRateYear = txtRateYear;
	}
	
	/**
	 * @param pltDeleteFlag セットする pltDeleteFlag
	 */
	public void setPltDeleteFlag(String pltDeleteFlag) {
		this.pltDeleteFlag = pltDeleteFlag;
	}
	
	/**
	 * @param mode セットする mode
	 */
	public void setMode(int mode) {
		this.mode = mode;
	}
	
}
