package gf;

import org.opengion.fukurou.business.BizLogic_TABLE;

public class GF9140A extends BizLogic_TABLE {

	protected boolean befchk( final int row ) {
//		String cnt = "select count(*) CNT from GF41 where clm=[CLM]";
//		sql( cnt );
		return true;
	}

	protected boolean inschk( final int row ) {
//		if( vari( "CNT" ) > 0 ) {
//			error( NG, "ERR0014", "[CLM]", "{#GF41}" );
//		}
		exist( "false", "GF41", "CLM,LANG", "[CLM],[LANG]", "FGJ", "1" );
		return true;
	}

	protected boolean modchk( final int row ) {
//		if( vari( "CNT" ) == 0 ) {
//			error( NG, "ERR0015", "[CLM]", "{#GF41}" );
//		}
		exist( "true", "GF41", "CLM,LANG", "[CLM],[LANG]", "FGJ", "1" );
		return true;
	}

	protected boolean delchk( final int row ) {
		return modchk( row );
	}

	protected boolean insert( final int row ) {

//		String ins = "insert into GF41("
//			+ "system_id, lang, clm, name_ja, label_name, kbsaku, fgj "
//			+ ", dyset, usrset, pgset, pgpset, dyupd, usrupd, pgupd, pgpupd"
//			+ ") values ("
//			+ "[SYSTEM_ID], [LANG], [CLM], [NAME_JA], [LABEL_NAME], [KBSAKU], '1' "
//			+ ", '{@CON.YMDH}', '{@CON.USERID}', '{@CON.PGID}', '{@CON.PGPID}', '{@CON.YMDH}', '{@CON.USERID}', '{@CON.PGID}', '{@CON.PGPID}'"
//			+ ")";
//		sql( ins );
		boolean rtn = call( "gf.GF0001", "SYSTEM_ID,LANG,CLM,NAME_JA,LABEL_NAME,KBSAKU", "[SYSTEM_ID],[LANG],[CLM],[NAME_JA],[LABEL_NAME],[KBSAKU]" );
		if( !rtn ) { return false; }

		return true;
	}

	protected boolean modify( final int row ) {

//		String upd = "update GF41 set "
//			+ "name_ja = [NAME_JA] "
//			+ ",label_name = [LABEL_NAME] "
//			+ ",kbsaku = [KBSAKU] "
//			+ ",system_id = [SYSTEM_ID] "
//			+ ",lang = [LANG] "
//			+ ",dyupd = '{@CON.YMDH}' "
//			+ ",usrupd = '{@CON.USERID}' "
//			+ ",pgupd = '{@CON.PGID}' "
//			+ ",pgpupd = '{@CON.PGPID}' "
//			+ "where system_id = [SYSTEM_ID] "
//			+ "and clm = [CLM] "
//			+ "and lang = [LANG] ";
//		sql( upd );
		boolean rtn = call( "gf.GF0001", "SYSTEM_ID,LANG,CLM,NAME_JA,LABEL_NAME,KBSAKU", "[SYSTEM_ID],[LANG],[CLM],[NAME_JA],[LABEL_NAME],[KBSAKU]" );
		if( !rtn ) { return false; }

		return true;
	}

	protected boolean delete( final int row ) {
		String del = "delete from GF41 " + "where clm=[CLM]";
		sql( del );

		return true;
	}
}
