package scb.ebbs.ecodes.ejb;



import scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey;
import scb.ebbs.accounts.ejb.SubsidiaryAccountHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import mockit.Mocked;
import mockit.Deencapsulation;
import mockit.Expectations;
import mockit.Injectable;
import mockit.Tested;
import mockit.integration.junit4.JMockit;
import mockit.NonStrictExpectations;
import org.junit.Assert;
import org.junit.Before;
import mockit.Mock;
import mockit.MockUp;
import mockit.Invocation;

import scb.wrapper.*;
import scb.general.wrapper.*;
import scb.util.*;
import scb.ebbs.ecodes.wrapper.*;
import scb.ebbs.ecodes.ejb.*;
import scb.ebbs.ecodes.factory.*;
import scb.business.ebatch.wrapper.*;
import scb.ebbs.util.*;
import scb.ebbs.service.common.*;
import java.io.File;
import java.util.*;
import java.sql.Date;
import java.sql.Time;
import java.math.*;
import java.sql.Timestamp;

import scb.exception.SCBApplicationException;
import scb.exception.SQLExecuteException;
import scb.ebbs.accounts.wrapper.*;
import scb.ebbs.util.StaticDataCacheDAO;
import java.sql.*;
import javax.ejb.CreateException;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.EntityContext;
import java.util.Enumeration;
import javax.naming.NamingException;
import com.scb.ebbs.event.exception.EventApplicationException;
import com.scb.ebbs.event.framework.DefaultEventMessageGenerator;
import com.scb.ebbs.event.framework.EventMessageGenerator;
import com.scb.ebbs.event.logger.EventLogger;
import com.scb.ebbs.event.logger.EventLoggerFactory;
import com.scb.ebbs.event.wrapper.EventMessageWrapper;
import javax.ejb.*;
import java.util.Vector;
import java.util.HashMap;
import java.util.List;
import javax.ejb.FinderException;
//Added by Suresh for R3import scb.ebbs.ecodes.wrapper.CrossDataValidationWrapper;
import scb.ebbs.ecodes.wrapper.TxnPostingSetupBusinessParamWrapper;
import scb.ebbs.ecustomer.wrapper.RelationshipAddressWrapper;
import scb.ebbs.general.generator.NumberGenerator;
import scb.ebbs.general.generator.NumberGeneratorFactory;
import scb.general.client.AccountValidationUtility;
import scb.general.ejb.BusinessProcessParamCache;
import scb.general.wrapper.BusinessProcessConstants;
import scb.general.wrapper.EventBusinessParamWrapper;
import scb.general.wrapper.GenericInfoTypeWrapper;
import scb.services.util.NexusUtil;
import scb.wrapper.SubsidiaryAccountWrapper;

@RunWith(JMockit.class)
public class SubsidiaryAccountHelperJAutoTest { 

	@Tested
	SubsidiaryAccountHelper subsidiaryAccountHelper;

	@Mocked Utility utility;
	@Mocked LogWriter logWriter;
	@Mocked CodeCache codeCache;
	@Mocked SystemProperties systemProperties;
	@Mocked SQLResultObject sqlResultObject;
	@Mocked Helper helper;
	@Mocked SQLStatementObject sqlStatementObject;
	@Mocked SQLExecutor sqlExecutor;
	@Mocked BusinessProcessParamCache businessProcessParamCache;
	@Mocked PrimaryKey primaryKey;
	@Mocked BusinessInfo businessInfo;
	@Mocked StaticDataCacheDAO staticDataCacheDAO;
	@Mocked NumberGeneratorFactory numberGeneratorFactory;
	@Mocked EntityContext entityContext;
	@Mocked AbstractWrapper[] abstractWrapperArr;
	@Mocked AbstractWrapper abstractWrapper;
	@Mocked EventProcessor eventProcessor;
	@Mocked NexusUtil nexusUtil;
	@Mocked AccountValidationUtility accountValidationUtility;
	@Mocked EODStatusMarkerEntityKey eodStatusMarkerEntityKey;
	static TxnPostingSetupBusinessParamWrapper txnPostingSetupBusinessParamWrapper;
	static TxnPostingSetupBusinessParamWrapper[] txnPostingSetupBusinessParamWrapperArr = null;
	static String stTest = "123456";
	static SubsidiaryAccountEntityKey subsidiaryAccountEntityKey;
	static boolean b1Test = false;
	static RequestInfo requestInfo = null;
	static AccountChargeWrapper accountChargeWrapper;
	static char chTest = 'Y';
	static BigDecimal bdTest = BigDecimal.valueOf(10);
	static byte byTest = '1';
	static double dbTest = 10.0;
	static Date sqlDate = new Date(System.currentTimeMillis());
	static int inTest = 10;
	static AccountChargeWrapper[] accountChargeWrapperArr = null;
	static GenericInfoTypeWrapper genericInfoTypeWrapper;
	static GenericInfoTypeWrapper[] genericInfoTypeWrapperArr = null;
	static AccountLinksWrapper accountLinksWrapper;
	static scb.wrapper.UserDetail userDetail = new scb.wrapper.UserDetail("123456", "123456", new Date(System.currentTimeMillis()), new Time(System.currentTimeMillis()), "123456");
	static AccountLinksWrapper[] accountLinksWrapperArr = null;
	static AccountNomineeWrapper accountNomineeWrapper;
	static AccountNomineeWrapper[] accountNomineeWrapperArr = null;
	static AccountNomineeWrapper[] accountNomineeWrapperArr2 = null;
	static AccountNomineeWrapper[] accountNomineeWrapperArr3 = null;
	static AccountOfflineChargeWrapper accountOfflineChargeWrapper;
	static AccountOfflineChargeWrapper[] accountOfflineChargeWrapperArr = null;
	static SubsidiaryAccountSCIFATCAWrapper subsidiaryAccountSCIFATCAWrapper;
	static SubsidiaryAccountTaxWaiverWrapper subsidiaryAccountTaxWaiverWrapper;
	static SubsidiaryAccountTaxWaiverWrapper[] subsidiaryAccountTaxWaiverWrapperArr = null;
	static scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper subsidiaryAccountWrapper;
	static CustomerLinkWrapper customerLinkWrapper = null;
	static Object object = null;
	static NominatedChargeAccountWrapper nominatedChargeAccountWrapper = null;
	static AccountCurrencyWrapper accountCurrencyWrapper = null;
	static StatementSetupSummaryWrapper statementSetupSummaryWrapper = null;
	static CrossDataValidationWrapper crossDataValidationWrapper = null;
	static scb.ebbs.ecustomer.wrapper.KYCGeneralInfoWrapper kycGeneralInfoWrapper = null;
	static TransactionAccountAddlDtlsWrapper transactionAccountAddlDtlsWrapper = null;
	static CrossDataValidationDetailsWrapper crossDataValidationDetailsWrapper = null;
	static Vector vector = new Vector<>();
	static NominatedChargeAccountWrapper[] nominatedChargeAccountWrapperArr = null;
	static int[] inTestArr = new int[1];
	static short[] shTestArr = new short[10];
	static CustomerLinkWrapper[] customerLinkWrapperArr = null;
	static scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper[] subsidiaryAccountWrapperArr = null;
	SAccountBusinessParamWrapper saccountBusinessParamWrapper = null;
	@Before
	public void init() throws Exception {

		try {
			new NonStrictExpectations() {
				{
					LogWriter.getInstance();
					result = logWriter;
				}
				{
					LogWriter.getInstance(anyString, anyString);
					result = logWriter;
				}
				{
					LogWriter.getInstance(anyString, anyString, anyString);
					result = logWriter;
				}
				{
					SystemProperties.getInstance();
					result = systemProperties;
				}
				{
					sqlResultObject.next();
					returns(true, true, false, true, false, true, false, true, false);
				}
				{
					sqlResultObject.getString(anyInt);
					result = "123456";
				}
				{
					sqlResultObject.getBigDecimal(anyInt);
					result = BigDecimal.valueOf(10);
				}
				{
					sqlResultObject.getInt(anyInt);
					result = 10;
				}
				{
					BusinessProcessParamCache.getInstance();
					result = businessProcessParamCache;
				}
				{
					BusinessProcessParamCache.getInstance().getProcessParameters("TXNPOSTSETUPS");
					result = txnPostingSetupBusinessParamWrapperArr;
				}
				{
					BusinessInfo.getInstance();
					result = businessInfo;
				}
				{
					StaticDataCacheDAO.getInstance();
					result = staticDataCacheDAO;
				}

			};
		} catch (Exception exObj) {
			System.out.println("Exception in init : Caution !! Issue must be addressed : Continue");
			exObj.printStackTrace();
		}

		try {
			subsidiaryAccountHelper = new SubsidiaryAccountHelper(entityContext);
		} catch (Exception exObj) {
			System.out.println("Exception in init : Constructor : Continue");
			exObj.printStackTrace();
		}

		setTxnPostingSetupBusinessParamWrapperArr();
		setSubsidiaryAccountEntityKey();
		setAccountChargeWrapperArr();
		setGenericInfoTypeWrapperArr();
		setAccountLinksWrapperArr();
		setAccountNomineeWrapperArr();
		setaccountNomineeWrapperArr2();
		setaccountNomineeWrapperArr3();
		setAccountOfflineChargeWrapperArr();
		setSubsidiaryAccountSCIFATCAWrapper();
		setSubsidiaryAccountTaxWaiverWrapperArr();
		setSubsidiaryAccountWrapper();
		setCrossDataValidationWrapper();
		setNominatedChargeAccountWrapperArr();
		setCustomerLinkWrapperArr();
		setSubsidiaryAccountWrapperArr();
		setNominatedChargeAccountWrapper();

	}

	@org.junit.BeforeClass
	public static void loadTestData() throws java.io.IOException {

		setTxnPostingSetupBusinessParamWrapperArr();
		setSubsidiaryAccountEntityKey();
		setAccountChargeWrapperArr();
		setGenericInfoTypeWrapperArr();
		setAccountLinksWrapperArr();
		setAccountNomineeWrapperArr();
		setaccountNomineeWrapperArr2();
		setaccountNomineeWrapperArr3();
		setAccountOfflineChargeWrapperArr();
		setSubsidiaryAccountSCIFATCAWrapper();
		setSubsidiaryAccountTaxWaiverWrapperArr();
		setSubsidiaryAccountWrapper();
		setCrossDataValidationWrapper();
		setNominatedChargeAccountWrapperArr();
		setCustomerLinkWrapperArr();
		setSubsidiaryAccountWrapperArr();
		setNominatedChargeAccountWrapper();

		System.out.println("AutoGeneratedJunit : SubsidiaryAccountHelper : Started : Executor : " + System.getProperty("org.gradle.test.worker"));
	}

	@org.junit.AfterClass
	public static void after() throws java.io.IOException {

		System.out.println("AutoGeneratedJunit : SubsidiaryAccountHelper : Completed : Executor : " + System.getProperty("org.gradle.test.worker"));
	}

	@org.junit.Rule
	public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(30000);

	public static void setTxnPostingSetupBusinessParamWrapperArr() { 
		try {
			txnPostingSetupBusinessParamWrapperArr = new TxnPostingSetupBusinessParamWrapper[1];
			txnPostingSetupBusinessParamWrapperArr[0] = new TxnPostingSetupBusinessParamWrapper();
			txnPostingSetupBusinessParamWrapperArr[0].isSubAccountAllowed = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].autoProvision = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].qcbFLag = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].internalMemoContra = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].transactionValidatorFactory = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].subAccountCrTrnCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].subAccountDrTrnCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].odToPostCSA = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].odBatchToReject = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].odForcePost = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].automaticUploadBranch = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].scbBankCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useLeanAccountTable = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useLogicWithCache = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].returnBaseTrnType = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].egiroUploadFlag = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].currLinkInterface = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].eximTrnType = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].subAccountBalanceChecking = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].limitBlock = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].limitStoreSuppress = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].consolidateLimit = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].stopPaymentSuspenseTrnCd = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].stopPaymentSuspenseAccount = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].inwardReturnType = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].forceTopupUpload = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].moaPrinciple = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].taxRounding = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].cacheRefreshFramework = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useLogicWithCacheSTS = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useAsyncFramework = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useBCUWithRCConnection = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].noLmtLck = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].uploadIdList = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].latePostingUploadId = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].dupTxn = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].gstApplicable = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].gstGenerateSumentries = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].updateLimitsRequiredFirst = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].includeTwoInOne = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].realTimePostTxnJobExecReq = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].cbrFlagValue = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].limitOptimisticLock = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].syncTxnAccountFromMaster = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].syncTxnAccountOnChangeOnly = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].apolloAdjustmentExtSysID = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].insufficientFundMakerValidation = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].mccBasedMiscCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].mccBasedTransactionType = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].accountLevelCreditSharingCap = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].isMirrorAccount = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].isDebitMandateEnabled = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].updateLimitNewContext = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].allowedChnlinNewContxtLmt = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].lmtNewCntxtRetryCount = 10;
			txnPostingSetupBusinessParamWrapperArr[0].chargeBlockOnExcessReturn = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].checkLeafStatusIfRiskNotFound = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].rulestoExcludeonReversal = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].rulestoExcludeonOutwardClearing = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].easyAccountThresHold = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].easyAccountRejectRsnCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].useOldLimitFormula = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].statGrpcode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].easyAccountPrdCode = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].partialChequeRev = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].overwriteValueDate = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].closeAccoddCentSuspenseAccount = "123456";
			txnPostingSetupBusinessParamWrapperArr[0].protectedFlag = false;
			txnPostingSetupBusinessParamWrapperArr[0].authorisationLevel = '1';
			txnPostingSetupBusinessParamWrapperArr[0].languageComponentHash = new Vector<>();
			txnPostingSetupBusinessParamWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setTxnPostingSetupBusinessParamWrapperArr()");
		}

	}

	public static void setSubsidiaryAccountEntityKey() { 
		try {
			subsidiaryAccountEntityKey = new SubsidiaryAccountEntityKey(stTest,stTest,b1Test);
			subsidiaryAccountEntityKey.accountNo = "123456";
			subsidiaryAccountEntityKey.currencyCode = "123456";
			subsidiaryAccountEntityKey.accountType = 'Y';
			subsidiaryAccountEntityKey.child = new int[1];
			subsidiaryAccountEntityKey.loadChild = new boolean[1];
			subsidiaryAccountEntityKey.isOldAccountNo = false;
			subsidiaryAccountEntityKey.fetchForUpdate = false;
			subsidiaryAccountEntityKey.requestInfo = new RequestInfo();
			subsidiaryAccountEntityKey.requestInfo.levelNo = 10;
			subsidiaryAccountEntityKey.requestInfo.extraObject = new HashMap();

			subsidiaryAccountEntityKey.suppressLoad = false;
			subsidiaryAccountEntityKey.suppressStore = false;
			subsidiaryAccountEntityKey.suppressSearch = false;
			subsidiaryAccountEntityKey.moduleName = 10;
			subsidiaryAccountEntityKey.companyID = "123456";
		} catch (Exception ex) {
			System.out.println("Exception Continue : setSubsidiaryAccountEntityKey()");
		}

	}

	public static void setAccountChargeWrapperArr() { 
		try {
			accountChargeWrapperArr = new AccountChargeWrapper[1];
			accountChargeWrapperArr[0] = new AccountChargeWrapper(stTest,chTest,bdTest,byTest,dbTest,stTest,sqlDate,chTest,chTest,inTest,bdTest);
			accountChargeWrapperArr[0].chargeCode = "123456";
			accountChargeWrapperArr[0].chargesWaivedFlag = 'Y';
			accountChargeWrapperArr[0].chargeOffset = BigDecimal.valueOf(10);
			accountChargeWrapperArr[0].chargePercent = 10.0;
			accountChargeWrapperArr[0].waiverReason = "123456";
			accountChargeWrapperArr[0].reviewDate = new Date(System.currentTimeMillis());
			accountChargeWrapperArr[0].recordStatus = '1';
			accountChargeWrapperArr[0].discountFlag = 'Y';
			accountChargeWrapperArr[0].systemGeneratedFlag = 'Y';
			accountChargeWrapperArr[0].noOfDiscounts = 10;
			accountChargeWrapperArr[0].availableDiscount = BigDecimal.valueOf(10);
			accountChargeWrapperArr[0].chargeGroupFlag = 'Y';
			accountChargeWrapperArr[0].waiveAllChargeFlag = 'Y';
			accountChargeWrapperArr[0].chargeCodeDescription = "123456";
			accountChargeWrapperArr[0].protectedFlag = false;
			accountChargeWrapperArr[0].authorisationLevel = '1';
			accountChargeWrapperArr[0].languageComponentHash = new Vector<>();
			accountChargeWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setAccountChargeWrapperArr()");
		}

	}

	public static void setGenericInfoTypeWrapperArr() { 
		try {
			genericInfoTypeWrapperArr = new GenericInfoTypeWrapper[1];
			genericInfoTypeWrapperArr[0] = new GenericInfoTypeWrapper();
			genericInfoTypeWrapperArr[0].misCode = "123456";
			genericInfoTypeWrapperArr[0].length = BigDecimal.valueOf(10);
			genericInfoTypeWrapperArr[0].minRange = BigDecimal.valueOf(10);
			genericInfoTypeWrapperArr[0].validate = "123456";
			genericInfoTypeWrapperArr[0].componentType = 10;
			genericInfoTypeWrapperArr[0].format = "123456";
			genericInfoTypeWrapperArr[0].misCodeDescription = "123456";
			genericInfoTypeWrapperArr[0].misValue = "123456";
			genericInfoTypeWrapperArr[0].misValueDescription = "123456";
			genericInfoTypeWrapperArr[0].seqNo = "123456";
			genericInfoTypeWrapperArr[0].recordStatus = '1';
			genericInfoTypeWrapperArr[0].programId = "123456";
			genericInfoTypeWrapperArr[0].misCodeLangDescription = "123456";
			genericInfoTypeWrapperArr[0].misValueLangDescription = "123456";
			genericInfoTypeWrapperArr[0].protectedFlag = false;
			genericInfoTypeWrapperArr[0].authorisationLevel = '1';
			genericInfoTypeWrapperArr[0].languageComponentHash = new Vector<>();
			genericInfoTypeWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setGenericInfoTypeWrapperArr()");
		}

	}

	public static void setAccountLinksWrapperArr() { 
		try {
			accountLinksWrapperArr = new AccountLinksWrapper[1];
			accountLinksWrapperArr[0] = new AccountLinksWrapper();
			accountLinksWrapperArr[0].seqNo = 10;
			accountLinksWrapperArr[0].productCode = "123456";
			accountLinksWrapperArr[0].currencyCode = "123456";
			accountLinksWrapperArr[0].accountNo = "123456";
			accountLinksWrapperArr[0].templateId = "123456";
			accountLinksWrapperArr[0].branchCode = "123456";
			accountLinksWrapperArr[0].accountType = 'Y';
			accountLinksWrapperArr[0].recordStatus = '1';
			accountLinksWrapperArr[0].productDescription = "123456";
			accountLinksWrapperArr[0].currencyDescription = "123456";
			accountLinksWrapperArr[0].accountNoDescription = "123456";
			accountLinksWrapperArr[0].templateIdDescription = "123456";
			accountLinksWrapperArr[0].branchCodeDescription = "123456";
			accountLinksWrapperArr[0].accountTypeDescription = "123456";
			accountLinksWrapperArr[0].masterNumber = "123456";
			accountLinksWrapperArr[0].linkTemplateId = "123456";
			accountLinksWrapperArr[0].seqNo1 = "123456";
			accountLinksWrapperArr[0].seqNo2 = "123456";
			accountLinksWrapperArr[0].seqNo3 = "123456";
			accountLinksWrapperArr[0].seqNo4 = "123456";
			accountLinksWrapperArr[0].seqNo5 = "123456";
			accountLinksWrapperArr[0].relationshipNo = "123456";
			accountLinksWrapperArr[0].accountBalance = BigDecimal.valueOf(10);
			accountLinksWrapperArr[0].makerDetail = userDetail;
			accountLinksWrapperArr[0].checkerDetail = userDetail;
			accountLinksWrapperArr[0].protectedFlag = false;
			accountLinksWrapperArr[0].authorisationLevel = '1';
			accountLinksWrapperArr[0].languageComponentHash = new Vector<>();
			accountLinksWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setAccountLinksWrapperArr()");
		}

	}

	public static void setAccountNomineeWrapperArr() { 
		try {
			accountNomineeWrapperArr = new AccountNomineeWrapper[1];
			accountNomineeWrapperArr[0] = new AccountNomineeWrapper();
			accountNomineeWrapperArr[0].addressTypeCode = "123456";
			accountNomineeWrapperArr[0].addressTypeDescription = "123456";
			accountNomineeWrapperArr[0].houseTypeCode = "123456";
			accountNomineeWrapperArr[0].houseTypeDescription = "123456";
			accountNomineeWrapperArr[0].rentPerAnnum = BigDecimal.valueOf(10);
			accountNomineeWrapperArr[0].flatNo = "123456";
			accountNomineeWrapperArr[0].buildingName = "123456";
			accountNomineeWrapperArr[0].nearLandmark = "123456";
			accountNomineeWrapperArr[0].street = "123456";
			accountNomineeWrapperArr[0].locationCode = "123456";
			accountNomineeWrapperArr[0].locationDescription = "123456";
			accountNomineeWrapperArr[0].postBox = "123456";
			accountNomineeWrapperArr[0].postalCode = "123456";
			accountNomineeWrapperArr[0].cityCode = "123456";
			accountNomineeWrapperArr[0].countryCode = "123456";
			accountNomineeWrapperArr[0].address1 = "123456";
			accountNomineeWrapperArr[0].address2 = "123456";
			accountNomineeWrapperArr[0].state = "123456";
			accountNomineeWrapperArr[0].stateDescription = "123456";
			accountNomineeWrapperArr[0].attentionParty = "123456";
			accountNomineeWrapperArr[0].recordStatus = EBBSConstants.NEW;
			accountNomineeWrapperArr[0].addressee = "123456";
			accountNomineeWrapperArr[0].cityFullName = "123456";
			accountNomineeWrapperArr[0].isMailingAddress = 'Y';
			accountNomineeWrapperArr[0].noYrsCurrentAddress = 1;
			accountNomineeWrapperArr[0].cityName = "123456";
			accountNomineeWrapperArr[0].countryName = "123456";
			accountNomineeWrapperArr[0].relationshipNo = "123456";
			accountNomineeWrapperArr[0].name = "123456";
			accountNomineeWrapperArr[0].seqNo = 10;
			accountNomineeWrapperArr[0].streetName = "123456";
			accountNomineeWrapperArr[0].telephoneNo = "123456";
			accountNomineeWrapperArr[0].locationCodeDescription = "123456";
			accountNomineeWrapperArr[0].countryCodeDescription = "123456";
			accountNomineeWrapperArr[0].cityCodeDescription = "123456";
			accountNomineeWrapperArr[0].relationshipNoDescription = "123456";
			accountNomineeWrapperArr[0].addressType = "123456";
			accountNomineeWrapperArr[0].isNomineeRegistered = 'Y';
			accountNomineeWrapperArr[0].lastUpdatedDate = new Date(System.currentTimeMillis());
			accountNomineeWrapperArr[0].protectedFlag = false;
			accountNomineeWrapperArr[0].authorisationLevel = '1';
			accountNomineeWrapperArr[0].languageComponentHash = new Vector<>();
			accountNomineeWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setAccountNomineeWrapperArr()");
		}

	}
	public static void setaccountNomineeWrapperArr2() { 
		try {
			accountNomineeWrapperArr2 = new AccountNomineeWrapper[1];
			accountNomineeWrapperArr2[0] = new AccountNomineeWrapper();
			accountNomineeWrapperArr2[0].addressTypeCode = "123456";
			accountNomineeWrapperArr2[0].addressTypeDescription = "123456";
			accountNomineeWrapperArr2[0].houseTypeCode = "123456";
			accountNomineeWrapperArr2[0].houseTypeDescription = "123456";
			accountNomineeWrapperArr2[0].rentPerAnnum = BigDecimal.valueOf(10);
			accountNomineeWrapperArr2[0].flatNo = "123456";
			accountNomineeWrapperArr2[0].buildingName = "123456";
			accountNomineeWrapperArr2[0].nearLandmark = "123456";
			accountNomineeWrapperArr2[0].street = "123456";
			accountNomineeWrapperArr2[0].locationCode = "123456";
			accountNomineeWrapperArr2[0].locationDescription = "123456";
			accountNomineeWrapperArr2[0].postBox = "123456";
			accountNomineeWrapperArr2[0].postalCode = "123456";
			accountNomineeWrapperArr2[0].cityCode = "123456";
			accountNomineeWrapperArr2[0].countryCode = "123456";
			accountNomineeWrapperArr2[0].address1 = "123456";
			accountNomineeWrapperArr2[0].address2 = "123456";
			accountNomineeWrapperArr2[0].state = "123456";
			accountNomineeWrapperArr2[0].stateDescription = "123456";
			accountNomineeWrapperArr2[0].attentionParty = "123456";
			accountNomineeWrapperArr2[0].recordStatus = EBBSConstants.MODIFIED;
			accountNomineeWrapperArr2[0].addressee = "123456";
			accountNomineeWrapperArr2[0].cityFullName = "123456";
			accountNomineeWrapperArr2[0].isMailingAddress = 'Y';
			accountNomineeWrapperArr2[0].noYrsCurrentAddress = 1;
			accountNomineeWrapperArr2[0].cityName = "123456";
			accountNomineeWrapperArr2[0].countryName = "123456";
			accountNomineeWrapperArr2[0].relationshipNo = "123456";
			accountNomineeWrapperArr2[0].name = "123456";
			accountNomineeWrapperArr2[0].seqNo = 10;
			accountNomineeWrapperArr2[0].streetName = "123456";
			accountNomineeWrapperArr2[0].telephoneNo = "123456";
			accountNomineeWrapperArr2[0].locationCodeDescription = "123456";
			accountNomineeWrapperArr2[0].countryCodeDescription = "123456";
			accountNomineeWrapperArr2[0].cityCodeDescription = "123456";
			accountNomineeWrapperArr2[0].relationshipNoDescription = "123456";
			accountNomineeWrapperArr2[0].addressType = "123456";
			accountNomineeWrapperArr2[0].isNomineeRegistered = 'Y';
			accountNomineeWrapperArr2[0].lastUpdatedDate = new Date(System.currentTimeMillis());
			accountNomineeWrapperArr2[0].protectedFlag = false;
			accountNomineeWrapperArr2[0].authorisationLevel = '1';
			accountNomineeWrapperArr2[0].languageComponentHash = new Vector<>();
			accountNomineeWrapperArr2[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setaccountNomineeWrapperArr2()");
		}

	}
	public static void setaccountNomineeWrapperArr3() { 
		try {
			accountNomineeWrapperArr3 = new AccountNomineeWrapper[1];
			accountNomineeWrapperArr3[0] = new AccountNomineeWrapper();
			accountNomineeWrapperArr3[0].addressTypeCode = "123456";
			accountNomineeWrapperArr3[0].addressTypeDescription = "123456";
			accountNomineeWrapperArr3[0].houseTypeCode = "123456";
			accountNomineeWrapperArr3[0].houseTypeDescription = "123456";
			accountNomineeWrapperArr3[0].rentPerAnnum = BigDecimal.valueOf(10);
			accountNomineeWrapperArr3[0].flatNo = "123456";
			accountNomineeWrapperArr3[0].buildingName = "123456";
			accountNomineeWrapperArr3[0].nearLandmark = "123456";
			accountNomineeWrapperArr3[0].street = "123456";
			accountNomineeWrapperArr3[0].locationCode = "123456";
			accountNomineeWrapperArr3[0].locationDescription = "123456";
			accountNomineeWrapperArr3[0].postBox = "123456";
			accountNomineeWrapperArr3[0].postalCode = "123456";
			accountNomineeWrapperArr3[0].cityCode = "123456";
			accountNomineeWrapperArr3[0].countryCode = "123456";
			accountNomineeWrapperArr3[0].address1 = "123456";
			accountNomineeWrapperArr3[0].address2 = "123456";
			accountNomineeWrapperArr3[0].state = "123456";
			accountNomineeWrapperArr3[0].stateDescription = "123456";
			accountNomineeWrapperArr3[0].attentionParty = "123456";
			accountNomineeWrapperArr3[0].recordStatus = EBBSConstants.DELETED;
			accountNomineeWrapperArr3[0].addressee = "123456";
			accountNomineeWrapperArr3[0].cityFullName = "123456";
			accountNomineeWrapperArr3[0].isMailingAddress = 'Y';
			accountNomineeWrapperArr3[0].noYrsCurrentAddress = 1;
			accountNomineeWrapperArr3[0].cityName = "123456";
			accountNomineeWrapperArr3[0].countryName = "123456";
			accountNomineeWrapperArr3[0].relationshipNo = "123456";
			accountNomineeWrapperArr3[0].name = "123456";
			accountNomineeWrapperArr3[0].seqNo = 10;
			accountNomineeWrapperArr3[0].streetName = "123456";
			accountNomineeWrapperArr3[0].telephoneNo = "123456";
			accountNomineeWrapperArr3[0].locationCodeDescription = "123456";
			accountNomineeWrapperArr3[0].countryCodeDescription = "123456";
			accountNomineeWrapperArr3[0].cityCodeDescription = "123456";
			accountNomineeWrapperArr3[0].relationshipNoDescription = "123456";
			accountNomineeWrapperArr3[0].addressType = "123456";
			accountNomineeWrapperArr3[0].isNomineeRegistered = 'Y';
			accountNomineeWrapperArr3[0].lastUpdatedDate = new Date(System.currentTimeMillis());
			accountNomineeWrapperArr3[0].protectedFlag = false;
			accountNomineeWrapperArr3[0].authorisationLevel = '1';
			accountNomineeWrapperArr3[0].languageComponentHash = new Vector<>();
			accountNomineeWrapperArr3[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setaccountNomineeWrapperArr3()");
		}

	}

	public static void setAccountOfflineChargeWrapperArr() { 
		try {
			accountOfflineChargeWrapperArr = new AccountOfflineChargeWrapper[1];
			accountOfflineChargeWrapperArr[0] = new AccountOfflineChargeWrapper();
			accountOfflineChargeWrapperArr[0].chargeGroupFlag = 'Y';
			accountOfflineChargeWrapperArr[0].code = "123456";
			accountOfflineChargeWrapperArr[0].description = "123456";
			accountOfflineChargeWrapperArr[0].nextExecDate = new Date(System.currentTimeMillis());
			accountOfflineChargeWrapperArr[0].recordStatus = 1;
			accountOfflineChargeWrapperArr[0].currencyCode = "123456";
			accountOfflineChargeWrapperArr[0].protectedFlag = false;
			accountOfflineChargeWrapperArr[0].authorisationLevel = '1';
			accountOfflineChargeWrapperArr[0].languageComponentHash = new Vector<>();
			accountOfflineChargeWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setAccountOfflineChargeWrapperArr()");
		}

	}

	public static void setSubsidiaryAccountSCIFATCAWrapper() { 
		try {
			subsidiaryAccountSCIFATCAWrapper = new SubsidiaryAccountSCIFATCAWrapper();
			subsidiaryAccountSCIFATCAWrapper.fatcaDocType = "123456";
			subsidiaryAccountSCIFATCAWrapper.fatcaStatus = "123456";
			subsidiaryAccountSCIFATCAWrapper.recalStatus = "123456";
			subsidiaryAccountSCIFATCAWrapper.approvedExcepFlag = 'Y';
			subsidiaryAccountSCIFATCAWrapper.comments = "123456";
			subsidiaryAccountSCIFATCAWrapper.accountNo = "123456";
			subsidiaryAccountSCIFATCAWrapper.currecyCode = "123456";
			subsidiaryAccountSCIFATCAWrapper.fatcaDocTypeDesc = "123456";
			subsidiaryAccountSCIFATCAWrapper.makerDetail = userDetail;
			subsidiaryAccountSCIFATCAWrapper.checkerDetail = userDetail;
			subsidiaryAccountSCIFATCAWrapper.recordStatus = '1';
			subsidiaryAccountSCIFATCAWrapper.protectedFlag = false;
			subsidiaryAccountSCIFATCAWrapper.authorisationLevel = '1';
			subsidiaryAccountSCIFATCAWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountSCIFATCAWrapper.historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setSubsidiaryAccountSCIFATCAWrapper()");
		}

	}

	public static void setSubsidiaryAccountTaxWaiverWrapperArr() { 
		try {
			subsidiaryAccountTaxWaiverWrapperArr = new SubsidiaryAccountTaxWaiverWrapper[1];
			subsidiaryAccountTaxWaiverWrapperArr[0] = new SubsidiaryAccountTaxWaiverWrapper();
			subsidiaryAccountTaxWaiverWrapperArr[0].taxCode = "123456";
			subsidiaryAccountTaxWaiverWrapperArr[0].taxCodeDescription = "123456";
			subsidiaryAccountTaxWaiverWrapperArr[0].recordStatus = '1';
			subsidiaryAccountTaxWaiverWrapperArr[0].waiverExpiryDate = new Date(System.currentTimeMillis());
			subsidiaryAccountTaxWaiverWrapperArr[0].protectedFlag = false;
			subsidiaryAccountTaxWaiverWrapperArr[0].authorisationLevel = '1';
			subsidiaryAccountTaxWaiverWrapperArr[0].languageComponentHash = new Vector<>();
			subsidiaryAccountTaxWaiverWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setSubsidiaryAccountTaxWaiverWrapperArr()");
		}

	}

	public static void setSubsidiaryAccountWrapper() { 
		try {
			subsidiaryAccountWrapper = new scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper();
			subsidiaryAccountWrapper.accountStructure = "123456";
			subsidiaryAccountWrapper.seqNo1 = "123456";
			subsidiaryAccountWrapper.seqNo2 = "123456";
			subsidiaryAccountWrapper.seqNo3 = "123456";
			subsidiaryAccountWrapper.seqNo4 = "123456";
			subsidiaryAccountWrapper.seqNo5 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper = new AccountLinksWrapper[1];
			subsidiaryAccountWrapper.accountLinksWrapper[0] = new AccountLinksWrapper();
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo = 10;
			subsidiaryAccountWrapper.accountLinksWrapper[0].productCode = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].templateId = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].branchCode = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].accountType = 'Y';
			subsidiaryAccountWrapper.accountLinksWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.accountLinksWrapper[0].productDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].currencyDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].accountNoDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].templateIdDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].branchCodeDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].accountTypeDescription = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].masterNumber = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].linkTemplateId = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo1 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo2 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo3 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo4 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].seqNo5 = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapper.accountLinksWrapper[0].accountBalance = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountLinksWrapper[0].makerDetail = userDetail;
			subsidiaryAccountWrapper.accountLinksWrapper[0].checkerDetail = userDetail;
			subsidiaryAccountWrapper.accountLinksWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.accountLinksWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.accountLinksWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.accountLinksWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.customerLinkWrapper = new CustomerLinkWrapper[1];
			subsidiaryAccountWrapper.customerLinkWrapper[0] = new CustomerLinkWrapper();
			subsidiaryAccountWrapper.customerLinkWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].relationshipTypeCode = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].recordStatus = 1;
			subsidiaryAccountWrapper.customerLinkWrapper[0].relationshipDescription = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].relationshipTypeCodeDescription = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].attachedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.customerLinkWrapper[0].primaryMasterNo = "123456";
			subsidiaryAccountWrapper.customerLinkWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.customerLinkWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.customerLinkWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.customerLinkWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.accountOfflineChargeWrapper = new AccountOfflineChargeWrapper[1];
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0] = new AccountOfflineChargeWrapper();
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].code = "123456";
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].description = "123456";
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].nextExecDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].recordStatus = 1;
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.accountOfflineChargeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.accountInfoTypeWrapper = new GenericInfoTypeWrapper[1];
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0] = new GenericInfoTypeWrapper();
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misCode = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].length = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].minRange = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].validate = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].componentType = 10;
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].format = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misCodeDescription = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misValue = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misValueDescription = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].seqNo = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].programId = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misCodeLangDescription = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].misValueLangDescription = "123456";
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.accountInfoTypeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.maccountInfoTypeWrapper = new GenericInfoTypeWrapper[1];
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0] = new GenericInfoTypeWrapper();
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misCode = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].length = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].minRange = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].validate = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].componentType = 10;
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].format = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misCodeDescription = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misValue = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misValueDescription = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].seqNo = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].programId = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misCodeLangDescription = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].misValueLangDescription = "123456";
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.maccountInfoTypeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.supressInterestStmtFlag = 'Y';
			subsidiaryAccountWrapper.suppressAdviceFlag = 'Y';
			subsidiaryAccountWrapper.suppressOtherCorros = 'Y';
			subsidiaryAccountWrapper.bulkingTranactionFlag = 'Y';
			subsidiaryAccountWrapper.selfReconcileTypeFlag = 'Y';
			subsidiaryAccountWrapper.instrumentTypeFlag = 'Y';
			subsidiaryAccountWrapper.limitMasterNo = "123456";
			subsidiaryAccountWrapper.limitNo = "123456";
			subsidiaryAccountWrapper.multipleLimits = 'Y';
			subsidiaryAccountWrapper.debitInterestPrdCode = "123456";
			subsidiaryAccountWrapper.creditInterestPrdCode = "123456";
			subsidiaryAccountWrapper.debitInterestPrdCodeDescrn = "123456";
			subsidiaryAccountWrapper.creditInterestPrdCodeDescrn = "123456";
			subsidiaryAccountWrapper.drLastAccruedAdjAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.crLastAccruedAdjAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.suppressTab = new Object();

			subsidiaryAccountWrapper.accountTitle = "123456";
			subsidiaryAccountWrapper.taxWaiverWrapper = new SubsidiaryAccountTaxWaiverWrapper[1];
			subsidiaryAccountWrapper.taxWaiverWrapper[0] = new SubsidiaryAccountTaxWaiverWrapper();
			subsidiaryAccountWrapper.taxWaiverWrapper[0].taxCode = "123456";
			subsidiaryAccountWrapper.taxWaiverWrapper[0].taxCodeDescription = "123456";
			subsidiaryAccountWrapper.taxWaiverWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.taxWaiverWrapper[0].waiverExpiryDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.taxWaiverWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.taxWaiverWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.taxWaiverWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.taxWaiverWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper = new NominatedChargeAccountWrapper[1];
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0] = new NominatedChargeAccountWrapper();
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].nominatedChargeAccountNo = "123456";
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].nominatedChargeCurrencyCode = "123456";
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].nominatedAccountDescription = "123456";
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].chargeCode = "123456";
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].chargeCodeDesc = "123456";
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.nominatedChargeAccountWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.taxNomCurrCode = "123456";
			subsidiaryAccountWrapper.taxNomAccountNo = "123456";
			subsidiaryAccountWrapper.taxCtgCode = "123456";
			subsidiaryAccountWrapper.taxCtgCodeDescription = "123456";
			subsidiaryAccountWrapper.maturityDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastTaxApplDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastCondIntApplDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.accountClassCode = "123456";
			subsidiaryAccountWrapper.accountCloseDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.programId = "123456";
			subsidiaryAccountWrapper.accountClosureReason = "123456";
			subsidiaryAccountWrapper.accountOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.advIntIndicator = 'Y';
			subsidiaryAccountWrapper.blockFlag = 'Y';
			subsidiaryAccountWrapper.bulkChargesFlag = 'Y';
			subsidiaryAccountWrapper.bulkExecutionDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.bulkingFrequency = 'Y';
			subsidiaryAccountWrapper.crInterestAccountNo = "123456";
			subsidiaryAccountWrapper.crInterestCurrencyCode = "123456";
			subsidiaryAccountWrapper.crIntIndicatorFlag = 'Y';
			subsidiaryAccountWrapper.drInterestAccountNo = "123456";
			subsidiaryAccountWrapper.drInterestCurrencyCode = "123456";
			subsidiaryAccountWrapper.drIntIndicatorFlag = 'Y';
			subsidiaryAccountWrapper.exchangeControlFlag = 'Y';
			subsidiaryAccountWrapper.exchangeRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.forwardCoverRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.frozenSurrender = 'Y';
			subsidiaryAccountWrapper.interestCode = "123456";
			subsidiaryAccountWrapper.interestStmtIndicatorFlag = 'Y';
			subsidiaryAccountWrapper.masterNo = "123456";
			subsidiaryAccountWrapper.matchingFlag = 'Y';
			subsidiaryAccountWrapper.memoFlag1 = "123456";
			subsidiaryAccountWrapper.memoFlag2 = "123456";
			subsidiaryAccountWrapper.memoFlag3 = "123456";
			subsidiaryAccountWrapper.memoFlag4 = "123456";
			subsidiaryAccountWrapper.memoFlag5 = "123456";
			subsidiaryAccountWrapper.notes1 = "123456";
			subsidiaryAccountWrapper.notes2 = "123456";
			subsidiaryAccountWrapper.notes3 = "123456";
			subsidiaryAccountWrapper.operatingInstruct = "123456";
			subsidiaryAccountWrapper.productCode = "123456";
			subsidiaryAccountWrapper.prppaFlag = 'Y';
			subsidiaryAccountWrapper.refEntriesMarker = 'Y';
			subsidiaryAccountWrapper.rejEntriesMarker = 'Y';
			subsidiaryAccountWrapper.segmentCode = "123456";
			subsidiaryAccountWrapper.shortName = "123456";
			subsidiaryAccountWrapper.userDefinedCode1 = "123456";
			subsidiaryAccountWrapper.userDefinedCode2 = "123456";
			subsidiaryAccountWrapper.userDefinedCode3 = "123456";
			subsidiaryAccountWrapper.userDefinedCode4 = "123456";
			subsidiaryAccountWrapper.userDefinedCode5 = "123456";
			subsidiaryAccountWrapper.userDefinedCode6 = "123456";
			subsidiaryAccountWrapper.userDefinedCode7 = "123456";
			subsidiaryAccountWrapper.userDefinedCode8 = "123456";
			subsidiaryAccountWrapper.userDefinedCode9 = "123456";
			subsidiaryAccountWrapper.userDefinedCode10 = "123456";
			subsidiaryAccountWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapper.currencyCodeDesc = "123456";
			subsidiaryAccountWrapper.masterNoDesc = "123456";
			subsidiaryAccountWrapper.productCodeDesc = "123456";
			subsidiaryAccountWrapper.segmentCodeDesc = "123456";
			subsidiaryAccountWrapper.crInterestCurrencyCodeDesc = "123456";
			subsidiaryAccountWrapper.drInterestCurrencyCodeDesc = "123456";
			subsidiaryAccountWrapper.interestCodeDesc = "123456";
			subsidiaryAccountWrapper.accountClassCodeDesc = "123456";
			subsidiaryAccountWrapper.accountClosureReasonDesc = "123456";
			subsidiaryAccountWrapper.statusFlag = 1;
			subsidiaryAccountWrapper.currencyCode = "123456";
			subsidiaryAccountWrapper.prppaCurrencyCode = "123456";
			subsidiaryAccountWrapper.accountNo = "123456";
			subsidiaryAccountWrapper.prppaAccountNo = "123456";
			subsidiaryAccountWrapper.readyForApproval = 'Y';
			subsidiaryAccountWrapper.checkerDetail = userDetail;
			subsidiaryAccountWrapper.bulkingFrequencyDesc = "123456";
			subsidiaryAccountWrapper.accountBranchDesc = "123456";
			subsidiaryAccountWrapper.accountType = 'Y';
			subsidiaryAccountWrapper.interestInSuspenceFlag = 'Y';
			subsidiaryAccountWrapper.accountNomineeWrapper = new AccountNomineeWrapper[1];
			subsidiaryAccountWrapper.accountNomineeWrapper[0] = new AccountNomineeWrapper();
			subsidiaryAccountWrapper.accountNomineeWrapper[0].addressTypeCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].addressTypeDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].houseTypeCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].houseTypeDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].rentPerAnnum = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountNomineeWrapper[0].flatNo = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].buildingName = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].nearLandmark = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].street = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].locationCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].locationDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].postBox = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].postalCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].cityCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].countryCode = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].address1 = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].address2 = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].state = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].stateDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].attentionParty = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.accountNomineeWrapper[0].addressee = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].cityFullName = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].isMailingAddress = 'Y';
			subsidiaryAccountWrapper.accountNomineeWrapper[0].noYrsCurrentAddress = 1;
			subsidiaryAccountWrapper.accountNomineeWrapper[0].cityName = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].countryName = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].name = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].seqNo = 10;
			subsidiaryAccountWrapper.accountNomineeWrapper[0].streetName = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].telephoneNo = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].locationCodeDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].countryCodeDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].cityCodeDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].relationshipNoDescription = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].addressType = "123456";
			subsidiaryAccountWrapper.accountNomineeWrapper[0].isNomineeRegistered = 'Y';
			subsidiaryAccountWrapper.accountNomineeWrapper[0].lastUpdatedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.accountNomineeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.accountNomineeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.accountNomineeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.accountNomineeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.accountChargeWrapper = new AccountChargeWrapper[1];
			subsidiaryAccountWrapper.accountChargeWrapper[0] = new AccountChargeWrapper();
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargeCode = "123456";
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargesWaivedFlag = 'Y';
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargeOffset = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargePercent = 10.0;
			subsidiaryAccountWrapper.accountChargeWrapper[0].waiverReason = "123456";
			subsidiaryAccountWrapper.accountChargeWrapper[0].reviewDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.accountChargeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapper.accountChargeWrapper[0].discountFlag = 'Y';
			subsidiaryAccountWrapper.accountChargeWrapper[0].systemGeneratedFlag = 'Y';
			subsidiaryAccountWrapper.accountChargeWrapper[0].noOfDiscounts = 10;
			subsidiaryAccountWrapper.accountChargeWrapper[0].availableDiscount = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapper.accountChargeWrapper[0].waiveAllChargeFlag = 'Y';
			subsidiaryAccountWrapper.accountChargeWrapper[0].chargeCodeDescription = "123456";
			subsidiaryAccountWrapper.accountChargeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.accountChargeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.accountChargeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.accountChargeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.currencyCodeArray = new AccountCurrencyWrapper[1];
			subsidiaryAccountWrapper.currencyCodeArray[0] = new AccountCurrencyWrapper();
			subsidiaryAccountWrapper.currencyCodeArray[0].currencyCode = "123456";
			subsidiaryAccountWrapper.currencyCodeArray[0].currencyCodeDesc = "123456";
			subsidiaryAccountWrapper.currencyCodeArray[0].recordStatus = '1';
			subsidiaryAccountWrapper.currencyCodeArray[0].accountNo = "123456";
			subsidiaryAccountWrapper.currencyCodeArray[0].baseAccountNo = "123456";
			subsidiaryAccountWrapper.currencyCodeArray[0].linkPrdCode = "123456";
			subsidiaryAccountWrapper.currencyCodeArray[0].protectedFlag = false;
			subsidiaryAccountWrapper.currencyCodeArray[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.currencyCodeArray[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.currencyCodeArray[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.accountBranch = "123456";
			subsidiaryAccountWrapper.ebswCustSwift = "123456";
			subsidiaryAccountWrapper.isEbswCustSwift = 'Y';
			subsidiaryAccountWrapper.reason = "123456";
			subsidiaryAccountWrapper.templateDescription = "123456";
			subsidiaryAccountWrapper.templateID = "123456";
			subsidiaryAccountWrapper.ucaCode = "123456";
			subsidiaryAccountWrapper.ucaCodeDesc = "123456";
			subsidiaryAccountWrapper.ucaFlag = 'Y';
			subsidiaryAccountWrapper.accountCurrentStatus = 'Y';
			subsidiaryAccountWrapper.accountCategory = 'Y';
			subsidiaryAccountWrapper.utilizeIntrdayLimitFlag = 'Y';
			subsidiaryAccountWrapper.lastCrTrnDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastCrTrnExclSysDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastDrTrnDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastDrTrnExclSysDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.reactiveDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.renewRolloverDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.transToDormantDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.transToUnclaimDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.userLevel = 10;
			subsidiaryAccountWrapper.creditInterestAccrued = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.creditInterestAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.creditManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.crLastAccrualDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.crLastInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.crNextInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.debitInterestAccrued = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.debitInterestAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.debitManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.crNextCompDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.drNextCompDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastcrIntCompoundedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastdrIntCompoundedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.crIntToCompound = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.drIntToCompound = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.calenderAccountOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastCrintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.lastExsintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.lastDrintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pcrintAccruedamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pcrmanualAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pdrmanualAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pdrintAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pcrintAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pdrintAccruedamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.drLastAccrualDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.drLastInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.drNextInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.provisionAdjustmentAmount = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.isIncludedInInterestPooling = 'Y';
			subsidiaryAccountWrapper.oldAccountNumber = "123456";
			subsidiaryAccountWrapper.supressStatementFlag = 'Y';
			subsidiaryAccountWrapper.enqView = 10;
			subsidiaryAccountWrapper.errorMsg = "123456";
			subsidiaryAccountWrapper.interestProductCode = "123456";
			subsidiaryAccountWrapper.interestProductCodeDesc = "123456";
			subsidiaryAccountWrapper.lastOfflineChargesProcessedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.staffFlag = 'Y';
			subsidiaryAccountWrapper.transferPricingRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.extraObject = new Object();

			subsidiaryAccountWrapper.extraObject1 = new Object();

			subsidiaryAccountWrapper.extraObject2 = new Object();

			subsidiaryAccountWrapper.interestEligibilityFlag = 'Y';
			subsidiaryAccountWrapper.crIntAccrForAccrPeriod = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.drIntAccrForAccrPeriod = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.reasonForIntForfeiture = "123456";
			subsidiaryAccountWrapper.chargeProductCodeDesc = "123456";
			subsidiaryAccountWrapper.chargeProductCode = "123456";
			subsidiaryAccountWrapper.conSolStmtFlag = 'Y';
			subsidiaryAccountWrapper.mirrorTrnCurr = "123456";
			subsidiaryAccountWrapper.mirrorTrnAccNo = "123456";
			subsidiaryAccountWrapper.glDepartmentID = "123456";
			subsidiaryAccountWrapper.glDepartmentIDDesc = "123456";
			subsidiaryAccountWrapper.deptCode = "123456";
			subsidiaryAccountWrapper.deptDesc = "123456";
			subsidiaryAccountWrapper.reconCode = "123456";
			subsidiaryAccountWrapper.reconDesc = "123456";
			subsidiaryAccountWrapper.imoCode = "123456";
			subsidiaryAccountWrapper.copyAccountNo = "123456";
			subsidiaryAccountWrapper.checkcomp = 'Y';
			subsidiaryAccountWrapper.autoClose = 'Y';
			subsidiaryAccountWrapper.impairmentflag = 'Y';
			subsidiaryAccountWrapper.chargeOffFlag = 'Y';
			subsidiaryAccountWrapper.cacsIndicator = 'Y';
			subsidiaryAccountWrapper.referralID = "123456";
			subsidiaryAccountWrapper.sourcingID = "123456";
			subsidiaryAccountWrapper.closingID = "123456";
			subsidiaryAccountWrapper.isCorporateMaster = 'Y';
			subsidiaryAccountWrapper.oldProductCode = "123456";
			subsidiaryAccountWrapper.oldMasterNo = "123456";
			subsidiaryAccountWrapper.lastPrdChangeDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.lastMasterChangeDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.channelID = "123456";
			subsidiaryAccountWrapper.originatorMakerDetail = userDetail;
			subsidiaryAccountWrapper.lastCrTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.lastDrTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.lastCrTrnExclTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.lastDrTrnExclTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.relNoForAcctType = "123456";
			subsidiaryAccountWrapper.acctAddressTypeCode = "123456";
			subsidiaryAccountWrapper.relNoForEmail = "123456";
			subsidiaryAccountWrapper.emailContactType = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper = new StatementSetupSummaryWrapper[1];
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0] = new StatementSetupSummaryWrapper();
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].relNo = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].stmtType = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].stmtFrequency = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].addressTypeCode = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].flatNo = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].buildingName = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].street = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].locationDescription = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].postalCode = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].cityName = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].countryName = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].status = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].errorMsg = "123456";
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.statementSetupSummaryWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapper.copyCurrencyCode = "123456";
			subsidiaryAccountWrapper.responseCode = "123456";
			subsidiaryAccountWrapper.responseString = "123456";
			subsidiaryAccountWrapper.relationshipNo = "123456";
			subsidiaryAccountWrapper.referenceNo = "123456";
			subsidiaryAccountWrapper.responseDesc = "123456";
			subsidiaryAccountWrapper.productCategory = 'Y';
			subsidiaryAccountWrapper.provisionStatusFlag = 'Y';
			subsidiaryAccountWrapper.cacsDownReason = 'Y';
			subsidiaryAccountWrapper.tccFlag = 'Y';
			subsidiaryAccountWrapper.lastRiskChangeDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.IBAN = "123456";
			subsidiaryAccountWrapper.autoReorderChqBkFlag = 'Y';
			subsidiaryAccountWrapper.crossDataValidationWrapper = new CrossDataValidationWrapper();
			subsidiaryAccountWrapper.crossDataValidationWrapper.productCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.customerType = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.crAccClsCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.drAccClsCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.unclAccClsCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.gsamAccClsCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.crProductCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.drProductCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.interestRtCls = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.billsLiquidity = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.stdCrProductCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.stdDrProductCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.segCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.interestCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.productCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.customerTypeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.crAccClsCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.drAccClsCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.unclAccClsCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.gsamAccClsCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.crProductCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.drProductCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.interestRtClsDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.billsLiquidityDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.stdCrProductCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.stdDrProductCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.segCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.interestCodeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapper.crossDataValidationWrapper.psglBusinessUnit = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.psglOperatingUnit = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.investmentPurpose = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.psglBusinessUnitDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.psglOperatingUnitDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.investmentPurposeDesc = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.isicCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.affliatedCode = "123456";
			subsidiaryAccountWrapper.crossDataValidationWrapper.isGLvalidationReq = false;
			subsidiaryAccountWrapper.crossDataValidationWrapper.detailWrapper = new CrossDataValidationDetailsWrapper[1];
			subsidiaryAccountWrapper.crossDataValidationWrapper.detailWrapper[0] = new CrossDataValidationDetailsWrapper();
			subsidiaryAccountWrapper.crossDataValidationWrapper.gcaValidate = 'Y';
			subsidiaryAccountWrapper.crossDataValidationWrapper.protectedFlag = false;
			subsidiaryAccountWrapper.crossDataValidationWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapper.crossDataValidationWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.crossDataValidationWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapper.vatCtgCode = "123456";
			subsidiaryAccountWrapper.vccFlag = 'Y';
			subsidiaryAccountWrapper.vatCtgCodeDescription = "123456";
			subsidiaryAccountWrapper.ibankingAllowed = 'Y';
			subsidiaryAccountWrapper.atmAllowed = 'Y';
			subsidiaryAccountWrapper.ivrAllowed = 'Y';
			subsidiaryAccountWrapper.accountTypeVariationInfo = 'Y';
			subsidiaryAccountWrapper.preSafetyLimit = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.mortgageBal = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.pegBal = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.optInStat = 'Y';
			subsidiaryAccountWrapper.daueLimitMasterNo = "123456";
			subsidiaryAccountWrapper.daueLimitNo = "123456";
			subsidiaryAccountWrapper.suspendImpairment = 'Y';
			subsidiaryAccountWrapper.suspendProvision = 'Y';
			subsidiaryAccountWrapper.suspendChargeoff = 'Y';
			subsidiaryAccountWrapper.odClassIntCd = "123456";
			subsidiaryAccountWrapper.odClassIntCdDesc = "123456";
			subsidiaryAccountWrapper.odClassIntPrdCd = "123456";
			subsidiaryAccountWrapper.odClassIntPrdCdDesc = "123456";
			subsidiaryAccountWrapper.defaultOdClassIntCd = "123456";
			subsidiaryAccountWrapper.defaultOdClassIntCdDesc = "123456";
			subsidiaryAccountWrapper.defaultOdClassIntPrdCd = "123456";
			subsidiaryAccountWrapper.defaultOdClassIntPrdCdDesc = "123456";
			subsidiaryAccountWrapper.waiveExcessInterest = 'Y';
			subsidiaryAccountWrapper.crActualInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.drActualInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.promoDebitIntCd = "123456";
			subsidiaryAccountWrapper.promoDebitIntCdDesc = "123456";
			subsidiaryAccountWrapper.promoDebitIntPrdCd = "123456";
			subsidiaryAccountWrapper.promoDebitIntPrdCdDesc = "123456";
			subsidiaryAccountWrapper.promoCreditIntCd = "123456";
			subsidiaryAccountWrapper.promoCreditIntCdDesc = "123456";
			subsidiaryAccountWrapper.promoCreditIntPrdCd = "123456";
			subsidiaryAccountWrapper.promoCreditIntPrdCdDesc = "123456";
			subsidiaryAccountWrapper.manualDrIntFlag = 'Y';
			subsidiaryAccountWrapper.manualCrIntFlag = 'Y';
			subsidiaryAccountWrapper.crSplAccruedInterest = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.crSplSystemAdustedInterest = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.nextCRIntChngDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.nextDBIntChngDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.promoCrIntFlag = "123456";
			subsidiaryAccountWrapper.promoDbIntFlag = "123456";
			subsidiaryAccountWrapper.updateUtilisedLimitAmount = false;
			subsidiaryAccountWrapper.crPromoCode = "123456";
			subsidiaryAccountWrapper.drPromoCode = "123456";
			subsidiaryAccountWrapper.splCrIntPrdCd = "123456";
			subsidiaryAccountWrapper.splDrIntPrdCd = "123456";
			subsidiaryAccountWrapper.splIntIndFlag = 'Y';
			subsidiaryAccountWrapper.reOpenAllowFlag = 'Y';
			subsidiaryAccountWrapper.accountReOpenReason = "123456";
			subsidiaryAccountWrapper.accountReOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.accountTitle2 = "123456";
			subsidiaryAccountWrapper.riskCode_CRES = "123456";
			subsidiaryAccountWrapper.forcePostFlag = 'Y';
			subsidiaryAccountWrapper.intAccProIndicator = 'Y';
			subsidiaryAccountWrapper.valThresholdFlag = 'Y';
			subsidiaryAccountWrapper.skipValidation = false;
			subsidiaryAccountWrapper.profileRole = "123456";
			subsidiaryAccountWrapper.relatedRelationshipNo = "123456";
			subsidiaryAccountWrapper.splOperationMode = "123456";
			subsidiaryAccountWrapper.primaryRelNo = "123456";
			subsidiaryAccountWrapper.ignoreChargeAdvice = 'Y';
			subsidiaryAccountWrapper.extraObject3 = new Object();

			subsidiaryAccountWrapper.interestCodeList = new Object[1];
			subsidiaryAccountWrapper.interestCodeList[0] = new Object();
			subsidiaryAccountWrapper.gstRegistrationNo = "123456";
			subsidiaryAccountWrapper.gstCustomerSpecialStatus = 'Y';
			subsidiaryAccountWrapper.gstCustomerType = 'Y';
			subsidiaryAccountWrapper.gstRegistrationFlag = 'Y';
			subsidiaryAccountWrapper.fatcaCrsExclReason = "123456";
			subsidiaryAccountWrapper.fatcaCrsExclReasonDescription = "123456";
			subsidiaryAccountWrapper.fatcaCrsExclReasonEnable = 'Y';
			subsidiaryAccountWrapper.manualAccountFlag = "123456";
			subsidiaryAccountWrapper.oldrelationshipNo = "123456";
			subsidiaryAccountWrapper.isSwap = false;
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper = new SubsidiaryAccountSCIFATCAWrapper();
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.fatcaDocType = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.fatcaStatus = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.recalStatus = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.approvedExcepFlag = 'Y';
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.comments = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.accountNo = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.currecyCode = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.fatcaDocTypeDesc = "123456";
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.checkerDetail = userDetail;
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.recordStatus = '1';
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.protectedFlag = false;
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.subsidiaryAccountSCIFATCAWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapper.accountCategoryAsString = "123456";
			subsidiaryAccountWrapper.bulkChargesFlagAsString = "123456";
			subsidiaryAccountWrapper.refEntriesMarkerAsString = "123456";
			subsidiaryAccountWrapper.bulkingTranactionFlagAsString = "123456";
			subsidiaryAccountWrapper.provisionStatusFlagAsString = "123456";
			subsidiaryAccountWrapper.selfReconcileTypeFlagAsString = "123456";
			subsidiaryAccountWrapper.impairmentflagAsString = "123456";
			subsidiaryAccountWrapper.suspendProvisionAsString = "123456";
			subsidiaryAccountWrapper.accountCurrentStatusAsString = "123456";
			subsidiaryAccountWrapper.accountTypeAsString = "123456";
			subsidiaryAccountWrapper.multipleLimitsAsString = "123456";
			subsidiaryAccountWrapper.taxApplicableFlag = 'Y';
			subsidiaryAccountWrapper.acInactiveDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.manualAccInputFlag = false;
			subsidiaryAccountWrapper.posCrIntAccuredAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.negCrIntAccuredAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.posCrIntAdjustedAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.negCrIntAdjustedAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.posCrManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.negCrManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapper.isAcctNumEntered = false;
			subsidiaryAccountWrapper.extraObject4 = new Object();

			subsidiaryAccountWrapper.interfaceIndicator = "123456";
			subsidiaryAccountWrapper.selfReconcileFlag = 'Y';
			subsidiaryAccountWrapper.multiCurrency = new ArrayList<>();
			subsidiaryAccountWrapper.currencyPrefix = 'Y';
			subsidiaryAccountWrapper.lastSigUpdateDT = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapper.signaturelevel = 'Y';
			subsidiaryAccountWrapper.multiCurrFlag = 'Y';
			subsidiaryAccountWrapper.gbaFlag = 'Y';
			subsidiaryAccountWrapper.isGbaEnabled = false;
			subsidiaryAccountWrapper.kycGeneralInfoWrapper = new scb.ebbs.ecustomer.wrapper.KYCGeneralInfoWrapper();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.currencyCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.referenceNumber = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.acDealFlag = 'Y';
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.purposeCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.sourceCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.depositTransactionVolumeCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.depositAmountVolumeCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.withdrawalTransactionVolumeCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.withdrawalAmountVolumeCode = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.kycComplete = 'Y';
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.checkerDetail = userDetail;
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.statusFlag = 1;
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.reason = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.certificateIssued = 'Y';
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.certificateHeld = "123456";
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.kycBeneficialOwnerWrapper = new scb.ebbs.ecustomer.wrapper.KYCBeneficialOwnerWrapper[1];
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.kycBeneficialOwnerWrapper[0] = new scb.ebbs.ecustomer.wrapper.KYCBeneficialOwnerWrapper();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.kycPartyRelationshipWrapper = new scb.ebbs.ecustomer.wrapper.KYCPartyRelationshipWrapper[1];
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.kycPartyRelationshipWrapper[0] = new scb.ebbs.ecustomer.wrapper.KYCPartyRelationshipWrapper();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.assignedAddProofWrapper = new ListWrapper[1];
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.assignedAddProofWrapper[0] = new ListWrapper();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.unassignedAddProofWrapper = new ListWrapper[1];
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.unassignedAddProofWrapper[0] = new ListWrapper();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.riskReviewFlag = 'Y';
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.protectedFlag = false;
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.kycGeneralInfoWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapper.txnAccountAdditionalDetails = new TransactionAccountAddlDtlsWrapper();
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.armCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.bfsFlag = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.splPrdFlag = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.entityCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.repatriableFlag = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.prdCategory = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.iBanNo = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.corporateFlag = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.relationshipNo = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.relationshipType = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.fullName = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.customerSegmentCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.institutionClassCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.isicCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.residentStatus = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.srvIndicatorCode = "123456";
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.protectedFlag = false;
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.authorisationLevel = '1';
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.txnAccountAdditionalDetails.historyCaptureRequired = false;

			subsidiaryAccountWrapper.mode = "123456";
			subsidiaryAccountWrapper.protectedFlag = false;
			subsidiaryAccountWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapper.historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setSubsidiaryAccountWrapper()");
		}

	}

	public static void setCrossDataValidationWrapper() { 
		try {
			crossDataValidationWrapper = new CrossDataValidationWrapper();
			crossDataValidationWrapper.productCode = "123456";
			crossDataValidationWrapper.customerType = "123456";
			crossDataValidationWrapper.crAccClsCode = "123456";
			crossDataValidationWrapper.drAccClsCode = "123456";
			crossDataValidationWrapper.unclAccClsCode = "123456";
			crossDataValidationWrapper.gsamAccClsCode = "123456";
			crossDataValidationWrapper.crProductCode = "123456";
			crossDataValidationWrapper.drProductCode = "123456";
			crossDataValidationWrapper.interestRtCls = "123456";
			crossDataValidationWrapper.billsLiquidity = "123456";
			crossDataValidationWrapper.stdCrProductCode = "123456";
			crossDataValidationWrapper.stdDrProductCode = "123456";
			crossDataValidationWrapper.segCode = "123456";
			crossDataValidationWrapper.interestCode = "123456";
			crossDataValidationWrapper.productCodeDesc = "123456";
			crossDataValidationWrapper.customerTypeDesc = "123456";
			crossDataValidationWrapper.crAccClsCodeDesc = "123456";
			crossDataValidationWrapper.drAccClsCodeDesc = "123456";
			crossDataValidationWrapper.unclAccClsCodeDesc = "123456";
			crossDataValidationWrapper.gsamAccClsCodeDesc = "123456";
			crossDataValidationWrapper.crProductCodeDesc = "123456";
			crossDataValidationWrapper.drProductCodeDesc = "123456";
			crossDataValidationWrapper.interestRtClsDesc = "123456";
			crossDataValidationWrapper.billsLiquidityDesc = "123456";
			crossDataValidationWrapper.stdCrProductCodeDesc = "123456";
			crossDataValidationWrapper.stdDrProductCodeDesc = "123456";
			crossDataValidationWrapper.segCodeDesc = "123456";
			crossDataValidationWrapper.interestCodeDesc = "123456";
			crossDataValidationWrapper.makerDetail = userDetail;
			crossDataValidationWrapper.psglBusinessUnit = "123456";
			crossDataValidationWrapper.psglOperatingUnit = "123456";
			crossDataValidationWrapper.investmentPurpose = "123456";
			crossDataValidationWrapper.psglBusinessUnitDesc = "123456";
			crossDataValidationWrapper.psglOperatingUnitDesc = "123456";
			crossDataValidationWrapper.investmentPurposeDesc = "123456";
			crossDataValidationWrapper.isicCode = "123456";
			crossDataValidationWrapper.affliatedCode = "123456";
			crossDataValidationWrapper.isGLvalidationReq = false;
			crossDataValidationWrapper.detailWrapper = new CrossDataValidationDetailsWrapper[1];
			crossDataValidationWrapper.detailWrapper[0] = new CrossDataValidationDetailsWrapper();
			crossDataValidationWrapper.detailWrapper[0].interestCode = "123456";
			crossDataValidationWrapper.detailWrapper[0].interestCodeDescription = "123456";
			crossDataValidationWrapper.detailWrapper[0].recordStatusFlag = "123456";
			crossDataValidationWrapper.detailWrapper[0].isDefault = 'Y';
			crossDataValidationWrapper.detailWrapper[0].recordStatus = '1';
			crossDataValidationWrapper.detailWrapper[0].protectedFlag = false;
			crossDataValidationWrapper.detailWrapper[0].authorisationLevel = '1';
			crossDataValidationWrapper.detailWrapper[0].languageComponentHash = new Vector<>();
			crossDataValidationWrapper.detailWrapper[0].historyCaptureRequired = false;
			crossDataValidationWrapper.gcaValidate = 'Y';
			crossDataValidationWrapper.protectedFlag = false;
			crossDataValidationWrapper.authorisationLevel = '1';
			crossDataValidationWrapper.languageComponentHash = new Vector<>();
			crossDataValidationWrapper.historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setCrossDataValidationWrapper()");
		}

	}

	public static void setNominatedChargeAccountWrapperArr() { 
		try {
			nominatedChargeAccountWrapperArr = new NominatedChargeAccountWrapper[1];
			nominatedChargeAccountWrapperArr[0] = new NominatedChargeAccountWrapper();
			nominatedChargeAccountWrapperArr[0].nominatedChargeAccountNo = "123456";
			nominatedChargeAccountWrapperArr[0].nominatedChargeCurrencyCode = "123456";
			nominatedChargeAccountWrapperArr[0].nominatedAccountDescription = "123456";
			nominatedChargeAccountWrapperArr[0].chargeCode = "123456";
			nominatedChargeAccountWrapperArr[0].chargeCodeDesc = "123456";
			nominatedChargeAccountWrapperArr[0].recordStatus = '1';
			nominatedChargeAccountWrapperArr[0].chargeGroupFlag = 'Y';
			nominatedChargeAccountWrapperArr[0].protectedFlag = false;
			nominatedChargeAccountWrapperArr[0].authorisationLevel = '1';
			nominatedChargeAccountWrapperArr[0].languageComponentHash = new Vector<>();
			nominatedChargeAccountWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setNominatedChargeAccountWrapperArr()");
		}

	}

	public static void setCustomerLinkWrapperArr() { 
		try {
			customerLinkWrapperArr = new CustomerLinkWrapper[1];
			customerLinkWrapperArr[0] = new CustomerLinkWrapper();
			customerLinkWrapperArr[0].currencyCode = "123456";
			customerLinkWrapperArr[0].accountNo = "123456";
			customerLinkWrapperArr[0].relationshipTypeCode = "123456";
			customerLinkWrapperArr[0].relationshipNo = "123456";
			customerLinkWrapperArr[0].recordStatus = 1;
			customerLinkWrapperArr[0].relationshipDescription = "123456";
			customerLinkWrapperArr[0].relationshipTypeCodeDescription = "123456";
			customerLinkWrapperArr[0].attachedDate = new Date(System.currentTimeMillis());
			customerLinkWrapperArr[0].primaryMasterNo = "123456";
			customerLinkWrapperArr[0].protectedFlag = false;
			customerLinkWrapperArr[0].authorisationLevel = '1';
			customerLinkWrapperArr[0].languageComponentHash = new Vector<>();
			customerLinkWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setCustomerLinkWrapperArr()");
		}

	}

	public static void setSubsidiaryAccountWrapperArr() { 
		try {
			subsidiaryAccountWrapperArr = new scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper[1];
			subsidiaryAccountWrapperArr[0] = new scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper();
			subsidiaryAccountWrapperArr[0].accountStructure = "123456";
			subsidiaryAccountWrapperArr[0].seqNo1 = "123456";
			subsidiaryAccountWrapperArr[0].seqNo2 = "123456";
			subsidiaryAccountWrapperArr[0].seqNo3 = "123456";
			subsidiaryAccountWrapperArr[0].seqNo4 = "123456";
			subsidiaryAccountWrapperArr[0].seqNo5 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper = new AccountLinksWrapper[1];
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0] = new AccountLinksWrapper();
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo = 10;
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].productCode = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].templateId = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].branchCode = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].accountType = 'Y';
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].productDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].currencyDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].accountNoDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].templateIdDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].branchCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].accountTypeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].masterNumber = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].linkTemplateId = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo1 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo2 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo3 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo4 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].seqNo5 = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].accountBalance = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].makerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].checkerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].accountLinksWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].customerLinkWrapper = new CustomerLinkWrapper[1];
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0] = new CustomerLinkWrapper();
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].relationshipTypeCode = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].recordStatus = 1;
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].relationshipDescription = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].relationshipTypeCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].attachedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].primaryMasterNo = "123456";
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].customerLinkWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper = new AccountOfflineChargeWrapper[1];
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0] = new AccountOfflineChargeWrapper();
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].code = "123456";
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].description = "123456";
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].nextExecDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].recordStatus = 1;
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].accountOfflineChargeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper = new GenericInfoTypeWrapper[1];
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0] = new GenericInfoTypeWrapper();
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misCode = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].length = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].minRange = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].validate = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].componentType = 10;
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].format = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misValue = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misValueDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].seqNo = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].programId = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misCodeLangDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].misValueLangDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].accountInfoTypeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper = new GenericInfoTypeWrapper[1];
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0] = new GenericInfoTypeWrapper();
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misCode = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].length = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].minRange = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].validate = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].componentType = 10;
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].format = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misValue = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misValueDescription = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].seqNo = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].programId = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misCodeLangDescription = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].misValueLangDescription = "123456";
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].maccountInfoTypeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].supressInterestStmtFlag = 'Y';
			subsidiaryAccountWrapperArr[0].suppressAdviceFlag = 'Y';
			subsidiaryAccountWrapperArr[0].suppressOtherCorros = 'Y';
			subsidiaryAccountWrapperArr[0].bulkingTranactionFlag = 'Y';
			subsidiaryAccountWrapperArr[0].selfReconcileTypeFlag = 'Y';
			subsidiaryAccountWrapperArr[0].instrumentTypeFlag = 'Y';
			subsidiaryAccountWrapperArr[0].limitMasterNo = "123456";
			subsidiaryAccountWrapperArr[0].limitNo = "123456";
			subsidiaryAccountWrapperArr[0].multipleLimits = 'Y';
			subsidiaryAccountWrapperArr[0].debitInterestPrdCode = "123456";
			subsidiaryAccountWrapperArr[0].creditInterestPrdCode = "123456";
			subsidiaryAccountWrapperArr[0].debitInterestPrdCodeDescrn = "123456";
			subsidiaryAccountWrapperArr[0].creditInterestPrdCodeDescrn = "123456";
			subsidiaryAccountWrapperArr[0].drLastAccruedAdjAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].crLastAccruedAdjAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].suppressTab = new Object();

			subsidiaryAccountWrapperArr[0].accountTitle = "123456";
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper = new SubsidiaryAccountTaxWaiverWrapper[1];
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0] = new SubsidiaryAccountTaxWaiverWrapper();
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].taxCode = "123456";
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].taxCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].waiverExpiryDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].taxWaiverWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper = new NominatedChargeAccountWrapper[1];
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0] = new NominatedChargeAccountWrapper();
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].nominatedChargeAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].nominatedChargeCurrencyCode = "123456";
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].nominatedAccountDescription = "123456";
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].chargeCode = "123456";
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].chargeCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].nominatedChargeAccountWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].taxNomCurrCode = "123456";
			subsidiaryAccountWrapperArr[0].taxNomAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].taxCtgCode = "123456";
			subsidiaryAccountWrapperArr[0].taxCtgCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].maturityDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastTaxApplDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastCondIntApplDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].accountClassCode = "123456";
			subsidiaryAccountWrapperArr[0].accountCloseDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].programId = "123456";
			subsidiaryAccountWrapperArr[0].accountClosureReason = "123456";
			subsidiaryAccountWrapperArr[0].accountOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].advIntIndicator = 'Y';
			subsidiaryAccountWrapperArr[0].blockFlag = 'Y';
			subsidiaryAccountWrapperArr[0].bulkChargesFlag = 'Y';
			subsidiaryAccountWrapperArr[0].bulkExecutionDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].bulkingFrequency = 'Y';
			subsidiaryAccountWrapperArr[0].crInterestAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].crInterestCurrencyCode = "123456";
			subsidiaryAccountWrapperArr[0].crIntIndicatorFlag = 'Y';
			subsidiaryAccountWrapperArr[0].drInterestAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].drInterestCurrencyCode = "123456";
			subsidiaryAccountWrapperArr[0].drIntIndicatorFlag = 'Y';
			subsidiaryAccountWrapperArr[0].exchangeControlFlag = 'Y';
			subsidiaryAccountWrapperArr[0].exchangeRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].forwardCoverRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].frozenSurrender = 'Y';
			subsidiaryAccountWrapperArr[0].interestCode = "123456";
			subsidiaryAccountWrapperArr[0].interestStmtIndicatorFlag = 'Y';
			subsidiaryAccountWrapperArr[0].masterNo = "123456";
			subsidiaryAccountWrapperArr[0].matchingFlag = 'Y';
			subsidiaryAccountWrapperArr[0].memoFlag1 = "123456";
			subsidiaryAccountWrapperArr[0].memoFlag2 = "123456";
			subsidiaryAccountWrapperArr[0].memoFlag3 = "123456";
			subsidiaryAccountWrapperArr[0].memoFlag4 = "123456";
			subsidiaryAccountWrapperArr[0].memoFlag5 = "123456";
			subsidiaryAccountWrapperArr[0].notes1 = "123456";
			subsidiaryAccountWrapperArr[0].notes2 = "123456";
			subsidiaryAccountWrapperArr[0].notes3 = "123456";
			subsidiaryAccountWrapperArr[0].operatingInstruct = "123456";
			subsidiaryAccountWrapperArr[0].productCode = "123456";
			subsidiaryAccountWrapperArr[0].prppaFlag = 'Y';
			subsidiaryAccountWrapperArr[0].refEntriesMarker = 'Y';
			subsidiaryAccountWrapperArr[0].rejEntriesMarker = 'Y';
			subsidiaryAccountWrapperArr[0].segmentCode = "123456";
			subsidiaryAccountWrapperArr[0].shortName = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode1 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode2 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode3 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode4 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode5 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode6 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode7 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode8 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode9 = "123456";
			subsidiaryAccountWrapperArr[0].userDefinedCode10 = "123456";
			subsidiaryAccountWrapperArr[0].makerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].currencyCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].masterNoDesc = "123456";
			subsidiaryAccountWrapperArr[0].productCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].segmentCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crInterestCurrencyCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].drInterestCurrencyCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].interestCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].accountClassCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].accountClosureReasonDesc = "123456";
			subsidiaryAccountWrapperArr[0].statusFlag = 1;
			subsidiaryAccountWrapperArr[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].prppaCurrencyCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNo = "123456";
			subsidiaryAccountWrapperArr[0].prppaAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].readyForApproval = 'Y';
			subsidiaryAccountWrapperArr[0].checkerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].bulkingFrequencyDesc = "123456";
			subsidiaryAccountWrapperArr[0].accountBranchDesc = "123456";
			subsidiaryAccountWrapperArr[0].accountType = 'Y';
			subsidiaryAccountWrapperArr[0].interestInSuspenceFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper = new AccountNomineeWrapper[1];
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0] = new AccountNomineeWrapper();
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].addressTypeCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].addressTypeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].houseTypeCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].houseTypeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].rentPerAnnum = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].flatNo = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].buildingName = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].nearLandmark = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].street = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].locationCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].locationDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].postBox = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].postalCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].cityCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].countryCode = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].address1 = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].address2 = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].state = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].stateDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].attentionParty = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].addressee = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].cityFullName = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].isMailingAddress = 'Y';
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].noYrsCurrentAddress = 1;
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].cityName = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].countryName = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].relationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].name = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].seqNo = 10;
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].streetName = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].telephoneNo = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].locationCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].countryCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].cityCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].relationshipNoDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].addressType = "123456";
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].isNomineeRegistered = 'Y';
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].lastUpdatedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].accountNomineeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].accountChargeWrapper = new AccountChargeWrapper[1];
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0] = new AccountChargeWrapper();
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargeCode = "123456";
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargesWaivedFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargeOffset = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargePercent = 10.0;
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].waiverReason = "123456";
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].reviewDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].discountFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].systemGeneratedFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].noOfDiscounts = 10;
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].availableDiscount = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargeGroupFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].waiveAllChargeFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].chargeCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].accountChargeWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].currencyCodeArray = new AccountCurrencyWrapper[1];
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0] = new AccountCurrencyWrapper();
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].currencyCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].recordStatus = '1';
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].accountNo = "123456";
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].baseAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].linkPrdCode = "123456";
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].currencyCodeArray[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].accountBranch = "123456";
			subsidiaryAccountWrapperArr[0].ebswCustSwift = "123456";
			subsidiaryAccountWrapperArr[0].isEbswCustSwift = 'Y';
			subsidiaryAccountWrapperArr[0].reason = "123456";
			subsidiaryAccountWrapperArr[0].templateDescription = "123456";
			subsidiaryAccountWrapperArr[0].templateID = "123456";
			subsidiaryAccountWrapperArr[0].ucaCode = "123456";
			subsidiaryAccountWrapperArr[0].ucaCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].ucaFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountCurrentStatus = 'Y';
			subsidiaryAccountWrapperArr[0].accountCategory = 'Y';
			subsidiaryAccountWrapperArr[0].utilizeIntrdayLimitFlag = 'Y';
			subsidiaryAccountWrapperArr[0].lastCrTrnDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastCrTrnExclSysDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastDrTrnDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastDrTrnExclSysDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].reactiveDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].renewRolloverDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].transToDormantDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].transToUnclaimDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].userLevel = 10;
			subsidiaryAccountWrapperArr[0].creditInterestAccrued = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].creditInterestAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].creditManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].crLastAccrualDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].crLastInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].crNextInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].debitInterestAccrued = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].debitInterestAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].debitManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].crNextCompDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].drNextCompDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastcrIntCompoundedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastdrIntCompoundedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].crIntToCompound = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].drIntToCompound = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].calenderAccountOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastCrintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].lastExsintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].lastDrintRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pcrintAccruedamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pcrmanualAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pdrmanualAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pdrintAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pcrintAdjamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pdrintAccruedamt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].drLastAccrualDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].drLastInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].drNextInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].provisionAdjustmentAmount = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].isIncludedInInterestPooling = 'Y';
			subsidiaryAccountWrapperArr[0].oldAccountNumber = "123456";
			subsidiaryAccountWrapperArr[0].supressStatementFlag = 'Y';
			subsidiaryAccountWrapperArr[0].enqView = 10;
			subsidiaryAccountWrapperArr[0].errorMsg = "123456";
			subsidiaryAccountWrapperArr[0].interestProductCode = "123456";
			subsidiaryAccountWrapperArr[0].interestProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].lastOfflineChargesProcessedDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].staffFlag = 'Y';
			subsidiaryAccountWrapperArr[0].transferPricingRate = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].extraObject = new Object();

			subsidiaryAccountWrapperArr[0].extraObject1 = new Object();

			subsidiaryAccountWrapperArr[0].extraObject2 = new Object();

			subsidiaryAccountWrapperArr[0].interestEligibilityFlag = 'Y';
			subsidiaryAccountWrapperArr[0].crIntAccrForAccrPeriod = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].drIntAccrForAccrPeriod = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].reasonForIntForfeiture = "123456";
			subsidiaryAccountWrapperArr[0].chargeProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].chargeProductCode = "123456";
			subsidiaryAccountWrapperArr[0].conSolStmtFlag = 'Y';
			subsidiaryAccountWrapperArr[0].mirrorTrnCurr = "123456";
			subsidiaryAccountWrapperArr[0].mirrorTrnAccNo = "123456";
			subsidiaryAccountWrapperArr[0].glDepartmentID = "123456";
			subsidiaryAccountWrapperArr[0].glDepartmentIDDesc = "123456";
			subsidiaryAccountWrapperArr[0].deptCode = "123456";
			subsidiaryAccountWrapperArr[0].deptDesc = "123456";
			subsidiaryAccountWrapperArr[0].reconCode = "123456";
			subsidiaryAccountWrapperArr[0].reconDesc = "123456";
			subsidiaryAccountWrapperArr[0].imoCode = "123456";
			subsidiaryAccountWrapperArr[0].copyAccountNo = "123456";
			subsidiaryAccountWrapperArr[0].checkcomp = 'Y';
			subsidiaryAccountWrapperArr[0].autoClose = 'Y';
			subsidiaryAccountWrapperArr[0].impairmentflag = 'Y';
			subsidiaryAccountWrapperArr[0].chargeOffFlag = 'Y';
			subsidiaryAccountWrapperArr[0].cacsIndicator = 'Y';
			subsidiaryAccountWrapperArr[0].referralID = "123456";
			subsidiaryAccountWrapperArr[0].sourcingID = "123456";
			subsidiaryAccountWrapperArr[0].closingID = "123456";
			subsidiaryAccountWrapperArr[0].isCorporateMaster = 'Y';
			subsidiaryAccountWrapperArr[0].oldProductCode = "123456";
			subsidiaryAccountWrapperArr[0].oldMasterNo = "123456";
			subsidiaryAccountWrapperArr[0].lastPrdChangeDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].lastMasterChangeDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].channelID = "123456";
			subsidiaryAccountWrapperArr[0].originatorMakerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].lastCrTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].lastDrTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].lastCrTrnExclTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].lastDrTrnExclTrnAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].relNoForAcctType = "123456";
			subsidiaryAccountWrapperArr[0].acctAddressTypeCode = "123456";
			subsidiaryAccountWrapperArr[0].relNoForEmail = "123456";
			subsidiaryAccountWrapperArr[0].emailContactType = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper = new StatementSetupSummaryWrapper[1];
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0] = new StatementSetupSummaryWrapper();
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].relNo = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].accountNo = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].stmtType = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].stmtFrequency = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].addressTypeCode = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].flatNo = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].buildingName = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].street = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].locationDescription = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].postalCode = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].cityName = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].countryName = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].status = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].errorMsg = "123456";
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].statementSetupSummaryWrapper[0].historyCaptureRequired = false;
			subsidiaryAccountWrapperArr[0].copyCurrencyCode = "123456";
			subsidiaryAccountWrapperArr[0].responseCode = "123456";
			subsidiaryAccountWrapperArr[0].responseString = "123456";
			subsidiaryAccountWrapperArr[0].relationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].referenceNo = "123456";
			subsidiaryAccountWrapperArr[0].responseDesc = "123456";
			subsidiaryAccountWrapperArr[0].productCategory = 'Y';
			subsidiaryAccountWrapperArr[0].provisionStatusFlag = 'Y';
			subsidiaryAccountWrapperArr[0].cacsDownReason = 'Y';
			subsidiaryAccountWrapperArr[0].tccFlag = 'Y';
			subsidiaryAccountWrapperArr[0].lastRiskChangeDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].IBAN = "123456";
			subsidiaryAccountWrapperArr[0].autoReorderChqBkFlag = 'Y';
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper = new CrossDataValidationWrapper();
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.productCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.customerType = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.crAccClsCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.drAccClsCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.unclAccClsCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.gsamAccClsCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.crProductCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.drProductCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.interestRtCls = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.billsLiquidity = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.stdCrProductCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.stdDrProductCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.segCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.interestCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.productCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.customerTypeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.crAccClsCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.drAccClsCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.unclAccClsCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.gsamAccClsCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.crProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.drProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.interestRtClsDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.billsLiquidityDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.stdCrProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.stdDrProductCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.segCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.interestCodeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.psglBusinessUnit = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.psglOperatingUnit = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.investmentPurpose = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.psglBusinessUnitDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.psglOperatingUnitDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.investmentPurposeDesc = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.isicCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.affliatedCode = "123456";
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.isGLvalidationReq = false;
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.detailWrapper = new CrossDataValidationDetailsWrapper[1];
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.detailWrapper[0] = new CrossDataValidationDetailsWrapper();
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.gcaValidate = 'Y';
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.protectedFlag = false;
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].crossDataValidationWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapperArr[0].vatCtgCode = "123456";
			subsidiaryAccountWrapperArr[0].vccFlag = 'Y';
			subsidiaryAccountWrapperArr[0].vatCtgCodeDescription = "123456";
			subsidiaryAccountWrapperArr[0].ibankingAllowed = 'Y';
			subsidiaryAccountWrapperArr[0].atmAllowed = 'Y';
			subsidiaryAccountWrapperArr[0].ivrAllowed = 'Y';
			subsidiaryAccountWrapperArr[0].accountTypeVariationInfo = 'Y';
			subsidiaryAccountWrapperArr[0].preSafetyLimit = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].mortgageBal = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].pegBal = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].optInStat = 'Y';
			subsidiaryAccountWrapperArr[0].daueLimitMasterNo = "123456";
			subsidiaryAccountWrapperArr[0].daueLimitNo = "123456";
			subsidiaryAccountWrapperArr[0].suspendImpairment = 'Y';
			subsidiaryAccountWrapperArr[0].suspendProvision = 'Y';
			subsidiaryAccountWrapperArr[0].suspendChargeoff = 'Y';
			subsidiaryAccountWrapperArr[0].odClassIntCd = "123456";
			subsidiaryAccountWrapperArr[0].odClassIntCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].odClassIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].odClassIntPrdCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].defaultOdClassIntCd = "123456";
			subsidiaryAccountWrapperArr[0].defaultOdClassIntCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].defaultOdClassIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].defaultOdClassIntPrdCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].waiveExcessInterest = 'Y';
			subsidiaryAccountWrapperArr[0].crActualInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].drActualInterestPaymentDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].promoDebitIntCd = "123456";
			subsidiaryAccountWrapperArr[0].promoDebitIntCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].promoDebitIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].promoDebitIntPrdCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].promoCreditIntCd = "123456";
			subsidiaryAccountWrapperArr[0].promoCreditIntCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].promoCreditIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].promoCreditIntPrdCdDesc = "123456";
			subsidiaryAccountWrapperArr[0].manualDrIntFlag = 'Y';
			subsidiaryAccountWrapperArr[0].manualCrIntFlag = 'Y';
			subsidiaryAccountWrapperArr[0].crSplAccruedInterest = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].crSplSystemAdustedInterest = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].nextCRIntChngDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].nextDBIntChngDt = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].promoCrIntFlag = "123456";
			subsidiaryAccountWrapperArr[0].promoDbIntFlag = "123456";
			subsidiaryAccountWrapperArr[0].updateUtilisedLimitAmount = false;
			subsidiaryAccountWrapperArr[0].crPromoCode = "123456";
			subsidiaryAccountWrapperArr[0].drPromoCode = "123456";
			subsidiaryAccountWrapperArr[0].splCrIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].splDrIntPrdCd = "123456";
			subsidiaryAccountWrapperArr[0].splIntIndFlag = 'Y';
			subsidiaryAccountWrapperArr[0].reOpenAllowFlag = 'Y';
			subsidiaryAccountWrapperArr[0].accountReOpenReason = "123456";
			subsidiaryAccountWrapperArr[0].accountReOpenDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].accountTitle2 = "123456";
			subsidiaryAccountWrapperArr[0].riskCode_CRES = "123456";
			subsidiaryAccountWrapperArr[0].forcePostFlag = 'Y';
			subsidiaryAccountWrapperArr[0].intAccProIndicator = 'Y';
			subsidiaryAccountWrapperArr[0].valThresholdFlag = 'Y';
			subsidiaryAccountWrapperArr[0].skipValidation = false;
			subsidiaryAccountWrapperArr[0].profileRole = "123456";
			subsidiaryAccountWrapperArr[0].relatedRelationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].splOperationMode = "123456";
			subsidiaryAccountWrapperArr[0].primaryRelNo = "123456";
			subsidiaryAccountWrapperArr[0].ignoreChargeAdvice = 'Y';
			subsidiaryAccountWrapperArr[0].extraObject3 = new Object();

			subsidiaryAccountWrapperArr[0].interestCodeList = new Object[1];
			subsidiaryAccountWrapperArr[0].interestCodeList[0] = new Object();
			subsidiaryAccountWrapperArr[0].gstRegistrationNo = "123456";
			subsidiaryAccountWrapperArr[0].gstCustomerSpecialStatus = 'Y';
			subsidiaryAccountWrapperArr[0].gstCustomerType = 'Y';
			subsidiaryAccountWrapperArr[0].gstRegistrationFlag = 'Y';
			subsidiaryAccountWrapperArr[0].fatcaCrsExclReason = "123456";
			subsidiaryAccountWrapperArr[0].fatcaCrsExclReasonDescription = "123456";
			subsidiaryAccountWrapperArr[0].fatcaCrsExclReasonEnable = 'Y';
			subsidiaryAccountWrapperArr[0].manualAccountFlag = "123456";
			subsidiaryAccountWrapperArr[0].oldrelationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].isSwap = false;
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper = new SubsidiaryAccountSCIFATCAWrapper();
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.fatcaDocType = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.fatcaStatus = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.recalStatus = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.approvedExcepFlag = 'Y';
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.comments = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.accountNo = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.currecyCode = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.fatcaDocTypeDesc = "123456";
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.checkerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.recordStatus = '1';
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.protectedFlag = false;
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].subsidiaryAccountSCIFATCAWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapperArr[0].accountCategoryAsString = "123456";
			subsidiaryAccountWrapperArr[0].bulkChargesFlagAsString = "123456";
			subsidiaryAccountWrapperArr[0].refEntriesMarkerAsString = "123456";
			subsidiaryAccountWrapperArr[0].bulkingTranactionFlagAsString = "123456";
			subsidiaryAccountWrapperArr[0].provisionStatusFlagAsString = "123456";
			subsidiaryAccountWrapperArr[0].selfReconcileTypeFlagAsString = "123456";
			subsidiaryAccountWrapperArr[0].impairmentflagAsString = "123456";
			subsidiaryAccountWrapperArr[0].suspendProvisionAsString = "123456";
			subsidiaryAccountWrapperArr[0].accountCurrentStatusAsString = "123456";
			subsidiaryAccountWrapperArr[0].accountTypeAsString = "123456";
			subsidiaryAccountWrapperArr[0].multipleLimitsAsString = "123456";
			subsidiaryAccountWrapperArr[0].taxApplicableFlag = 'Y';
			subsidiaryAccountWrapperArr[0].acInactiveDate = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].manualAccInputFlag = false;
			subsidiaryAccountWrapperArr[0].posCrIntAccuredAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].negCrIntAccuredAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].posCrIntAdjustedAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].negCrIntAdjustedAmt = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].posCrManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].negCrManualAdjustment = BigDecimal.valueOf(10);
			subsidiaryAccountWrapperArr[0].isAcctNumEntered = false;
			subsidiaryAccountWrapperArr[0].extraObject4 = new Object();

			subsidiaryAccountWrapperArr[0].interfaceIndicator = "123456";
			subsidiaryAccountWrapperArr[0].selfReconcileFlag = 'Y';
			subsidiaryAccountWrapperArr[0].multiCurrency = new ArrayList<>();
			subsidiaryAccountWrapperArr[0].currencyPrefix = 'Y';
			subsidiaryAccountWrapperArr[0].lastSigUpdateDT = new Date(System.currentTimeMillis());
			subsidiaryAccountWrapperArr[0].signaturelevel = 'Y';
			subsidiaryAccountWrapperArr[0].multiCurrFlag = 'Y';
			subsidiaryAccountWrapperArr[0].gbaFlag = 'Y';
			subsidiaryAccountWrapperArr[0].isGbaEnabled = false;
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper = new scb.ebbs.ecustomer.wrapper.KYCGeneralInfoWrapper();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.currencyCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.referenceNumber = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.acDealFlag = 'Y';
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.purposeCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.sourceCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.depositTransactionVolumeCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.depositAmountVolumeCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.withdrawalTransactionVolumeCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.withdrawalAmountVolumeCode = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.kycComplete = 'Y';
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.makerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.checkerDetail = userDetail;
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.statusFlag = 1;
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.reason = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.certificateIssued = 'Y';
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.certificateHeld = "123456";
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.kycBeneficialOwnerWrapper = new scb.ebbs.ecustomer.wrapper.KYCBeneficialOwnerWrapper[1];
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.kycBeneficialOwnerWrapper[0] = new scb.ebbs.ecustomer.wrapper.KYCBeneficialOwnerWrapper();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.kycPartyRelationshipWrapper = new scb.ebbs.ecustomer.wrapper.KYCPartyRelationshipWrapper[1];
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.kycPartyRelationshipWrapper[0] = new scb.ebbs.ecustomer.wrapper.KYCPartyRelationshipWrapper();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.assignedAddProofWrapper = new ListWrapper[1];
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.assignedAddProofWrapper[0] = new ListWrapper();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.unassignedAddProofWrapper = new ListWrapper[1];
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.unassignedAddProofWrapper[0] = new ListWrapper();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.riskReviewFlag = 'Y';
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.protectedFlag = false;
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].kycGeneralInfoWrapper.historyCaptureRequired = false;

			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails = new TransactionAccountAddlDtlsWrapper();
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.armCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.bfsFlag = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.splPrdFlag = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.entityCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.repatriableFlag = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.prdCategory = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.iBanNo = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.corporateFlag = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.relationshipNo = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.relationshipType = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.fullName = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.customerSegmentCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.institutionClassCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.isicCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.residentStatus = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.srvIndicatorCode = "123456";
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.protectedFlag = false;
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].txnAccountAdditionalDetails.historyCaptureRequired = false;

			subsidiaryAccountWrapperArr[0].mode = "123456";
			subsidiaryAccountWrapperArr[0].protectedFlag = false;
			subsidiaryAccountWrapperArr[0].authorisationLevel = '1';
			subsidiaryAccountWrapperArr[0].languageComponentHash = new Vector<>();
			subsidiaryAccountWrapperArr[0].historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setSubsidiaryAccountWrapperArr()");
		}

	}

	public static void setNominatedChargeAccountWrapper() { 
		try {
			nominatedChargeAccountWrapper = new NominatedChargeAccountWrapper();
			nominatedChargeAccountWrapper.nominatedChargeAccountNo = "123456";
			nominatedChargeAccountWrapper.nominatedChargeCurrencyCode = "123456";
			nominatedChargeAccountWrapper.nominatedAccountDescription = "123456";
			nominatedChargeAccountWrapper.chargeCode = "123456";
			nominatedChargeAccountWrapper.chargeCodeDesc = "123456";
			nominatedChargeAccountWrapper.recordStatus = '1';
			nominatedChargeAccountWrapper.chargeGroupFlag = 'Y';
			nominatedChargeAccountWrapper.protectedFlag = false;
			nominatedChargeAccountWrapper.authorisationLevel = '1';
			nominatedChargeAccountWrapper.languageComponentHash = new Vector<>();
			nominatedChargeAccountWrapper.historyCaptureRequired = false;
		} catch (Exception ex) {
			System.out.println("Exception Continue : setNominatedChargeAccountWrapper()");
		}

	}

	@Test
	public void checkaccountinfobyinfocode_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "checkAccountInfoByInfoCode", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void checkallaccountbyintradaylimit_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "checkAllAccountBYIntradayLimit", stTest,stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void checkdauelmtattachment_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "checkDAUELmtAttachment", stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccountcharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccountCharge", subsidiaryAccountEntityKey,accountChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccountinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccountInfoType", subsidiaryAccountEntityKey,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccountlinks_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccountLinks", subsidiaryAccountEntityKey,accountLinksWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccountnominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccountNominee", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccountofflinecharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccountOfflineCharge", subsidiaryAccountEntityKey,accountOfflineChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createaccscifatca_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAccSciFatca", subsidiaryAccountEntityKey,subsidiaryAccountSCIFATCAWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createactaxwaiver_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createAcTaxWaiver", subsidiaryAccountEntityKey,subsidiaryAccountTaxWaiverWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createcustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createCustomerAccLink", subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void creategldatadetail_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createGLDataDetail", subsidiaryAccountEntityKey,crossDataValidationWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createInfoType", subsidiaryAccountEntityKey,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createmaster_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createMaster", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createmultilingualinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createMultilingualInfoType", subsidiaryAccountEntityKey,stTest,abstractWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createmultilingualobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createMultilingualObject", subsidiaryAccountEntityKey,vector,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createnominatedchargeaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createNominatedChargeAccount", subsidiaryAccountEntityKey,nominatedChargeAccountWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createObject", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createtxnaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createTxnAccount", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void createtxnaccounthelper_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "createTxnAccountHelper");
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void customstoreobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "customStoreObject", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void customtxnaccountstoreobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "customTxnAccountStoreObject", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void enableleanaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "enableLeanAccount");
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchaccountcharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAccountCharge", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchaccountlinks_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAccountLinks", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchaccountnominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAccountNominee", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchaccountofflinecharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAccountOfflineCharge", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchaccscifatca_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAccSciFatca", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchactaxwaiver_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchAcTaxWaiver", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchcustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchCustomerAccLink", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchgldatadetails_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchGLDataDetails", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchInfoType", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmaster_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMaster", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmasterforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMasterForInterestAccural", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmasterforinterestcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMasterForInterestCapitalisation", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmasterforinterestmonthlyaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMasterForInterestMonthlyAccural", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmasterforview_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMasterForView", subsidiaryAccountEntityKey,inTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmltsmain_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMltsMain", subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchmultilingualinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchMultilingualInfoType", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void fetchnominatedchargeaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "fetchNominatedChargeAccount", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountinbranch_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountInBranch", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountnobyinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountNoByInfoType", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountsbyprimaryrelationship_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountsByPrimaryRelationship", stTest,b1Test);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountsbyprimaryrelationship_1_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountsByPrimaryRelationship", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountsbyproductcode_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountsByProductCode", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountsbyrelationship_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountsByRelationship", stTest,b1Test);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findaccountsforcrdrinterestaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findAccountsForCrDrInterestAccount", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyaccountcategoryandmaster_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByAccountCategoryAndMaster", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyaccountnoandbranch_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByAccountNoAndBranch", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyaccountnoandmasterno_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByAccountNoAndMasterNo", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyaccountnos_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByAccountNos", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyaccountnos_1_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByAccountNos", stTest,inTestArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyactivemasternos_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByActiveMasterNos", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyactivemasternos_1_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByActiveMasterNos", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbybranchandaccountno_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByBranchAndAccountNo", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbychargecode_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByChargeCode", stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbyibannumber_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByIbanNumber", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbylimit_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByLimit", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymast_curr_prd_seq_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMast_Curr_Prd_Seq", stTest,stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasterandcurrency_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterAndCurrency", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternoaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNoAccount", stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternoandproduct_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNoAndProduct", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternos_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNos", stTest,b1Test);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternosforupdate_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNosForUpdate", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternosforupdateus_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNosForUpdateUS", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbymasternowithoffset_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByMasterNoWithOffset", stTest,inTest,inTest,b1Test);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbynonclosedaccounts_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByNonClosedAccounts", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findbystatusflag_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findByStatusFlag", subsidiaryAccountEntityKey,shTestArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findforbulkingcharges_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findForBulkingCharges", sqlDate);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findforofflinecharges_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findForOfflineCharges", stTest,stTest,stTest,stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findmaxaccountno_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findMaxAccountNo", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findprimarykeyobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findPrimaryKeyObject", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findprimarykeyobjectforview_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findPrimaryKeyObjectForView", primaryKey,inTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findproductcodebyaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findProductCodeByAccount", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void findscbaccountno_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "findSCBAccountNo", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void getaccountstatus_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "getAccountStatus", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void getaccounttype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "getAccountType", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void getarmcode_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "getArmcode", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void geteoddate_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "getEODDate");
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void getgba_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "getGBA", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void inserthistoryforcustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "insertHistoryForCustomerAccLink", subsidiaryAccountEntityKey,customerLinkWrapperArr,chTest,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isaccountavailable_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isAccountAvailable", stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isaccountavailablebycurrencyandnumber_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isAccountAvailableByCurrencyAndNumber", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isaccountclassificationexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isAccountclassificationexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isbillsliqinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isBillsLiqInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isbranchcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isBranchCodeinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isbusinessunitexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isBusinessUnitexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void iscreditproductcodeexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isCreditProductCodeexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void iscrossdatavalidationinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isCrossDataValidationInAccount", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void iscurrencycodeexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isCurrencyCodeexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void iscurrencylinkcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isCurrencyLinkCodeinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isdatachangedintxnaccounts_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isDataChangedInTxnAccounts", subsidiaryAccountWrapper,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isdebitproductcodeexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isDebitProductCodeexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isgldepartmentidinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isGlDepartmentIDInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isgldeptmappinginaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isGLDeptMappinginAccount", stTest,stTest,stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isintrateclasscodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isIntRateClassCodeInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isintrestcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isIntrestCodeInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isinvestmentpurposeexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isInvestmentPurposeexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isoperatingunitexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isOperatingUnitexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void ispalaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isPALAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isprioryearclrmapinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isPriorYearClrMapinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isproductcodeexistinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isProductCodeexistinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void issegmentcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isSegmentCodeinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isstdcrcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isStdCrCodeInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void isstddrcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isStdDrCodeInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void istaxcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isTaxCodeInAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void istaxcodeinaccount_1_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isTaxcodeinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void istaxctgcodeinaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isTaxctgcodeinAccount", stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void istxnaccoutsynchonchange_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "isTxnAccoutSynchOnChange");
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "loadObject", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadobjectdefault_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "loadObjectDefault", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadobjectforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "loadObjectForInterestAccural", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadobjectforinterestcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "loadObjectForInterestCapitalisation", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadobjectforinterestmonthlyaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "loadObjectForInterestMonthlyAccural", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void loadtxnaccounts_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "LoadTxnAccounts", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void migratecustomercombine_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "migrateCustomerCombine", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void migratenominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "migrateNominee", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyaccountcharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountCharge", subsidiaryAccountEntityKey,accountChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyaccountinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountInfoType", subsidiaryAccountEntityKey,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyaccountlinks_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountLinks", subsidiaryAccountEntityKey,accountLinksWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyaccountnominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountNominee", subsidiaryAccountEntityKey,accountNomineeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}
	@Test
	public void modifyaccountnominee2_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountNominee", subsidiaryAccountEntityKey,accountNomineeWrapperArr2);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}
	@Test
	public void modifyaccountnomine3_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountNominee", subsidiaryAccountEntityKey,accountNomineeWrapperArr3);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}
	

	@Test
	public void modifyaccountofflinecharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccountOfflineCharge", subsidiaryAccountEntityKey,accountOfflineChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyaccscifatca_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAccSciFatca", subsidiaryAccountEntityKey,subsidiaryAccountSCIFATCAWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyactaxwaiver_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyAcTaxWaiver", subsidiaryAccountEntityKey,subsidiaryAccountTaxWaiverWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifycustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyCustomerAccLink", subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifyinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyInfoType", subsidiaryAccountEntityKey,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifymultilingual_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyMultilingual", subsidiaryAccountEntityKey,vector,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifymultilingualinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyMultilingualInfoType", subsidiaryAccountEntityKey,stTest,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void modifynominatedchargeaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "modifyNominatedChargeAccount", subsidiaryAccountEntityKey,nominatedChargeAccountWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void moverelationaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "moveRelationAccount", stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void postcreateobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "postCreateObject", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeaccountcharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAccountCharge", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeaccountlinks_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAccountLinks", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeaccountnominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAccountNominee", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeaccountofflinecharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAccountOfflineCharge", subsidiaryAccountEntityKey,accountOfflineChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeaccscifatca_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAccSciFatca", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeactaxwaiver_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeAcTaxWaiver", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removecustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeCustomerAccLink", subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removegldatadetails_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeGLDataDetails", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeInfoType", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removemaster_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeMaster", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removemultilingual_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeMultilingual", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removemultilingualinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeMultilingualInfoType", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removenominatedchargeaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeNominatedChargeAccount", primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removeobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeObject", primaryKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void removetxnaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeTxnAccount", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void storeobject_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "storeObject", abstractWrapper,primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void storeobjectdefault_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "storeObjectDefault", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void storeobjectforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "storeObjectForInterestAccural", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void storeobjectforinterestcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "storeObjectForInterestCapitalisation", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void update_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "update", sqlExecutor,sqlStatementObject,sqlStatementObject,stTest,stTest,stTest,stTest,stTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateaccountcharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAccountCharge", subsidiaryAccountEntityKey,accountChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateaccountlinks_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAccountLinks", subsidiaryAccountEntityKey,accountLinksWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateaccountnominee_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAccountNominee", subsidiaryAccountEntityKey,accountNomineeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateaccountofflinecharge_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAccountOfflineCharge", subsidiaryAccountEntityKey,accountOfflineChargeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateaccscifatca_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAccSciFatca", subsidiaryAccountEntityKey,subsidiaryAccountSCIFATCAWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateallaccountsstatusbyaccountno_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateAllAccountsStatusByAccountNo", object);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchforaccountinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchforAccountInfoType", vector);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchforcrossdata_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchforCrossData", vector);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchforinterestaccrual_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchforInterestAccrual", vector);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchforinterestapplication_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchforInterestApplication", abstractWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchforinterestmonthlyaccrual_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchforInterestMonthlyAccrual", vector);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchoftxnaccountsforinterestaccrual_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchOfTxnAccountsforInterestAccrual", vector);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchrefentriesmarker_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchRefEntriesMarker", subsidiaryAccountWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatebatchtxnaccountsforinterestapplication_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateBatchTxnAccountsforInterestApplication", abstractWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatecustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateCustomerAccLink", subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatehistoryforcustomeracclink_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateHistoryForCustomerAccLink", subsidiaryAccountEntityKey,customerLinkWrapperArr,chTest,subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateinfotype_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateInfoType", subsidiaryAccountEntityKey,genericInfoTypeWrapperArr);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateinteligibilityflag_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateIntEligibilityFlag", stTest,stTest,chTest);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatemaster_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateMaster", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatemasterforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateMasterForInterestAccural", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatemasterforinterestcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateMasterForInterestCapitalisation", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatemastertxnaccountsforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateMasterTxnAccountsForInterestAccural", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatemastertxnaccountsforinterestcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateMasterTxnAccountsForInterestCapitalisation", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatenominatedchargeaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateNominatedChargeAccount", subsidiaryAccountEntityKey,nominatedChargeAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}



	@Test
	public void updateobject_1_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateObject", abstractWrapper,primaryKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateobjectforcapitalisation_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateObjectForCapitalisation", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updateobjectforinterestaccural_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateObjectForInterestAccural", abstractWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}

	@Test
	public void updatetxnaccount_test() throws Exception {
		try {
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "updateTxnAccount", subsidiaryAccountWrapper);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}
	@Test
	public void removeFastAccountObject_test() throws Exception {
		try {
			//SubsidiaryAccountEntityKey subsidiaryAccountEntityKey = (SubsidiaryAccountEntityKey) primaryKey;
			new NonStrictExpectations() {
			};
			Deencapsulation.invoke(subsidiaryAccountHelper, "removeFastAccountObject", subsidiaryAccountEntityKey);
			Assert.assertTrue(true);
		} catch (Exception exObj) {
			Assert.assertTrue(true);
		}
	}
	
		@Test public void createSCAcct_test() throws Exception{
		subsidiaryAccountHelper.createSCAcct(subsidiaryAccountWrapper);
	}
	
	@Test public void createSCAcct_test_excep() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new NamingException();}
		};
		subsidiaryAccountHelper.createSCAcct(subsidiaryAccountWrapper);
	}

	@Test public void createSCAcct_test_excep1() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new SQLExecuteException();}
		};
		subsidiaryAccountHelper.createSCAcct(subsidiaryAccountWrapper);
	}
	
	@Test public void fetchSCAcct_test() throws Exception{
		subsidiaryAccountHelper.fetchSCAcct(subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
	}
	
	@Test public void fetchSCAcct_test_excep() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new NamingException();}
		};
		subsidiaryAccountHelper.fetchSCAcct(subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
	} 
	
	@Test public void fetchSCAcct_test_excep1() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new SQLExecuteException();}
		};
		subsidiaryAccountHelper.fetchSCAcct(subsidiaryAccountEntityKey,subsidiaryAccountWrapper);
	}
	
	@Test public void removeSCAcct_test() throws Exception{
		subsidiaryAccountHelper.removeSCAcct(subsidiaryAccountEntityKey);
	}
	
	@Test public void removeSCAcct_test_excep() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new NamingException();}
		};
		subsidiaryAccountHelper.removeSCAcct(subsidiaryAccountEntityKey);
	}
	
	@Test public void removeSCAcct_test_excep1() throws Exception{
		new NonStrictExpectations() {
			{SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION); result=new SQLExecuteException();}
		};
		subsidiaryAccountHelper.removeSCAcct(subsidiaryAccountEntityKey);
	}
	
	@Test
	public void insertIntoSAccount_test() throws Exception {
		subsidiaryAccountWrapper.IBAN=null;
        subsidiaryAccountWrapper.accountCategory='\u0000';
		new Expectations() {
			{
				NumberGeneratorFactory.getInstance();
				result = numberGeneratorFactory;
				Deencapsulation.invoke(sqlExecutor, "getInstance", false, EBBSConstants.EBBS_APPLICATION); 
                result = sqlExecutor;
                sqlExecutor.getStatementObject(anyString, anyBoolean, anyBoolean); 
                result = sqlStatementObject; 
                sqlStatementObject.executeUpdate();
                result = 1;
			}
		};

		subsidiaryAccountHelper.insertIntoSAccount(subsidiaryAccountEntityKey, subsidiaryAccountWrapper);
	}
	
	@Test public void updateIntoSAccount_test() throws Exception{
		subsidiaryAccountHelper.updateIntoSAccount(subsidiaryAccountWrapper);
	}
	
	@Test
    public void testCreateObject() throws Exception {

		final AbstractWrapper[] abstractWrappers = new AbstractWrapper[1];
         abstractWrappers[0] = new EventBusinessParamWrapper();
         saccountBusinessParamWrapper=new SAccountBusinessParamWrapper();
         saccountBusinessParamWrapper.isSAccountEnabbled="Y";
         final AbstractWrapper[] abstractWrappers1 = new AbstractWrapper[1];
         abstractWrappers1[0] = saccountBusinessParamWrapper;

         new Expectations() { 
             { 
                 Deencapsulation.invoke(logWriter, "getInstance", "SubsidiaryAccountHelper", "createObject"); 
                 result = logWriter;
                 Deencapsulation.invoke(businessProcessParamCache, "getInstance"); result = businessProcessParamCache;
                 businessProcessParamCache.getProcessParameters("EVENTALERT"); result = abstractWrappers;
                 Deencapsulation.invoke(sqlExecutor, "getInstance", false, EBBSConstants.EBBS_APPLICATION); 
                 result = sqlExecutor;
                 sqlExecutor.getStatementObject(anyString, anyBoolean, anyBoolean); 
                 result = sqlStatementObject; 
                 sqlStatementObject.executeUpdate();
                 result = 1;
                 Deencapsulation.invoke(eventProcessor, "getInstance"); result = eventProcessor;
                 Deencapsulation.invoke(businessProcessParamCache, "getInstance"); result = businessProcessParamCache;
                 businessProcessParamCache.getProcessParameters("SACCOUNT"); result = abstractWrappers1;
                 
                 
             } 
        };
        subsidiaryAccountHelper.createObject(subsidiaryAccountWrapper); 
    }
	
	@Test
	public void testUpdateObject() throws NamingException, SCBApplicationException, CreateException {
		final AbstractWrapper[] abstractWrappers = new AbstractWrapper[1];
		abstractWrappers[0] = new EventBusinessParamWrapper();
		final AbstractWrapper[] abstractWrappers1 = new AbstractWrapper[1];
		abstractWrappers1[0] = new TxnPostingSetupBusinessParamWrapper();
		
		final AbstractWrapper[] abstractWrapper1 = new AbstractWrapper[2];
        TxnPostingSetupBusinessParamWrapper txnPostingSetupBusinessParamWrapper = new TxnPostingSetupBusinessParamWrapper();
        txnPostingSetupBusinessParamWrapper.setUseLeanAccountTable("Y");
		abstractWrapper1[0]= txnPostingSetupBusinessParamWrapper;
		
        saccountBusinessParamWrapper=new SAccountBusinessParamWrapper();
        saccountBusinessParamWrapper.isSAccountEnabbled="Y";
      //  final AbstractWrapper[] abstractWrappers2 = new AbstractWrapper[2];
        abstractWrapper1[1] = saccountBusinessParamWrapper;
		
		new Expectations() {
			{
				Deencapsulation.invoke(sqlExecutor, "getInstance", false, EBBSConstants.EBBS_APPLICATION);
				result = sqlExecutor;
				sqlExecutor.getStatementObject(anyString, anyBoolean, anyBoolean);
				result = sqlStatementObject;
				int resultSet = 1;
				sqlStatementObject.executeUpdate();
				result = resultSet;
				Deencapsulation.invoke(businessProcessParamCache, "getInstance");
				result = businessProcessParamCache;
				
				businessProcessParamCache.getProcessParameters("TXNPOSTSETUPS");
				result = abstractWrapper1;
				Deencapsulation.invoke(businessProcessParamCache, "getInstance"); result = businessProcessParamCache;
                businessProcessParamCache.getProcessParameters("SACCOUNT");
                result = abstractWrapper1[1];

			}
		};
		subsidiaryAccountHelper.updateObject(subsidiaryAccountWrapper);
	}
	
	@Test
    public void isFieldModified_test() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.conSolStmtFlag='T';
		nsaw.conSolStmtFlag='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test1() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.masterNo="1212";
		nsaw.masterNo="12121";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test2() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.shortName="Test";
		nsaw.shortName="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test3() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.accountClassCode="Test";
		nsaw.accountClassCode="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test4() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.accountClosureReason="Test";
		nsaw.accountClosureReason="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test5() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.sourcingID="Test";
		nsaw.sourcingID="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test6() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.accountReOpenReason="Test";
		nsaw.accountReOpenReason="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test7() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.isIncludedInInterestPooling='T';
		nsaw.isIncludedInInterestPooling='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test8() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.interestInSuspenceFlag='T';
		nsaw.interestInSuspenceFlag='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test9() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.accountCategory='T';
		nsaw.accountCategory='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		}
    }
	
	@Test
    public void isFieldModified_test10() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.accountCurrentStatus='T';
		nsaw.accountCurrentStatus='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		} 
    }

	@Test
    public void isFieldModified_test11() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.supressStatementFlag='T';
		nsaw.supressStatementFlag='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		} 
    }
	
	@Test
    public void isFieldModified_test12() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.crIntIndicatorFlag='T';
		nsaw.crIntIndicatorFlag='K';
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		} 
    }
    
	@Test
    public void isFieldModified_test13() {
		SubsidiaryAccountWrapper saw=new SubsidiaryAccountWrapper();
		SubsidiaryAccountWrapper nsaw=new SubsidiaryAccountWrapper();
		saw.creditInterestPrdCode="Test";
		nsaw.creditInterestPrdCode="Test1";
		try {
			Deencapsulation.invoke(subsidiaryAccountHelper, "isFieldModified", saw,
					nsaw);
			    Assert.assertTrue(true);
		} catch (Exception exObj) {
		    Assert.assertTrue(true);
		} 
    }

}


/*
 * DSSR Number        :        IN-SCB-GSSC-2005-14143-IN
 * Project            :        eBBS_2005
 * Changed By         :        Ramkumar
 * Date               :        25-01-2005.
 * Description        :        Changes retrofitted from MESA and PH. Base version is US.
 */

package scb.ebbs.accounts.ejb;

import scb.general.wrapper.RPRSAUploadDetailWrapper;
import scb.util.*;
import scb.util.OptimizeFor;

import scb.exception.SCBApplicationException;
import scb.exception.SQLExecuteException;
import scb.ebbs.accounts.wrapper.*;
import scb.ebbs.util.StaticDataCacheDAO;

import java.lang.reflect.Field;
import java.sql.*;
import scb.business.einterest.wrapper.AccountInterestStagingProcessWrapper;
import javax.ejb.CreateException;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.EntityContext;

import java.sql.Date;
import java.util.*;

import javax.naming.NamingException;
import com.scb.ebbs.event.exception.EventApplicationException;
import com.scb.ebbs.event.framework.DefaultEventMessageGenerator;
import com.scb.ebbs.event.framework.EventMessageGenerator;
import com.scb.ebbs.event.logger.EventLogger;
import com.scb.ebbs.event.logger.EventLoggerFactory;
import com.scb.ebbs.event.wrapper.EventMessageWrapper;
import javax.ejb.*;

import javax.ejb.FinderException;

import scb.wrapper.*;
import scb.ebbs.ecodes.wrapper.ChargeBusinessParamWrapper;
//Added by Suresh for R3
import scb.ebbs.ecodes.wrapper.CrossDataValidationWrapper;
import scb.ebbs.ecodes.wrapper.TxnPostingSetupBusinessParamWrapper;
import scb.ebbs.ecustomer.wrapper.RelationshipAddressWrapper;
import scb.ebbs.general.generator.NumberGenerator;
import scb.ebbs.general.generator.NumberGeneratorFactory;
import scb.general.client.AccountValidationUtility;
import scb.general.ejb.BusinessProcessParamCache;
import scb.general.wrapper.BusinessProcessConstants;
import scb.general.wrapper.EventBusinessParamWrapper;
import scb.general.wrapper.GenericInfoTypeWrapper;
import scb.services.util.NexusUtil;
import scb.ebbs.ecodes.wrapper.SAccountBusinessParamWrapper;


/**
 * Insert the type's description here. Creation date: (12/9/00 2:45:53 PM)
 * Modified date: (10/12/03 26:45:53 PM)
 *
 * @author: B.Kumar
 */
public class SubsidiaryAccountHelper extends scb.wrapper.Helper {

	private static final java.lang.String DELETE_ACCHARGE = "EBACC00109SY";

	private static final java.lang.String DELETE_ACCOUNT = "EBACC00110SY";

	private static final java.lang.String DELETE_ACNOMINEE = "EBACC00111SY";

	private javax.ejb.EntityContext entityCtx;

	private static final java.lang.String FIND_ACCOUNTNOS = "EBACC00112SY";

	private static final java.lang.String FIND_BY_ACCOUNTNO_BRANCH = "EBACC00113SY";

	private static final java.lang.String FIND_BY_MAST_CURR_PRD_SEQ = "EBACC00114SY";

	private static final java.lang.String FIND_BY_MASTERNO = "EBACC00115SY";

	private static final java.lang.String FIND_BY_MASTERNO_AND_PRODUCT = "EBACC00116SY";

	private static final java.lang.String FIND_BY_MASTERNO_CURRCODE = "EBACC00117SY";

	private static final java.lang.String FIND_BY_PRIMARYKEY = "EBACC00118SY";
	
	private static final java.lang.String FIND_BY_PRIMARYKEY_CS = "EBACC10071SY"; //PostEngineAccountsQueue Fix

	// private final java.lang.String FIND_BY_PRIMARYKEY_ACCOUNT = " SELECT
	// CURRENCYCODE FROM ACCOUNT WHERE CURRENCYCODE=? AND ACCOUNTNO=? ";
	private static final java.lang.String FIND_BY_STATUSFLAG = "EBACC00119SY";

	private static final java.lang.String FIND_FOR_CHARGE_BULKING = "EBACC00120SY";

	private static final java.lang.String FIND_MAX_ACCOUNTNO = "EBACC00121SY";

	private static final java.lang.String INSERT_ACCHARGE = "EBACC00122SY";
	
	//MCCS -1515478
	private static final java.lang.String FIND_PRODUCT_CODE = "EBACC10018SY";
	private TxnAccountHelper txnAccountHelper;

	// private final java.lang.String INSERT_ACCOUNT ="INSERT INTO
	// ACCOUNT(CURRENCYCODE,ACCOUNTNO,MASTERNO,SHORTNAME,PRODUCTCODE,SEGMENTCODE,OPERATINGINS,CRINTCURRENCYCODE,CRINTACCOUNTNO,DRINTCURRENCYCODE,DRINTACCOUNTNO,CRINTINDFLAG,DRINTINDFLAG,INTERESTCODE,ADVINTINDICATOR,INTSTMTINDFLAG,ACCLASSCODE,BLOCKFLAG,EXCHCONTROLFLAG,PRPPAFLAG,FROZENSURRENDER,MATCHINGFLAG,FORWARDCOVERRATE,EXCHANGERATE,NOTES1,NOTES2,NOTES3,MEMOFLAG1,MEMOFLAG2,MEMOFLAG3,MEMOFLAG4,MEMOFLAG5,USRDEFINEDCODE1,USRDEFINEDCODE2,USRDEFINEDCODE3,USRDEFINEDCODE4,USRDEFINEDCODE5,USRDEFINEDCODE6,USRDEFINEDCODE7,USRDEFINEDCODE8,USRDEFINEDCODE9,USRDEFINEDCODE10,ACCLOSUREREASON,ACCLOSEDT,BULKCHARGESFLAG,BULKINGFREQUENCY,BULKEXECUTIONDATE,ACOPENDATE,REFENTRIESMARKER,REJENTRIESMARKER,MAKERBRANCH,MAKERDATE,MAKERID,MAKERIPADDRESS,MAKERTIME,CHECKERBRANCH,CHECKERDATE,CHECKERID,CHECKERIPADDRESS,CHECKERTIME,STATUSFLAG,ACCOUNTBRANCH,UCACODE,ISEBSWCUSTOMER,EBSWCUSTSWIFT,ACCTCURRENTSTATUS,TRANSTODORMANTDATE,TRANSTOUNCLAIMDATE,RENEWROLLOVERDATE,REACTIVEDATE,LASTDRTRNDATE,LASTCRTRNDATE,LASTCRTRNEXCLSYSDT,LASTDRTRNEXCLSYSDT,CRLASTACCRUALDATE,DRLASTACCRUALDATE,CRLASTINTPAYDATE,DRLASTINTPAYDATE,CRNEXTINTPAYDATE,DRNEXTINTPAYDATE,INTINSUSPENSE,CRINTACCRUEDAMT,DRINTACCRUEDAMT,CRINTADJAMT,DRINTADJAMT,CRMANUALADJAMT,DRMANUALADJAMT,PROVADJAMT,INCLUDEINTPOOLFLAG,OLDACCOUNTNUMBER,LASTOFFLINECHGDATE,SUPRESSSTMTFLAG,TRANPRICINGRATE,SUPPRESSADVFLAG,SUPPRESSOTHFLAG,BULKTRNFLAG,SELFRECONCILEFLAG,INSTRUMENTTYPE,LIMITNO,LIMITMASTERNO,DRINTPRODUCTCODE,CRINTPRODUCTCODE,MULTIPLELIMITS,DRLASTACCADJAMOUNT,CRLASTACCADJAMOUNT,INTRADAYLMTMASTNO,INTRADAYLMTNO,ACCTITLE,SUPRESSINTSTMTFLAG)
	// VALUES
	// (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	// changed for ebbs_2005

	// Added ConsolidateStatementFlag for Japan Retrofit on 18.05.2005 -
	// Suthahar Akbar
	// Code Changed by S.Ramesh For E10-SubAccount on 23-05-2005
	// CACSIND included
	// DSRREFERRALID,DSRSOURCINGID,DSRCLOSINGID included by vani for indo gap
	// DSRREFERRALID,DSRSOURCINGID,DSRCLOSINGID

	// Changed by yusuf for E11 day2 fields added:
	// CHANNELID,ORIGMAKERID,ORIGMAKERDATE,ORIGMAKIPADDRESS,ORIGMAKTIME,ORGMAKBRANCH
	private static final java.lang.String INSERT_ACCOUNT = "EBACC00123SY";

	// change ends here

	private static final java.lang.String INSERT_ACNOMINEE = "EBACC00124SY";

	private static final java.lang.String MODIFY_DELETE_ACCHARGE = "EBACC00125SY";

	private static final java.lang.String MODIFY_DELETE_ACNOMINEE = "EBACC00126SY";

	private static final java.lang.String SELECT_ACCHARGE = "EBACC00127SY";

	// private final java.lang.String SELECT_ACCOUNT ="SELECT
	// CURRENCYCODE,ACCOUNTNO,MASTERNO,SHORTNAME,PRODUCTCODE,SEGMENTCODE,OPERATINGINS,CRINTCURRENCYCODE,CRINTACCOUNTNO,DRINTCURRENCYCODE,DRINTACCOUNTNO,CRINTINDFLAG,DRINTINDFLAG,INTERESTCODE,ADVINTINDICATOR,INTSTMTINDFLAG,ACCLASSCODE,BLOCKFLAG,EXCHCONTROLFLAG,PRPPAFLAG,FROZENSURRENDER,MATCHINGFLAG,FORWARDCOVERRATE,EXCHANGERATE,NOTES1,NOTES2,NOTES3,MEMOFLAG1,MEMOFLAG2,MEMOFLAG3,MEMOFLAG4,MEMOFLAG5,USRDEFINEDCODE1,USRDEFINEDCODE2,USRDEFINEDCODE3,USRDEFINEDCODE4,USRDEFINEDCODE5,USRDEFINEDCODE6,USRDEFINEDCODE7,USRDEFINEDCODE8,USRDEFINEDCODE9,USRDEFINEDCODE10,ACCLOSUREREASON,ACCLOSEDT,BULKCHARGESFLAG,BULKINGFREQUENCY,BULKEXECUTIONDATE,ACOPENDATE,REFENTRIESMARKER,REJENTRIESMARKER,MAKERBRANCH,MAKERTIME,CHECKERBRANCH,CHECKERDATE,CHECKERID,CHECKERIPADDRESS,CHECKERTIME,STATUSFLAG,ACCOUNTBRANCH,UCACODE,ISEBSWCUSTOMER,EBSWCUSTSWIFT,ACCTCURRENTSTATUS,TRANS

	// changed for ebbs_2005
	// private final java.lang.String SELECT_ACCOUNT =
	// "SELECT CURRENCYCODE, ACCOUNTNO, MASTERNO,SHORTNAME, PRODUCTCODE,
	// SEGMENTCODE,OPERATINGINS, CRINTCURRENCYCODE,
	// CRINTACCOUNTNO,DRINTCURRENCYCODE, DRINTACCOUNTNO,
	// CRINTINDFLAG,DRINTINDFLAG, INTERESTCODE, ADVINTINDICATOR,INTSTMTINDFLAG,
	// ACCLASSCODE, BLOCKFLAG,EXCHCONTROLFLAG, PRPPAFLAG,
	// FROZENSURRENDER,MATCHINGFLAG, FORWARDCOVERRATE, EXCHANGERATE,NOTES1,
	// NOTES2, NOTES3,MEMOFLAG1,MEMOFLAG2, MEMOFLAG3,MEMOFLAG4, MEMOFLAG5,
	// USRDEFINEDCODE1,USRDEFINEDCODE2, USRDEFINEDCODE3,
	// USRDEFINEDCODE4,USRDEFINEDCODE5, USRDEFINEDCODE6,
	// USRDEFINEDCODE7,USRDEFINEDCODE8, USRDEFINEDCODE9,
	// USRDEFINEDCODE10,ACCLOSUREREASON, ACCLOSEDT,
	// BULKCHARGESFLAG,BULKINGFREQUENCY, BULKEXECUTIONDATE,
	// ACOPENDATE,REFENTRIESMARKER, REJENTRIESMARKER, MAKERBRANCH,MAKERDATE,
	// MAKERID, MAKERIPADDRESS,MAKERTIME, CHECKERBRANCH, CHECKERDATE,CHECKERID,
	// CHECKERIPADDRESS, CHECKERTIME,STATUSFLAG, ACCOUNTBRANCH, UCACODE,
	// ISEBSWCUSTOMER, EBSWCUSTSWIFT,ACCTCURRENTSTATUS, TRANSTODORMANTDATE,
	// TRANSTOUNCLAIMDATE, RENEWROLLOVERDATE, REACTIVEDATE,LASTDRTRNDATE,
	// LASTCRTRNDATE, LASTCRTRNEXCLSYSDT, LASTDRTRNEXCLSYSDT,
	// INTINSUSPENSE,CRLASTACCRUALDATE, DRLASTACCRUALDATE, CRLASTINTPAYDATE,
	// DRLASTINTPAYDATE, CRNEXTINTPAYDATE,
	// DRNEXTINTPAYDATE,CRINTACCRUEDAMT,DRINTACCRUEDAMT,CRINTADJAMT,DRINTADJAMT,CRMANUALADJAMT,DRMANUALADJAMT,PROVADJAMT,INCLUDEINTPOOLFLAG,OLDACCOUNTNUMBER,LASTOFFLINECHGDATE,SUPRESSSTMTFLAG,TRANPRICINGRATE,SUPPRESSADVFLAG,SUPPRESSOTHFLAG,BULKTRNFLAG,SELFRECONCILEFLAG,INSTRUMENTTYPE,LIMITNO,LIMITMASTERNO,DRINTPRODUCTCODE,CRINTPRODUCTCODE,MULTIPLELIMITS,DRLASTACCADJAMOUNT,CRLASTACCADJAMOUNT,INTRADAYLMTMASTNO,INTRADAYLMTNO,ACCTITLE,SUPRESSINTSTMTFLAG
	// FROM ACCOUNT WHERE CURRENCYCODE=? AND ACCOUNTNO=?";

	// Added ConsolidateStatementFlag for Japan Retrofit on 18.05.2005 -
	// Suthahar Akbar
	// code changed by S.Ramesh for E-10-SubAccount on 25-05-2005
	// DSRREFERRALID,DSRSOURCINGID,DSRCLOSINGID included by vani for indo gap
	// Changed by yusuf for E11 day2 fields added:
	// CHANNELID,ORIGMAKERID,ORIGMAKERDATE,ORIGMAKIPADDRESS,ORIGMAKTIME,ORGMAKBRANCH
	// for Account source identification for E11 day2
	private static final java.lang.String SELECT_ACCOUNT = "EBACC00128SY";
	private static final java.lang.String SELECT_ACCOUNT_EXCESS = "EBACC00428SY";

	private static final java.lang.String SELECT_ACCOUNT_INTERESTACCURAL = "EBACC01179SY";
	private static final java.lang.String SELECT_ACCOUNT_INTERESTACCURAL_EX = "EBACC04179SY";

	private static final java.lang.String SELECT_ACCOUNT_INTERESTCAPITALISATION = "EBACC01180SY";

	// private final java.lang.String SELECT_ACCOUNT_FOR_VIEW ="SELECT
	// CURRENCYCODE,ACCOUNTNO,MASTERNO,SHORTNAME,PRODUCTCODE,SEGMENTCODE,OPERATINGINS,CRINTCURRENCYCODE,CRINTACCOUNTNO,DRINTCURRENCYCODE,DRINTACCOUNTNO,CRINTINDFLAG,DRINTINDFLAG,INTERESTCODE,ADVINTINDICATOR,INTSTMTINDFLAG,ACCLASSCODE,BLOCKFLAG,EXCHCONTROLFLAG,PRPPAFLAG,FROZENSURRENDER,MATCHINGFLAG,FORWARDCOVERRATE,EXCHANGERATE,NOTES1,NOTES2,NOTES3,MEMOFLAG1,MEMOFLAG2,MEMOFLAG3,MEMOFLAG4,MEMOFLAG5,USRDEFINEDCODE1,USRDEFINEDCODE2,USRDEFINEDCODE3,USRDEFINEDCODE4,USRDEFINEDCODE5,USRDEFINEDCODE6,USRDEFINEDCODE7,USRDEFINEDCODE8,USRDEFINEDCODE9,USRDEFINEDCODE10,ACCLOSUREREASON,ACCLOSEDT,BULKCHARGESFLAG,BULKINGFREQUENCY,BULKEXECUTIONDATE,ACOPENDATE,REFENTRIESMARKER,REJENTRIESMARKER,MAKERBRANCH,MAKERDATE,MAKERID,MAKERIPADDRESS,MAKERTIME,CHECKERBRANCH,CHECKERDATE,CHECKERID,CHECKERIPADDRESS,CHECKERTIME,STATUSFLAG,ACCOUNTBRANCH,UCACODE,ISEBSWCUSTOMER,EBSWCUSTSWIFT,ACCTCURRENTSTATUS,TRANSTODORMANTDATE,TRANSTOUNCLAIMDATE,RENEWROLLOVERDATE,
	// REACTIVEDATE,LASTDRTRNDATE,LASTCRTRNDATE,LASTCRTRNEXCLSYSDT,LASTDRTRNEXCLSYSDT,TRANPRICINGRATE,SUPPRESSADVFLAG,SUPPRESSOTHFLAG,BULKTRNFLAG,SELFRECONCILEFLAG,INSTRUMENTTYPE,LIMITNO,LIMITMASTERNO,DRINTPRODUCTCODE,CRINTPRODUCTCODE,MULTIPLELIMITS,DRLASTACCADJAMOUNT,CRLASTACCADJAMOUNT,INTRADAYLMTMASTNO,INTRADAYLMTNO,ACCTITLE,SUPRESSINTSTMTFLAG
	// FROM ACCOUNT WHERE CURRENCYCODE=? AND ACCOUNTNO=? AND STATUSFLAG=?";
	// Changed by yusuf for E11 day2 fields added:
	// CHANNELID,ORIGMAKERID,ORIGMAKERDATE,ORIGMAKIPADDRESS,ORIGMAKTIME,ORGMAKBRANCH
	// for Account source identification for E11 day2
	private static final java.lang.String SELECT_ACCOUNT_FOR_VIEW = "EBACC00129SY";

	// change ends here
	private static final java.lang.String SELECT_ACNOMINEE = "EBACC00130SY";

	private static final java.lang.String UPDATE_ACCHARGE = "EBACC00131SY";

	private static final java.lang.String UPDATE_ACNOMINEE = "EBACC00132SY";

	// changed for ebbs_2005
	// private final java.lang.String STORE_ACCOUNT ="UPDATE ACCOUNT SET
	// MASTERNO=?, SHORTNAME=?, PRODUCTCODE=?, SEGMENTCODE=?,OPERATINGINS=?,
	// CRINTCURRENCYCODE=?, CRINTACCOUNTNO=?,
	// DRINTCURRENCYCODE=?,DRINTACCOUNTNO=?, CRINTINDFLAG=?, DRINTINDFLAG=?,
	// INTERESTCODE=?,ADVINTINDICATOR=?, INTSTMTINDFLAG=?, ACCLASSCODE=?,
	// BLOCKFLAG=?,EXCHCONTROLFLAG=?, PRPPAFLAG=?, FROZENSURRENDER=?,
	// MATCHINGFLAG=?,FORWARDCOVERRATE=?, EXCHANGERATE=?, NOTES1=?,
	// NOTES2=?,NOTES3=?, MEMOFLAG1=?, MEMOFLAG2=?, MEMOFLAG3=?,MEMOFLAG4=?,
	// MEMOFLAG5=?, USRDEFINEDCODE1=?, USRDEFINEDCODE2=?,USRDEFINEDCODE3=?,
	// USRDEFINEDCODE4=?, USRDEFINEDCODE5=?,
	// USRDEFINEDCODE6=?,USRDEFINEDCODE7=?, USRDEFINEDCODE8=?,
	// USRDEFINEDCODE9=?, USRDEFINEDCODE10=?,ACCLOSUREREASON=?, ACCLOSEDT=?,
	// BULKCHARGESFLAG=?, BULKINGFREQUENCY=?,BULKEXECUTIONDATE=?, ACOPENDATE=?,
	// REFENTRIESMARKER=?, REJENTRIESMARKER=?,MAKERBRANCH=?, MAKERDATE=?,
	// MAKERID=?, MAKERIPADDRESS=?,MAKERTIME=?, CHECKERBRANCH=?, CHECKERDATE=?,
	// CHECKERID=?,CHECKERIPADDRESS=?, CHECKERTIME=?, STATUSFLAG=?,
	// ACCOUNTBRANCH=?, UCACODE=?, ISEBSWCUSTOMER=?,
	// EBSWCUSTSWIFT=?,ACCTCURRENTSTATUS=?, TRANSTODORMANTDATE=?,
	// TRANSTOUNCLAIMDATE=?, RENEWROLLOVERDATE=?,
	// REACTIVEDATE=?,LASTDRTRNDATE=?, LASTCRTRNDATE=?, LASTCRTRNEXCLSYSDT=?,
	// LASTDRTRNEXCLSYSDT=?, INTINSUSPENSE=?,CRLASTACCRUALDATE=?,
	// DRLASTACCRUALDATE =?, CRLASTINTPAYDATE =?, DRLASTINTPAYDATE=?,
	// CRNEXTINTPAYDATE=?, DRNEXTINTPAYDATE=? ,CRINTACCRUEDAMT =
	// ?,DRINTACCRUEDAMT = ?,CRINTADJAMT = ?,DRINTADJAMT = ?,CRMANUALADJAMT =
	// ?,DRMANUALADJAMT = ? ,PROVADJAMT = ? ,INCLUDEINTPOOLFLAG = ?
	// ,OLDACCOUNTNUMBER=?,LASTOFFLINECHGDATE
	// =?,SUPRESSSTMTFLAG=?,TRANPRICINGRATE=?,SUPPRESSADVFLAG=?,SUPPRESSOTHFLAG=?,BULKTRNFLAG=?,SELFRECONCILEFLAG=?,INSTRUMENTTYPE=?,LIMITNO=?,LIMITMASTERNO=?,DRINTPRODUCTCODE=?,CRINTPRODUCTCODE=?,MULTIPLELIMITS=?,DRLASTACCADJAMOUNT=?,CRLASTACCADJAMOUNT=?,INTRADAYLMTMASTNO=?,INTRADAYLMTNO=?
	// ,ACCTITLE=?,SUPRESSINTSTMTFLAG=? WHERE CURRENCYCODE=? AND ACCOUNTNO=? ";
	// Added ConsolidateStatementFlag for Japan Retrofit on 18.05.2005 -
	// Suthahar Akbar
	// code changed by S.Ramesh for E-10-SubAccount on 25-05-2005

	// Changed by yusuf for E11 day2 fields
	// added:CHANNELID,ORIGMAKERID,ORIGMAKERDATE,ORIGMAKIPADDRESS,ORIGMAKTIME,ORGMAKBRANCH
	// for Account source identification for E11 day2
	private static final java.lang.String STORE_ACCOUNT = "EBACC00133SY";
	
	private static final java.lang.String STORE_ACCOUNT_EXCESS = "EBACC00433SY";

	// changes end here
	private static final java.lang.String STORE_ACCOUNT_INTERESTACCURAL = "EBACC01181SY";
	private static final java.lang.String STORE_ACCOUNT_INTERESTACCURAL_EXCESS = "EBACC04181SY";

	private static final java.lang.String STORE_ACCOUNT_INTERESTCAP = "EBACC01182SY";

	private static final java.lang.String FIND_BY_ACTIVE_MASTERNO = "EBACC00134SY";

	private static final java.lang.String FIND_BY_NON_CLOSED = "EBACC00135SY";

	private static final java.lang.String FIND_ALL_MASTERNO_ACCOUNT = "EBACC00136SY";

	private static final java.lang.String FIND_BY_BRANCH_ACCOUNT = "EBACC00137SY";

	private static final java.lang.String FIND_BY_PRIMARYKEY_FOR_ACCTTYPE = "EBACC00138SY";

	String FIND_ALL_MASTERNO_BY_RELATIONSHIP = "EBACC00139SY";

	private static final java.lang.String DELETE_ACCLINKS = "EBACC00140SY";

	private static final java.lang.String INSERT_ACCLINKS = "EBACC00141SY";

	private static final java.lang.String MODIFY_DELETE_ACCLINKS = "EBACC00142SY";

	private static final java.lang.String UPDATE_ACCLINKS = "EBACC00143SY";

	private static final java.lang.String SELECT_ACCLINKS = "EBACC00144SY";

	private static final String INSERT_ACCINFOTYPE = "EBACC00145SY";

	private static final String SELECT_ACCINFOTYPE = "EBACC00146SY";

	private static final String UPDATE_ACCINFOTYPE = "EBACC00147SY";

	private static final String DELETE_ACCINFOTYPE = "EBACC00148SY";

	private static final String MODIFY_DELETE_ACCINFOTYPE = "EBACC00149SY";

	// This is added for Limits on 02-02-2004
	// private final java.lang.String FIND_BY_LIMIT ="select distinct
	// currencycode,accountno from account where (limitmasterno=? and limitno=?)
	// or (intradaylmtmastno=? and intradaylmtno =?)";

	private static final java.lang.String FIND_BY_LIMIT = "EBACC00150SY";

	// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005. Retrofitted
	// from MESA

	// private final java.lang.String DELETE_ACCINFO = "EBACC00151SY";

	private static final java.lang.String INSERT_ACCINFO = "EBACC00152SY";

	private static final java.lang.String MODIFY_DELETE_ACCINFO = "EBACC00153SY";

	// private final java.lang.String SELECT_ACCINFO = "EBACC00154SY";

	private static final java.lang.String UPDATE_ACCINFO = "EBACC00155SY";

	String FIND_FOR_SCB_ACCOUNT = "EBACC00156SY";

    //OBOR-14465
	private final String INSERT_MACCINFO="INSERT INTO MACCINFO(ACCOUNTNO,CURRENCYCODE,SEQNO,INFORMATIONCODE,INFODETCODE,LANGUAGECODE) VALUES(?,?,?,?,?,?)";
	private final String SELECT_MACCINFO="SELECT SEQNO,INFORMATIONCODE,INFODETCODE,LANGUAGECODE FROM MACCINFO WHERE  ACCOUNTNO=? AND CURRENCYCODE=?" ;
	private final String UPDATE_MACCINFO="UPDATE MACCINFO SET INFORMATIONCODE =?,INFODETCODE=?  WHERE ACCOUNTNO=? AND CURRENCYCODE =? AND SEQNO =? ";
	private final String MODIFY_DELETE_MACCINFO="DELETE FROM MACCINFO WHERE  ACCOUNTNO=? AND CURRENCYCODE =? AND  SEQNO =?";
	// changes end here

	// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005. Retrofitted
	// from PH
	// included by sumithra on 11.02.2004 for tax - PH030
	private static final java.lang.String INSERT_ACTAXWV = "EBACC00157SY";

	// private final java.lang.String MODIFY_DELETE_NOMCHRG = "EBACC00158SY";

	// included by Sumithra on 11.02.2004 for Tax - PH030
	private static final java.lang.String SELECT_ACTAXWV = "EBACC00159SY";

	// included by sumithra on 11.02.2004 for Tax - PH030
	private static final java.lang.String DELETE_ACTAXWV = "EBACC00160SY";

	// included by Sumithra on 11.02.2004 for Tax - PH030
	private static final java.lang.String MODIFY_DELETE_ACTAXWV = "EBACC00161SY";

	private static final java.lang.String UPDATE_ACTAXWV = "EBACC00771SY";
	
	// included by by sumithra for Nominated Charge AccountNo - PH047 on 10.02.2004
	private static final String SELECT_CHRGNOM = "EBACC00162SY";

	private static final String INSERT_CHRGNOM = "EBACC00163SY";

	private static final String UPDATE_CHRGNOM = "EBACC00164SY";

	private static final String DELETE_CHRGNOM = "EBACC00165SY";

	// changes end here
	// code added by S.Ramesh for E10-MLTS on 4-06-2005
	//private static final String INSERT_MACCOUNT = "EBACC00166SY";

	//private static final String DELETE_MACCOUNT = "EBACC00167SY";

	//private static final String SELECT_MACCOUNT = "EBACC00168SY";
	
	private static final String INSERT_MACCOUNT = "INSERT INTO MACCOUNT(CURRENCYCODE,ACCOUNTNO,ACCTITLE,LANGUAGECODE,ACCTITLE2,SHORTNAME) VALUES (?,?,?,?,?,?)";

	private static final String DELETE_MACCOUNT = "DELETE FROM MACCOUNT WHERE CURRENCYCODE=? AND ACCOUNTNO=?";

	private static final String SELECT_MACCOUNT = "SELECT ACCTITLE,RTRIM(LANGUAGECODE),ACCTITLE2,SHORTNAME FROM MACCOUNT WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?";

	// Changes End here
	private static final String SELECT_ACCOUNTS_FOR_CR_DR_INTEREST_ACCOUNT = "EBACC00169SY";

	// Code added by Manikandan for E12 - Customer Link on 27-09-2007
	private static final java.lang.String MODIFY_DELETE_ACCLNKTYP = "EBACC08513DY";

	private static final java.lang.String INSERT_ACCLNKTYP = "EBACC08511IY";

	private static final java.lang.String UPDATE_ACCLNKTYP = "EBACC08514UY";

	private static final java.lang.String SELECT_ACCLNKTYP = "EBACC08512SY";

	private static final java.lang.String DELETE_ACCLNKTYP = "EBACC08519DY";

	// Changes End here
	//Start -SIMCO R3<<Locker Charges>>	
	private static final java.lang.String INSERT_ACOFFCHRG = "EBACC06790AY";

	private static final java.lang.String UPDATE_ACOFFCHRG = "EBACC06791AY";

	private static final java.lang.String SELECT_ACOFFCHRG = "EBACC06792AY";

	private static final java.lang.String DELETE_ACOFFCHRG = "EBACC06793AY";
	//End -SIMCO R3<<Locker Charges>>
	// Added by murugan for CustomerCombine to India E12
	private static final java.lang.String UPDATE_MOVE_RELACC_HOME_SQL = "EBACC08520UY";

	private static final java.lang.String UPDATE_MOVE_MIGNOMINEE_HOME_SQL = "EBACC08521UY";

	private static final java.lang.String SELECT_ACCUSLNK_HOME_SQL = "EBACC08522SY";

	private static final java.lang.String UPDATE_ACCUSLNK_HOME_SQL = "EBACC08523UY";

	private static final java.lang.String DELETE_ACCUSLNK_HOME_SQL = "EBACC08524DY";

	private static final java.lang.String DELETE_ACCUSLNK_HOME_NEW = "EBACC03468SY";
	
	private static final java.lang.String UPDATE_ACCUSLNK_HOME_NEW = "EBACC03469SY";


	// private final java.lang.String INSERT_CUSLNK = "INSERT INTO HACUSLNK
	// (CURRENCYCODE,ACCOUNTNO,RELTYPECODE,RELATIONSHIPNO,ACTIVEFLAG,MAKERBRANCH,MAKERID,MAKERIPADDRESS,MAKERDATE,MAKERTIME,CHECKERBRANCH,CHECKERID,CHECKERIPADDRESS,CHECKERDATE,CHECKERTIME,STATUSFLAG)
	// VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	private static final java.lang.String INSERT_CUSLNK = "EBACC08525DY";

	// String UPDATE_CUSLNK="update hacuslnk set activeflag=? where accountno=?
	// and currencycode=? and relationshipno=? ";
	private static final java.lang.String UPDATE_CUSLNK = "EBACC08526DY";

	// End by murugan for CustomerCombine to India E12

  //	Added by Suresh.S for R3 UK Capability UKCOR19
  private final static String INSERT_GLDATA= "EBACC08526IY";
  private final static String DELETE_GLDATA =  "EBACC08527DY";
  private final static String SELECT_GLDATA = "EBACC08526SY";
//Start --- Source added by Prakash N for E12 Upgrade -  Business Event Changes
//  private final String FIND_BY_ACCOUNTCATEGORY_MASTER = "SELECT CURRENCYCODE,ACCOUNTNO FROM ACCOUNT WHERE MASTERNO = ? AND ACCTCATEGORY = ?";
    private final String FIND_BY_ACCOUNTCATEGORY_MASTER = "EBACC09622SY";
//End --- Source added by Prakash N for E12 Upgrade -  Business Event Changes
    private LogWriter logWriter = LogWriter.getInstance("SubsidiaryAccountHelper","SubsidiaryAccountHelper");
  //Added By Deepak(1362723) For UK Day 2.
  private final String SELECT_INT_RATE_CLASS_COUNT_SQL = "EBACC05547SY";
  private final String SELECT_BILLS_LIQ_COUNT_SQL = "EBACC05548SY";
  private final String SELECT_STD_CR_COUNT_SQL="EBACC05549SY";
  private final String SELECT_STD_DR_COUNT_SQL="EBACC05550SY";
  private final String SELECT_INT_CODE_COUNT_SQL="EBACC05551SY";
//Added by 1400117 (Nischitha Hegde) for UK Day2 R2
  private final static String SELECT_CREDITPRODUCTCODE = "EBACC05532SY";
  private final static String SELECT_DEBITPRODUCTCODE = "EBACC05533SY";	
  private final String SELECT_BUSINESSUNIT = "EBACC05846SY";	
  private final String SELECT_INVESTMENTPURPOSE = "EBACC05848SY";
  private final String SELECT_OPERATINGUNIT = "EBACC05847SY";
  //Sushil
  private final static String SELECT_TAXCODE_SQL = "EBACC05534SY";
  private final static String SELECT_GLDEPARTMENTID_SQL = "EBACC05535SY";
  private final static String SELECT_CROSSDATAVALIDATION_SQL = "EBACC05536SY";
  private final static String SELECT_ISPALACCOUNT_SQL="EBACC05593SY";

  //vikash..
  private final static String SELECT_BRANCHCODE_COUNT_SQL = "EBACC05537SY";
  private final static String SELECT_CURRENCYCODE_COUNT_SQL = "EBACC05538SY";
  private final static String SELECT_SEGMENTCODE_COUNT_SQL = "EBACC05539SY";
  
  //Added by Prakash
  private final static String   SELECT_PRODUCTCODEACC_SQL = "EBACC05541SY";
  private final static String   SELECT_CURRENCYCODE_SQL = "EBACC05543SY";
  private final static String  SELECT_ACCOUNTCLASSIFICATION_SQL = "EBACC05544SY";
  
  //ADDED BY MAYANK

  private final static String   SELECT_TAXCTGCODE_SQL = "EBACC05545SY";
  private final static String  SELECT_PRIORYEARMAP_SQL = "EBACC05546SY";
  private final static String  SELECT_GLDEPTMAP_SQL = "EBACC05983SY";
  
//Added by Meena(1584265)
  private static final java.lang.String INSERT_TXNACCOUNTS = "EBACC00730SY";
  private static final java.lang.String UPDATE_TXNACCOUNTS = "EBACC00727SY";
  private static final java.lang.String DELETE_TXNACCOUNT = "EBACC00724SY";
  private static final java.lang.String SELECT_TXNACCOUNT = "EBACC00726SY";
  //Added by arun For max account limits.

	private final static String SELECT_FIND_PRODUCTCODE = " SELECT ACCOUNT.CURRENCYCODE, ACCOUNT.ACCOUNTNO FROM MASTREL JOIN ACCOUNT ON ACCOUNT.MASTERNO = MASTREL.MASTERNO   " +
  		" AND ACCOUNT.ACCTCURRENTSTATUS <> 'C' AND STATUSFLAG <>'18' JOIN PRD ON ACCOUNT.PRODUCTCODE = PRD.PRODUCTCODE  AND PRD.PRODUCTCODE= ACCOUNT.productCode" +
  		" WHERE MASTREL.PRIMARYFLAG='Y' AND MASTREL.RELATIONSHIPNO= ? " +
  		" AND PRD.PRODUCTCODE=  ? ";
	//END 
  
  /*Added By : Pravin for EBBSHRM-8571-UKDE Negative Interest_Rate : eBBS Harmonization    **** */ 
  
  
  /*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
	//private final String INSERT_ACCSCIFATCA="INSERT INTO ACCSCIFATCA(FACCOUNTNO,CURRENCYCODE,FATCADOCTYPE,FATCASTATUS,RECALSTATUS,APPROVEDEXCEPFLAG,COMMENTS) VALUES(?,?,?,?,?,?,?)";		
	private final String INSERT_ACCSCIFATCA="EBACC00384SY";
	
	private final String SELECT_ACCSCIFATCA="EBACC00385SY";
	//private final String SELECT_ACCSCIFATCA="SELECT FATCADOCTYPE,FATCASTATUS,RECALSTATUS,APPROVEDEXCEPFLAG,COMMENTS FROM ACCSCIFATCA WHERE  FACCOUNTNO=? AND CURRENCYCODE=?" ; 	
	//private final String SELECT_ACCSCIFATCA="SELECT ASCI.FATCADOCTYPE,ASCI.FATCASTATUS,ASCI.RECALSTATUS,ASCI.APPROVEDEXCEPFLAG,ASCI.COMMENTS,FATD.DESCRIPTION FROM ACCSCIFATCA ASCI INNER JOIN FATCADOC FATD ON ASCI.FATCADOCTYPE=FATD.FATCADOCTYPE WHERE  ASCI.FACCOUNTNO=? AND ASCI.CURRENCYCODE=?";
	
	//private final String UPDATE_ACCSCIFATCA="UPDATE ACCSCIFATCA SET FATCADOCTYPE=?,FATCASTATUS=?,RECALSTATUS=?,APPROVEDEXCEPFLAG=?,COMMENTS=?  WHERE FACCOUNTNO=? AND CURRENCYCODE =? ";	
	private final String UPDATE_ACCSCIFATCA="EBACC00386SY";
	
	private final String DELETE_ACCSCIFATCA= "EBACC00387SY";

	private final String MODIFY_DELETE_ACCSCIFATCA="EBACC00388SY";
	
	//ends here
	
	  //Added by 1591279 for VH E10-US Migration 
	  private final static String FIND_ACCOUNTNO_ACCINFO = "EBACC05985SY";
	  
	  //Added by 1591174 for BH-BenefitPay
	  private final static String FIND_BY_IBANNO = "EBACC05986SY";

	//E11.13 changes begin by 1432839 - subhashini G
	//String FIND_ALL_MASTERNO_BY_PRIMARY_RELATIONSHIP = "select CURRENCYCODE,ACCOUNTNO from ACCOUNT where MASTERNO IN (SELECT MASTERNO from MASTREL where RELATIONSHIPNO = ? AND PRIMARYFLAG='Y') FOR READ ONLY";
	//added by 1645534
	private final String COUNT_ACCINFO_BY_INFORMATIONCODES="SELECT COUNT(1) FROM ACCINFO WHERE  ACCOUNTNO=? AND CURRENCYCODE=? AND INFORMATIONCODE IN ('GBN','HKI','QTA')" ;
	
	private final String FIND_ALL_MASTERNO_BY_PRIMARY_RELATIONSHIP = "EBACC06758SY";
	//E11.13 changes end
	  private static final java.lang.String FIND_BY_MASTERNO_PAGINATION = "EBACC00738SY";
	private final String ACCTCURRENTSTATUS_A ="EBACC069013SY";
	private final String ACCTCURRENTSTATUS_D ="EBACC069014SY";
	
	
	private final String ACCOUNT_INTEREST_STAGING_CAPITALISATION ="INSERT INTO ACCINTPROCSTG (CURRENCYCODE,ACCOUNTNO,EXECDATE,PROCESSSTATUS,PROCESSTYPE,CRNEXTINTERESTPAYMENTDATE,CRLASTINTERESTPAYMENTDATE,CRINTCAPDATE,CRINTCAPAMOUNT,CRINTBEARINGFLAG,DRINTBEARINGFLAG,REASONCAP,PCRINTACCRUEDAMT,PCRINTADJAMT,PCRMANUALADJAMT,DRNEXTINTERESTPAYMENTDATE,DRLASTINTERESTPAYMENTDATE,DRINTCAPDATE,DRINTCAPAMOUNT,INDTLTDATE,ADVINTINDFLAG,HOLDCRCAP,POSTCRINTEREST,POSTDRINTEREST,POSTPRPPA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	
	
	private final String UPDATE_ACCOUNT_INTEREST_CAPITALISATION ="UPDATE ACCOUNT SET CRNEXTINTPAYDATE = ? ,DRNEXTINTPAYDATE = ? , CRLASTINTPAYDATE=? , DRLASTINTPAYDATE=? ,CRINTACCRUEDAMT = ?,CRINTADJAMT= ?,CRMANUALADJAMT= ?,POSCRINTACCRUEDAMT= ?,POSCRINTADJAMT= ?,NEGCRINTACCRUEDAMT= ?,NEGCRINTADJAMT= ?,POSCRMANUALADJAMT= ?,NEGCRMANUALADJAMT = ?,PCRINTACCRUEDAMT= ?, PCRINTADJAMT= ?,PCRMANUALADJAMT= ?,DRINTACCRUEDAMT= ?,DRINTADJAMT= ?,DRMANUALADJAMT=?,CRINTCOMPOUND=?,DRINTCOMPOUND=?  WHERE CURRENCYCODE=? AND ACCOUNTNO=?";

	private final String UPDATE_STAGING_STATUS ="UPDATE ACCINTPROCSTG SET PROCESSSTATUS = ? WHERE CURRENCYCODE=? AND ACCOUNTNO=? AND EXECDATE=? AND PROCESSTYPE=?";
	
	private final String ACCOUNT_INTEREST_STAGING_ACCRUAL ="INSERT INTO ACCINTPROCSTG (CURRENCYCODE,ACCOUNTNO,EXECDATE,PROCESSSTATUS,PROCESSTYPE,CREDITINTERESTACCRUED,NEGCRINTACCUREDAMT,POSCRINTACCUREDAMT,DEBITINTERESTACCRUED,LASTCRINTRATE,LASTDRINTRATE,LASTEXSINTRATE,CRLASTACCRUALDATE,DRLASTACCRUALDATE,CRNEXTINTERESTPAYMENTDATE,DRNEXTINTERESTPAYMENTDATE,LASTCRINTCOMPOUNDEDDATE,LASTDRINTCOMPOUNDEDDATE,CRNEXTCOMPDATE,DRNEXTCOMPDATE,CRINTTOCOMPOUND,DRINTTOCOMPOUND,NEGCRINTFLAG) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	
	private final String DELETE_STAGING_STATUS ="DELETE FROM ACCINTPROCSTG  WHERE CURRENCYCODE=? AND ACCOUNTNO=? AND EXECDATE=? AND PROCESSTYPE=?";
	
	private final String UPDATE_AUTO_CLOSE ="UPDATE ACCOUNT set autoclose =?, MAKERBRANCH = ?, MAKERDATE =?, MAKERID =?, MAKERIPADDRESS =?, MAKERTIME =?, CHECKERBRANCH =?, CHECKERDATE =?, CHECKERID =?, CHECKERIPADDRESS =?, CHECKERTIME =?  WHERE CURRENCYCODE=? AND ACCOUNTNO=?  ";
	
	private final String UPDATE_ACCOUNT_INTEREST_ACCRUAL ="UPDATE ACCOUNT SET CRINTACCRUEDAMT=?,NEGCRINTACCRUEDAMT=?,POSCRINTACCRUEDAMT=?,DRINTACCRUEDAMT=?,"+
" LASTCRINTRATE=?,LASTDRINTRATE=?,LASTEXSINTRATE=?, CRLASTACCRUALDATE =? , DRLASTACCRUALDATE= ?, "+
" CRNEXTINTPAYDATE=?,DRNEXTINTPAYDATE=?,LASTCRINTCOMPDATE=?,LASTDRINTCOMPDATE=?, "+
" NEXTCRINTCOMPDATE=? , NEXTDRINTCOMPDATE=?,CRINTCOMPOUND=?,DRINTCOMPOUND=? "+
" WHERE CURRENCYCODE=? AND ACCOUNTNO=?";
	
	private final String UPDATE_ACCOUNT_INTEREST_ACCRUAL_HOLIDAYS ="UPDATE ACCOUNT SET CRINTACCRUEDAMT=?,NEGCRINTACCRUEDAMT=?,POSCRINTACCRUEDAMT=?,DRINTACCRUEDAMT=?,"+
	" LASTCRINTRATE=?,LASTDRINTRATE=?,LASTEXSINTRATE=?, CRLASTACCRUALDATE =? , DRLASTACCRUALDATE= ?, "+
	" LASTCRINTCOMPDATE=?,LASTDRINTCOMPDATE=?, "+
	" NEXTCRINTCOMPDATE=? , NEXTDRINTCOMPDATE=?,CRINTCOMPOUND=?,DRINTCOMPOUND=? "+
	" WHERE CURRENCYCODE=? AND ACCOUNTNO=?";
	
	
	//Added for CI 5740596
	private static final String INSERT_SECCASHACCT ="EBACC0690155SY";
	private static final String SELECT_SECCASHACCT ="EBACC0690166SY";
	private static final String DELETE_SECCASHACCT ="EBACC0690177SY";
	
	private final String UPDATE_ACCOUNT_EXCESSACCURAL = "EBACC067586SY";
    //Added by 1572177 for EDF
	  private static final java.lang.String INSERT_SACCOUNT = "EBACC067517SY";
	  private static final java.lang.String STORE_SACCOUNT = "EBACC067516SY";
	  private static final java.lang.String SELECT_SACCOUNT = "EBACC067515SY";

	private static final String INSERT_LINKACINFO = "EBACC000255SY";
	private static final String SELECT_LINKACINFO = "EBACC000256SY";
	private static final String DELETE_LINKACINFO = "EBACC000257SY";
	private static final String UPDATE_LINKACINFO = "EBACC000258SY";
	private static final String MODIFY_DELETE_LINKACINFO = "EBACC000259SY";
	
	private final String SELECT_RPR_CODE_COUNT_SQL = "EBACC000265SY";
	private static final java.lang.String CHECK_VALIDRPRCODE = "EBINF970999DK";
	private static final java.lang.String SELECT_EXISTING_RECORDS = "EBINF970993DK";
	private static final java.lang.String UPDATE_RPRSAUPLOADP = "EBINF970994DK";
	private static final java.lang.String SELECT_PROD_SEG_CODE ="EBINF970996DK";
	private static final java.lang.String CHECK_RPR_CODE_CURR_CODE_PRO_CODE_SEG_CODE_COMBINATION ="EBINF970998DK";
	private static final java.lang.String CHECK_RPR_CODE_CURR_CODE_PRO_CODE_COMBINATION ="EBINF9709991DK";
	private static final java.lang.String CHECK_RPR_CODE_CURR_CODE_COMBINATION ="EBINF9709910DK";

	private static final java.lang.String CREATE_ACCMISC = "EBACC08101SY";
	private static final java.lang.String UPDATE_ACCMISC = "EBACC08102SY";
	private static final java.lang.String SELECT_ACCMISC = "EBACC08107SY";


	public SubsidiaryAccountHelper() {
		super();
		//System.out.println("SubsidiaryAccountHelper() Parameterless constructor");
		//scb.util.LogWriter.getInstance().printDebugMode("SubsidiaryAccountHelper() Parameterless constructor");

	}

	public SubsidiaryAccountHelper(EntityContext argEntityCtx) {

		entityCtx = argEntityCtx;
	}

	/**
	 * createAccountCharge method comment
	 *
	 * @Modified date (10/06/2003 5:38:35 PM)
	 * @Purpose Inserts Accountcharge Details
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param wrapper []
	 *            scb.ebbs.accounts.wrapper.AccountChargeWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */

	public void createAccountCharge(SubsidiaryAccountEntityKey key, AccountChargeWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACCHARGE, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus != EBBSConstants.DELETED) {
					stmt.setString(1, key.currencyCode);
					stmt.setString(2, key.accountNo);
					stmt.setString(3, wrapper[i].chargeCode);
					stmt.setString(4, Utility.getString(wrapper[i].chargesWaivedFlag));
					stmt.setBigDecimal(5, wrapper[i].chargeOffset);
					//Code Added by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
					stmt.setDouble(6,wrapper[i].chargePercent);
					stmt.setDate(7,wrapper[i].reviewDate);
					stmt.setString(8,wrapper[i].waiverReason);
					// Ends Here.
					 //Added by balaji for E12 Migration - R1 Phase - Project id 09002841
					stmt.setString(9, Utility.getString(wrapper[i].discountFlag));
					stmt.setString(10, Utility.getString(wrapper[i].systemGeneratedFlag));
					stmt.setInt(11, wrapper[i].noOfDiscounts);
					stmt.setBigDecimal(12, wrapper[i].availableDiscount);
					//Start -SIMCO R3<<Locker Charges>>
					stmt.setString(13, Utility.getString(wrapper[i].chargeGroupFlag));	
					//End -SIMCO R3<<Locker Charges>>
					if (stmt.executeUpdate() <= 0) {
						throw new CreateException();
					}
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * createAccountLinks method comment
	 *
	 * @author B.Kumar
	 * @Creation date (10/06/2003 5:38:35 PM)
	 * @Purpose Inserts AccountLinks Details
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param wrapper[]
	 *            scb.ebbs.accounts.wrapper.AccountLinksWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */

	public void createAccountLinks(SubsidiaryAccountEntityKey key, AccountLinksWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACCLINKS, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, key.accountNo);
				stmt.setString(2, key.currencyCode);
				stmt.setString(3, String.valueOf(wrapper[i].seqNo));
				stmt.setString(4, wrapper[i].templateId);
				stmt.setString(5, wrapper[i].accountNo);
				stmt.setString(6, wrapper[i].currencyCode);
				stmt.setString(7, wrapper[i].masterNumber);
				stmt.setString(8, wrapper[i].relationshipNo);
				stmt.setString(9, Utility.getString(wrapper[i].accountType));
				stmt.setString(10, String.valueOf(wrapper[i].branchCode));
				stmt.setString(11, String.valueOf(wrapper[i].productCode));

				if (stmt.executeUpdate() <= 0) {
					throw new CreateException();
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * createAccountNominee method comment
	 *
	 * @Modified date (10/06/2003 5:38:35 PM)
	 * @Purpose Inserts AccountLinks Details
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param wrapper[]
	 *            scb.ebbs.accounts.wrapper.AccountNomineeWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */
	public void createAccountNominee(SubsidiaryAccountEntityKey key, AccountNomineeWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACNOMINEE, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus != EBBSConstants.DELETED) {
					stmt.setString(1, key.currencyCode);
					stmt.setString(2, key.accountNo);
					stmt.setString(3, String.valueOf(wrapper[i].seqNo));
					stmt.setString(4, wrapper[i].relationshipNo);
					stmt.setString(5, wrapper[i].name);
					stmt.setString(6, wrapper[i].flatNo);
					stmt.setString(7, wrapper[i].buildingName);
					stmt.setString(8, wrapper[i].streetName);
					stmt.setString(9, wrapper[i].locationCode);
					stmt.setString(10, wrapper[i].postBox);
					stmt.setString(11, wrapper[i].cityCode);
					stmt.setString(12, wrapper[i].countryCode);
					stmt.setString(13, wrapper[i].postalCode);
					stmt.setString(14, wrapper[i].telephoneNo);
					// stmt.setString(15, wrapper[i].addressee);
					stmt.setString(15, wrapper[i].address1);
					stmt.setString(16, wrapper[i].address2);
					stmt.setString(17, wrapper[i].cityName);
					stmt.setString(18, wrapper[i].state);
					stmt.setString(19, wrapper[i].attentionParty);
					stmt.setString(20, wrapper[i].nearLandmark);
					stmt.setString(21, String.valueOf(wrapper[i].noYrsCurrentAddress));
					stmt.setString(22, Utility.getString(wrapper[i].isMailingAddress));
					//Changes added for EBBSHRM-53506
					// Changes done by Jahnavi for AccountNomineePrint to India E12 - New Field added NomineeRegistered to ACNOM,TACNOM Table
					stmt.setString(23, Utility.getString(wrapper[i].isNomineeRegistered));
					//End
					stmt.setDate(24,wrapper[i].lastUpdatedDate); // CBRCPBE-340 - lastUpdatedDate added - 1562748
					//IN NOMINEE
					
					stmt.setString(25, Utility.getString(wrapper[i].nomConsentTaken)); // char field
					stmt.setString(26, wrapper[i].nominationType); // String field
					stmt.setString(27, wrapper[i].nomord); // String field
					stmt.setBigDecimal(28, wrapper[i].nomShare); // BigDecimal field
					stmt.setString(29, wrapper[i].address3); // String field
					stmt.setString(30, wrapper[i].nomEmail); // String field
					stmt.setString(31, wrapper[i].nomMob); // String field
					stmt.setString(32, wrapper[i].nomRelTypeCode); // String field
					stmt.setInt(33, wrapper[i].nomAge); // int field
					stmt.setDate(34, wrapper[i].nomAgeason); // Date field
					stmt.setDate(35, wrapper[i].nomDob); // Date field
					stmt.setString(36, wrapper[i].nomGrdnName); // String field
					stmt.setString(37, wrapper[i].nomGrdnAddress); // String field
					stmt.setString(38, wrapper[i].nomGrdnRelTypeCode); // String field
					stmt.setString(39, wrapper[i].nomGrdnMobile); // String field
					stmt.setString(40, wrapper[i].nomGrdnEmail); // String field
					stmt.setInt(41, wrapper[i].nomGrdnAge); // int field
					stmt.setDate(42, wrapper[i].nomGrdnAgeASON); // Date field
					stmt.setString(43, Utility.getString(wrapper[i].isDeceased)); // char field
					stmt.setDate(44, wrapper[i].deceasedRecvDate); // Date field
					if (stmt.executeUpdate() <= 0) {
						throw new CreateException();
					}
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * createInfoType method comment
	 *
	 * @author B.Kumar
	 * @Modified date (10/06/2003 5:38:35 PM)
	 * @Purpose Inserts AccountLinks Details
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param wrapper[]
	 *            scb.ebbs.accounts.wrapper.scb.ebbs.accounts.wrapper.SubsidiaryAccountInfoTypeWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */
	public void createInfoType(SubsidiaryAccountEntityKey key, scb.general.wrapper.GenericInfoTypeWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject ps = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(INSERT_ACCINFOTYPE, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus != EBBSConstants.DELETED) {
					ps.setString(1, key.accountNo);
					ps.setString(2, key.currencyCode);
					ps.setString(3, wrapper[i].seqNo);
					ps.setString(4, wrapper[i].misCode);
					ps.setString(5, wrapper[i].misValue);

					if (ps.executeUpdate() == 0) {
						throw new CreateException("Unable to create Child.");
					}
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16
			// reengineering
			throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} finally {
			try {
				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
			}

		}

	}

	/**
	 * OBOR-14465
	 * @param key
	 * @param languageCode
	 * @param abstractWrapper
	 * @throws javax.ejb.CreateException
	 */
	public void createMultilingualInfoType(SubsidiaryAccountEntityKey key, String languageCode, AbstractWrapper[] abstractWrapper)
			throws  javax.ejb.CreateException {
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "createMultilingualInfoType");
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
        //System.out.println("Inside multilingual Create InfoType");
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_MACCINFO);

            if (abstractWrapper!= null && abstractWrapper.length >0) {
                for (int i = 0; i < abstractWrapper.length; i++) {
                    //if(wrapper[i].recordStatus!=EBBSConstants.DELETED)
                    //	{
                    scb.general.wrapper.GenericInfoTypeWrapper genericInfoTypeWrapper =  (scb.general.wrapper.GenericInfoTypeWrapper)abstractWrapper[i];

                    stmt.setString(1, key.accountNo);
                    stmt.setString(2, key.currencyCode);
                    stmt.setString(3, genericInfoTypeWrapper.seqNo);
                    stmt.setString(4, genericInfoTypeWrapper.misCodeLangDescription);
                    stmt.setString(5, genericInfoTypeWrapper.misValueLangDescription);
                    stmt.setString(6, languageCode);

                    if (stmt.executeUpdate() == 0)
                        throw new CreateException("Unable to create Child.");
                }
            }
		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException se) {
			se.printStackTrace();
			throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}
	// code changed by S.Ramesh for E10-MLTS on 4-06-2005
	public void createMultilingualObject(SubsidiaryAccountEntityKey key, Vector languageComponentVector, SubsidiaryAccountWrapper wrapper) throws javax.ejb.CreateException {
		SQLStatementObject stmt = null;
		SQLExecutor con = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (!languageComponentVector.isEmpty()) {

				HashMap valueHash = null;
				stmt = con.getStatementObject(INSERT_MACCOUNT, false, false);
				for (int i = 0; i < languageComponentVector.size(); i++) {
					valueHash = (HashMap) languageComponentVector.get(i);
					if (valueHash == null) {
						continue;
					}
					String languageCode = (String) valueHash.get("LANGUAGECODE");
					if (languageCode != EBBSConstants.ENGLISH_LANGUAGE) {
						stmt.setString(1, key.currencyCode);
						stmt.setString(2, key.accountNo);
						stmt.setString(3, (String) valueHash.get("ACCOUNTTITLE"));
						stmt.setString(4, languageCode);
						stmt.setString(5, (String) valueHash.get("ACCOUNTTITLE2"));
						stmt.setString(6, (String) valueHash.get("SHORTNAME"));
						int result = stmt.executeUpdate();
						if (result != 1) {
							throw new CreateException();
						}
					}
					if(wrapper.maccountInfoTypeWrapper != null){
					createMultilingualInfoType(key, languageCode, wrapper.maccountInfoTypeWrapper);}
				}

			}
		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (IllegalArgumentException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.ILLEGAL_ARGUMENT_EXCEPTION);
		} catch (Exception e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException();
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);// //-
				// F16
				// reengineering
				throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
	}

	/**
	 * createAccountLinks method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Modified date (10/06/2003 5:38:35 PM)
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */

	public void createMaster(SubsidiaryAccountWrapper wrapper) throws javax.ejb.CreateException {
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "createMaster");

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		log.println("createMaster started----------------");
  
		try {
			Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACCOUNT, false, false);

			stmt.setString(1, wrapper.currencyCode);
			stmt.setString(2, wrapper.accountNo);
			stmt.setString(3, wrapper.masterNo);
			stmt.setString(4, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
			stmt.setString(5, wrapper.productCode);

			stmt.setString(6, wrapper.segmentCode);
			stmt.setString(7, wrapper.operatingInstruct);
			stmt.setString(8, wrapper.crInterestCurrencyCode);
			stmt.setString(9, wrapper.crInterestAccountNo);
			stmt.setString(10, wrapper.drInterestCurrencyCode);
			stmt.setString(11, wrapper.drInterestAccountNo);

			stmt.setString(12, Utility.getString(wrapper.crIntIndicatorFlag));
			stmt.setString(13, Utility.getString(wrapper.drIntIndicatorFlag));

			if (wrapper.interestCode != null) {
				stmt.setString(14, wrapper.interestCode);
			} else {
				stmt.setString(14, "9999");
			}

			stmt.setString(15, Utility.getString(wrapper.advIntIndicator));
			stmt.setString(16, Utility.getString(wrapper.interestStmtIndicatorFlag));
			stmt.setString(17, wrapper.accountClassCode);
			stmt.setString(18, Utility.getString(wrapper.blockFlag));
			stmt.setString(19, Utility.getString(wrapper.exchangeControlFlag));
			stmt.setString(20, Utility.getString(wrapper.prppaFlag));
			stmt.setString(21, Utility.getString(wrapper.frozenSurrender));
			stmt.setString(22, Utility.getString(wrapper.matchingFlag));

			stmt.setBigDecimal(23, wrapper.forwardCoverRate);
			stmt.setBigDecimal(24, wrapper.exchangeRate);
			stmt.setString(25, wrapper.notes1);
			stmt.setString(26, wrapper.notes2);
			stmt.setString(27, wrapper.notes3);
			stmt.setString(28, wrapper.memoFlag1);
			stmt.setString(29, wrapper.memoFlag2);
			stmt.setString(30, wrapper.memoFlag3);
			stmt.setString(31, wrapper.memoFlag4);
			stmt.setString(32, wrapper.memoFlag5);
			stmt.setString(33, wrapper.userDefinedCode1);
			stmt.setString(34, wrapper.userDefinedCode2);

			stmt.setString(35, wrapper.userDefinedCode3);
			stmt.setString(36, wrapper.userDefinedCode4);
			stmt.setString(37, wrapper.userDefinedCode5);
			stmt.setString(38, wrapper.userDefinedCode6);
			stmt.setString(39, wrapper.userDefinedCode7);
			stmt.setString(40, wrapper.userDefinedCode8);
			stmt.setString(41, wrapper.userDefinedCode9);
			stmt.setString(42, wrapper.userDefinedCode10);
			stmt.setString(43, wrapper.accountClosureReason);

			stmt.setDate(44, wrapper.accountCloseDate);
			stmt.setString(45, Utility.getString(wrapper.bulkChargesFlag));
			stmt.setString(46, Utility.getString(wrapper.bulkingFrequency));

			stmt.setDate(47, wrapper.bulkExecutionDate);
			stmt.setDate(48, wrapper.accountOpenDate);

			stmt.setString(49, Utility.getString(wrapper.refEntriesMarker));
			stmt.setString(50, Utility.getString(wrapper.rejEntriesMarker));

			stmt.setString(51, wrapper.makerDetail.getUserBranch());
			stmt.setDate(52, wrapper.makerDetail.getUserDate());
			stmt.setString(53, wrapper.makerDetail.getUserID());
			stmt.setString(54, wrapper.makerDetail.getUserIPAddress());
			stmt.setTime(55, wrapper.makerDetail.getUserTime());
			// if condition added by saleem for updating cheker details when
			// creating from QuickAccountOpening
			if (wrapper.checkerDetail == null) {
				// System.out.println("if checker detail is null in
				// subacchelper");
				wrapper.checkerDetail = new scb.wrapper.UserDetail();
			}
			// end
			stmt.setString(56, wrapper.checkerDetail.getUserBranch());
			//setting eoddate for checkerdate to identify events
			//stmt.setDate(57, eoddate);
			stmt.setDate(57, wrapper.checkerDetail.getUserDate());
			stmt.setString(58, wrapper.checkerDetail.getUserID());
			stmt.setString(59, wrapper.checkerDetail.getUserIPAddress());
			stmt.setTime(60, wrapper.checkerDetail.getUserTime());
			stmt.setInt(61, wrapper.statusFlag);
			stmt.setString(62, wrapper.accountBranch);
			stmt.setString(63, wrapper.ucaCode);
			stmt.setString(64, Utility.getString(wrapper.isEbswCustSwift));
			stmt.setString(65, wrapper.ebswCustSwift);

			stmt.setString(66, Utility.getString(wrapper.accountCurrentStatus));
			stmt.setDate(67, wrapper.transToDormantDate);
			stmt.setDate(68, wrapper.transToUnclaimDate);
			stmt.setDate(69, wrapper.renewRolloverDate);
			stmt.setDate(70, wrapper.reactiveDate);

			stmt.setDate(71, wrapper.lastDrTrnDate);
			stmt.setDate(72, wrapper.lastCrTrnDate);
			stmt.setDate(73, wrapper.lastCrTrnExclSysDate);
			stmt.setDate(74, wrapper.lastDrTrnExclSysDate);
			stmt.setDate(75, wrapper.crLastAccrualDate);
			stmt.setDate(76, wrapper.drLastAccrualDate);
			stmt.setDate(77, wrapper.crLastInterestPaymentDate);
			stmt.setDate(78, wrapper.drLastInterestPaymentDate);
			stmt.setDate(79, wrapper.crNextInterestPaymentDate);
			stmt.setDate(80, wrapper.drNextInterestPaymentDate);
			stmt.setString(81, Utility.getString(wrapper.interestInSuspenceFlag));

			// CRINTACCRUEDAMT,DRINTACCRUEDAMT,CRINTADJAMT,DRINTADJAMT,CRMANUALADJAMT,DRMANUALADJAMT

			stmt.setBigDecimal(82, wrapper.creditInterestAccrued);
			stmt.setBigDecimal(83, wrapper.debitInterestAccrued);
			stmt.setBigDecimal(84, wrapper.creditInterestAdjustment);
			stmt.setBigDecimal(85, wrapper.debitInterestAdjustment);
			stmt.setBigDecimal(86, wrapper.creditManualAdjustment);
			stmt.setBigDecimal(87, wrapper.debitManualAdjustment);
			stmt.setBigDecimal(88, wrapper.provisionAdjustmentAmount);
			wrapper.isIncludedInInterestPooling = 'N';
			stmt.setString(89, Utility.getString(wrapper.isIncludedInInterestPooling));
			stmt.setString(90, wrapper.oldAccountNumber);
			stmt.setDate(91, wrapper.lastOfflineChargesProcessedDate);
			stmt.setString(92, Utility.getString(wrapper.supressStatementFlag));

			stmt.setBigDecimal(93, wrapper.transferPricingRate);
			stmt.setString(94, Utility.getString(wrapper.suppressAdviceFlag));
			stmt.setString(95, Utility.getString(wrapper.suppressOtherCorros));
			stmt.setString(96, Utility.getString(wrapper.bulkingTranactionFlag));
//			Commented and modified by Saridha for SIMCO - 10000702_All_TSD_Selfrecon Fix_V1.0.doc
//			stmt.setString(97, String.valueOf(wrapper.selfReconcileFlag));
			stmt.setString(97, Utility.getString(wrapper.selfReconcileTypeFlag));
//			ends here
			stmt.setString(98, Utility.getString(wrapper.instrumentTypeFlag));
			// stmt.setBigDecimal(99, wrapper.thresholdAmount);
			stmt.setString(99, wrapper.limitNo);
			stmt.setString(100, wrapper.limitMasterNo);
			stmt.setString(101, wrapper.debitInterestPrdCode);
			stmt.setString(102, wrapper.creditInterestPrdCode);
			stmt.setString(103, Utility.getString(wrapper.multipleLimits));
			stmt.setBigDecimal(104, wrapper.drLastAccruedAdjAmt);
			stmt.setBigDecimal(105, wrapper.crLastAccruedAdjAmt);
			//Commented for  Limit ReEngineering & Group IOD Project changes
			/*stmt.setString(106, wrapper.intraDayLmtMastNo);
			stmt.setString(107, wrapper.intraDayLmtNo);*/
			stmt.setString(106, Utility.removeNonPrintableAndLinefeed(wrapper.accountTitle));
			stmt.setString(107, Utility.getString(wrapper.supressInterestStmtFlag));
			// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
			stmt.setString(108, wrapper.prppaCurrencyCode);
			stmt.setString(109, wrapper.prppaAccountNo);
			stmt.setBigDecimal(110, wrapper.lastCrintRate);
			stmt.setBigDecimal(111, wrapper.lastDrintRate);
			stmt.setBigDecimal(112, wrapper.lastExsintRate);
			stmt.setBigDecimal(113, wrapper.pcrintAccruedamt);
			stmt.setBigDecimal(114, wrapper.pdrintAccruedamt);
			stmt.setBigDecimal(115, wrapper.pcrintAdjamt);
			stmt.setBigDecimal(116, wrapper.pdrintAdjamt);
			stmt.setBigDecimal(117, wrapper.pcrmanualAdjamt);
			stmt.setBigDecimal(118, wrapper.pdrmanualAdjamt);
			stmt.setString(119, Utility.getString(wrapper.interestEligibilityFlag));
			stmt.setBigDecimal(120, wrapper.crIntAccrForAccrPeriod);
			stmt.setBigDecimal(121, wrapper.drIntAccrForAccrPeriod);
			stmt.setString(122, wrapper.reasonForIntForfeiture);
			// stmt.setString(125, wrapper.chargeProductCode);
			// included by sumithra on 11.02.2004 for Tax - PH030
			stmt.setString(123, wrapper.taxNomCurrCode);
			stmt.setString(124, wrapper.taxNomAccountNo);
			stmt.setString(125, wrapper.taxCtgCode);
			stmt.setDate(126, wrapper.maturityDate);
			stmt.setDate(127, wrapper.lastTaxApplDate);
			stmt.setDate(128, wrapper.lastCondIntApplDate);
			// end
			// change ends here
			// Added for Japan Retrofit - Suthahar Akbar on 18.5.2005
			stmt.setString(129, Utility.getString(wrapper.conSolStmtFlag));
			// code changed by S.Ramesh for E-10-SubAccount on 25-05-2005
			stmt.setString(130, wrapper.mirrorTrnCurr);
			stmt.setString(131, wrapper.mirrorTrnAccNo);
			stmt.setString(132, wrapper.glDepartmentID);
			// Added by Jayanthi for Compounding Interest
			stmt.setDate(133, wrapper.crNextCompDate);
			stmt.setDate(134, wrapper.drNextCompDate);
			stmt.setDate(135, wrapper.lastcrIntCompoundedDate);
			stmt.setDate(136, wrapper.lastdrIntCompoundedDate);
			stmt.setBigDecimal(137, wrapper.crIntToCompound);
			stmt.setBigDecimal(138, wrapper.drIntToCompound);
			stmt.setString(139, Utility.getString(wrapper.autoClose));
			// End Change
			// Added by Bavithra for E11 Gap IAS
			// Commented by Anand.K for E12 - INDIA
			// stmt.setString(142, Utility.getString(wrapper.impairmentflag));
			// stmt.setString(143, Utility.getString(wrapper.chargeOffFlag));
			// Added by Shrimathi.S for Flexiline on 05/05/2006
			stmt.setString(140, Utility.getString(wrapper.cacsIndicator));
			// Ends
			// code added by vani for e11 indo gap
			// DSRREFERRALID,DSRSOURCINGID,DSRCLOSINGID
			stmt.setString(141, wrapper.referralID);
			stmt.setString(142, wrapper.sourcingID);
			stmt.setString(143, wrapper.closingID);

			// Added by yusuf for E11 day2 fields added:
			// CHANNELID,ORIGMAKERID,ORIGMAKERDATE,ORIGMAKIPADDRESS,ORIGMAKTIME,ORGMAKBRANCH
			stmt.setString(144, wrapper.channelID);
			 if(wrapper.originatorMakerDetail==null) {
				wrapper.originatorMakerDetail=new UserDetail();
			}
			//System.out.println("The wrapper.originatorMakerDetail value is"+wrapper.originatorMakerDetail);
			//scb.util.LogWriter.getInstance().printDebugMode("The wrapper.originatorMakerDetail value is"+wrapper.originatorMakerDetail);
			stmt.setString(145, wrapper.originatorMakerDetail.getUserID());
			stmt.setDate(146, wrapper.originatorMakerDetail.getUserDate());
			stmt.setString(147, wrapper.originatorMakerDetail.getUserIPAddress());
			stmt.setTime(148, wrapper.originatorMakerDetail.getUserTime());
			stmt.setString(149, wrapper.originatorMakerDetail.getUserBranch());

			//Added by Saritha Sebastian : on MArch 14
			/*if(wrapper.calenderAccountOpenDate != null){
				stmt.setDate(152, wrapper.calenderAccountOpenDate);// added by
			} else if (wrapper.checkerDetail.getUserDate() != null){
				stmt.setDate(152, wrapper.checkerDetail.getUserDate());
			} else {
				stmt.setDate(152, wrapper.makerDetail.getUserDate());
			}*/
			if(wrapper.calenderAccountOpenDate != null){
				stmt.setDate(150, wrapper.calenderAccountOpenDate);
			} 
			else {
			stmt.setDate(150, wrapper.accountOpenDate);
			}
			// venkatachalapathy
			// for R1 E12
			// India eBBS on
			// 19-09-2007
			// Code Added by selvarasu for e12 on 16-Nov-07
			if(wrapper.accountCategory=='\u0000'){
				wrapper.accountCategory='N';
			} 
			stmt.setString(151, Utility.getString(wrapper.accountCategory));
			// Code Ends Here
			// Added by murugan for INDIA E12
			stmt.setString(152, wrapper.oldProductCode);
			stmt.setString(153, wrapper.oldMasterNo);
			stmt.setDate(154, wrapper.lastPrdChangeDt);
			stmt.setDate(155, wrapper.lastMasterChangeDt);
			// End by murugan

			// Code added by Sangeetha
			//changes done by ramachandran to assign correct field mapping for Last Dr,Cr amount
			stmt.setBigDecimal(156, wrapper.lastDrTrnAmt);
			stmt.setBigDecimal(157, wrapper.lastCrTrnAmt);
			// ends here
			stmt.setBigDecimal(158, wrapper.lastCrTrnExclTrnAmt);
			stmt.setBigDecimal(159, wrapper.lastDrTrnExclTrnAmt);
			// End of code added
			if(wrapper.provisionStatusFlag=='\u0000'){
				wrapper.provisionStatusFlag='N';
			}
			stmt.setString(160, Utility.getString(wrapper.provisionStatusFlag));
			stmt.setString(161, Utility.getString(wrapper.cacsDownReason));
		//	stmt.setString(162, Utility.getString(wrapper.utilizeIntrdayLimitFlag));Commented for  Limit ReEngineering & Group IOD Project changes
			if(wrapper.tccFlag=='\u0000'){
				wrapper.tccFlag='M';
			}
			//System.out.println("tccFlag"+wrapper.tccFlag);
			//scb.util.LogWriter.getInstance().println("tccFlag"+wrapper.tccFlag);
			stmt.setString(162, Utility.getString(wrapper.tccFlag));
			stmt.setDate(163, wrapper.lastRiskChangeDate);
			if(wrapper.IBAN == null){
				//Commented by Sherif (1403616) for DE - SYSREFD CLEANUP  (Capability : Account Number Generation) 
				/*try{
				System.out.println("IDGnerator Factory instance is invoked in SubAccHelper...");
				IDGeneratorFactory idf = IDGeneratorFactory.getInstance();
				System.out.println("IDGnerator Factory instance has been created in SubAccHelper...");
				wrapper.IBAN = idf.getIBANforAccount(wrapper);
				System.out.println("IBAN for this account in SubAccHelper is..."+wrapper.IBAN);
				stmt.setString(167, wrapper.IBAN);
				}catch(Exception e){
					e.printStackTrace();
				}*/
				//Added by Sherif(1403616) for DE - SYSREFD CLEANUP  (Capability : Account Number Generation) 
				try{
					
					NumberGenerator numGeneratorIban = NumberGeneratorFactory.getInstance().getNumberGeneratorInstance(BusinessProcessConstants.IBAN_PROCESSID);
					if(numGeneratorIban != null){
						wrapper.IBAN = numGeneratorIban.generateNumber(wrapper);
//						System.out.println("IBAN for this account in SubAccHelper is..."+wrapper.IBAN);
      //scb.util.LogWriter.getInstance("SOP","CLNUP").println("IBAN for this account in SubAccHelper is..."+wrapper.IBAN);
					}
					
					stmt.setString(164, wrapper.IBAN);
				}
				catch (Exception ex) {
					ex.printStackTrace();
					try {
						stmt.setString(164, wrapper.IBAN);
						//throw new scb.exception.SCBApplicationException("NullPointerException occured, NO BPP SETUP available" + ex.getMessage());
					} catch (scb.exception.SCBApplicationException e1) {
						e1.printStackTrace();
					}
				}
				//Ends here by Sherif
			}
			else{
				stmt.setString(164, wrapper.IBAN);
			}
			//Added by Devaraj for the Auto Cheque Reorder
			stmt.setString(165, Utility.getString(wrapper.autoReorderChqBkFlag));
			   //Added by Ramesh N for UK VAT Changes on 23/06/2009
			stmt.setString(166, Utility.getString(wrapper.vccFlag));
			stmt.setString(167, wrapper.vatCtgCode);
            //Added by balaji for E12 Migration - R1 Phase - Project id 09002841 - Field Addition in Others tab
			stmt.setString(168,Utility.getString(wrapper.atmAllowed));
			
			if (wrapper.ivrAllowed != '\u0000') {
				stmt.setString(169,Utility.getString(wrapper.ivrAllowed));
			} else {
				stmt.setString(169, Utility.getString('N'));
			}
			log.println("createMaster started wrapper.ivrAllowed----------------");
		//	stmt.setString(169,Utility.getString(wrapper.ivrAllowed));
			stmt.setString(170,Utility.getString(wrapper.ibankingAllowed));
			stmt.setString(171, Utility.getString(wrapper.impairmentflag));
			stmt.setString(172, Utility.getString(wrapper.chargeOffFlag));
			
		 //Start-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
			stmt.setString(173, Utility.getString(wrapper.suspendImpairment));
			stmt.setString(174, Utility.getString(wrapper.suspendProvision));
			stmt.setString(175, Utility.getString(wrapper.suspendProvision));
         //added by hasi for DAUELIMITs
		   	stmt.setString(176, wrapper.relNoForAcctType);
		    stmt.setString(177, wrapper.acctAddressTypeCode);

		stmt.setString(178,wrapper.daueLimitNo);
		stmt.setString(179,wrapper.daueLimitMasterNo);
		//end by hasi
           //End-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
			//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu
			stmt.setString(180, wrapper.odClassIntCd);
			stmt.setString(181, wrapper.odClassIntPrdCd);
			stmt.setString(182, Utility.getString(wrapper.waiveExcessInterest));
			//ends here
           //Description  :   -> changes done as per New Field Set Up Multi Country Change
			stmt.setString(183, wrapper.deptCode);
			stmt.setString(184, wrapper.reconCode);
			//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
			stmt.setDate(185, wrapper.crActualInterestPaymentDate); 	
			stmt.setDate(186, wrapper.drActualInterestPaymentDate); 
			//ends here
			//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
			stmt.setString(187, wrapper.promoCreditIntCd);
			stmt.setString(188, wrapper.promoCreditIntPrdCd);
			stmt.setString(189, wrapper.promoDebitIntCd);
			stmt.setString(190, wrapper.promoDebitIntPrdCd);
			//ADO 5058573
			if (wrapper.manualDrIntFlag !='\u0000' ){
				stmt.setString(191, Utility.getString(wrapper.manualDrIntFlag));	
			}else{
				stmt.setString(191, Utility.getString('N'));
			}
			if (wrapper.manualCrIntFlag !='\u0000' ){
				stmt.setString(192, Utility.getString(wrapper.manualCrIntFlag));	
			}else{
				stmt.setString(192, Utility.getString('N'));
			}
			//ends here
			//Added by Sivaranjani (1271869)for DODream E12 - RM
			stmt.setBigDecimal(193, wrapper.crSplSystemAdustedInterest);
			stmt.setBigDecimal(194, wrapper.crSplAccruedInterest);
			//Added for SIMCO R4 10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
			stmt.setDate(195, wrapper.nextCRIntChngDt);
			stmt.setDate(196, wrapper.nextDBIntChngDt);
			stmt.setString(197, wrapper.promoCrIntFlag);
			stmt.setString(198, wrapper.promoDbIntFlag);
			//End here
			
			//Added for SIMCO R4 10000702_ALL_TSD_PromotionalBand_V1.0.doc
			stmt.setString(199, wrapper.crPromoCode);
			stmt.setString(200, wrapper.drPromoCode);
			stmt.setString(201, wrapper.splCrIntPrdCd);
			stmt.setString(202, wrapper.splDrIntPrdCd);
			//Ends here 
						
		/*	//added by Rajesh - OriginalMakerID included
			stmt.setString(206, wrapper.originalMakerID);
			//ends */
			stmt.setString(203,Utility.getString(wrapper.splIntIndFlag));
			//Account Reactivation : start
			//1474397 for 1310 Defect 
			stmt.setDate(204, wrapper.accountReOpenDate);
			
			stmt.setString(205, wrapper.accountReOpenReason);
			//End
			//CL-H 6 changes starts
			stmt.setString(206, wrapper.accountTitle2);
             //			CL-H 6 changes ends
			//Added for TH with Reference 13001410_ALL_TSD_TH_WHT_V1.0.docx
			stmt.setString(207, Utility.getString(wrapper.valThresholdFlag));
			//End
			//Added By HAsi 
			stmt.setString(208, Utility.getString(wrapper.ignoreChargeAdvice));
			//Added new column FATCACRSEXCLREASON by 1554622 for Account level restriction project - jira # CBRCPBO-10899
//			System.out.println("wrapper.fatcaCrsExclReason --->"+wrapper.fatcaCrsExclReason);
   //scb.util.LogWriter.getInstance("SOP","CLNUP").println("wrapper.fatcaCrsExclReason --->"+wrapper.fatcaCrsExclReason);
			stmt.setString(209, wrapper.fatcaCrsExclReason);
			//End here by 1554622 for Account level restriction project - jira # CBRCPBO-10899
			//Added by 1541710 - Devi Shree.B, for UK_DE VAT STAMPING
			stmt.setBigDecimal(210, wrapper.posCrIntAccuredAmt);
			stmt.setBigDecimal(211, wrapper.negCrIntAccuredAmt);
			stmt.setBigDecimal(212, wrapper.posCrIntAdjustedAmt);
			stmt.setBigDecimal(213, wrapper.negCrIntAdjustedAmt);
			stmt.setBigDecimal(214, wrapper.posCrManualAdjustment);
			stmt.setBigDecimal(215, wrapper.negCrManualAdjustment);
			
			// Added for IN GST
			stmt.setString(216, wrapper.gstRegistrationNo);
			//ends
			//added by 1563531(Sivanageswarareddy) as part of Day 2
			stmt.setString(217, Utility.getString(wrapper.gstRegistrationFlag));
			stmt.setString(218, Utility.getString(wrapper.gstCustomerSpecialStatus));
			stmt.setString(219, Utility.getString(wrapper.gstCustomerType));
			//added by 1624396 George, added by for EBBSHRM-78916
			stmt.setString(220, Utility.getString(wrapper.intAccProIndicator));
			stmt.setString(221, Utility.getString(wrapper.signaturelevel));  //KEYSTONEHK-29109
			//Added  Account level restriction by 1546761
			stmt.setDate(222, wrapper.lastSigUpdateDT); //KEYSTONEHK-160847
			if (stmt.executeUpdate() != 1) {
				throw new CreateException();
			}

// to creat txnaccounts
			if(enableLeanAccount()) {
				createTxnAccountHelper();
				this.txnAccountHelper.createTxnAccount(wrapper);
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		}

		finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}
	
	private void createTxnAccountHelper() {
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "createTxnAccountHelper");
		log.println("Creating TxnAccountHelper");
		if(this.txnAccountHelper==null) 
		{
			this.txnAccountHelper = new TxnAccountHelper();
			log.println("TxnAccountHelper Created");
		}		
	}

	/**
	 * createAccountLinks method comment
	 *
	 * @Modified date (10/06/2003 5:38:35 PM)
	 * @return scb.wrapper.PrimaryKey
	 * @param wrapperObj
	 *            scb.wrapper.AbstractWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */
	public scb.wrapper.PrimaryKey createObject(scb.wrapper.AbstractWrapper wrapperObj) throws javax.ejb.CreateException {

		//NEX-34785 -Added to switch ON/OFF the casa events
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "createObject");
		EventBusinessParamWrapper evntBusinessParamWrapper = null;
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) wrapperObj;
		SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);



			createMaster(wrapper);

			if (wrapper.accountNomineeWrapper != null) {
				createAccountNominee(key, wrapper.accountNomineeWrapper);
			}
			if (wrapper.accountChargeWrapper != null) {
				createAccountCharge(key, wrapper.accountChargeWrapper);
			}
			if (wrapper.accountLinksWrapper != null) {
				createAccountLinks(key, wrapper.accountLinksWrapper);
			}
			logWriter.println("Before createLinkAccountInformations");
			if (wrapper.linkAccountInformationWrapper != null) {
				logWriter.println("inside if createLinkAccountInformations");
				createLinkAccountInformations(key, wrapper);
			}
			if (wrapper.accountInfoTypeWrapper != null) {
				createInfoType(key, wrapper.accountInfoTypeWrapper);
			}
			// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
			// included by sumithra on 10.02.2004 for PH047 - Nominated Charge
			// Account
			if (wrapper.nominatedChargeAccountWrapper != null) {
				createNominatedChargeAccount(key, wrapper.nominatedChargeAccountWrapper);
			}
			// included by Sumithra on 11.02.2004 for PH030 Tax
			if (wrapper.taxWaiverWrapper != null) {
				createAcTaxWaiver(key, wrapper.taxWaiverWrapper);
			}
			// change ends here
			// code changed by S.Ramesh for E10-MLTS on 4-06-2005
			if (wrapper.languageComponentHash != null) {
				createMultilingualObject(key, wrapper.languageComponentHash,wrapper);
			}
			// Code added by Manikandan for E12 - Customer Linkage on 21-09-2007
			if (wrapper.customerLinkWrapper != null && wrapper.customerLinkWrapper.length > 0) {
				// createCustomerAccLink(key,wrapper.customerLinkWrapper);
				createCustomerAccLink(key, wrapper);
			}
			//Start -SIMCO R3<<Locker Charges>>
			if (wrapper.accountOfflineChargeWrapper  != null) {				
				createAccountOfflineCharge(key, wrapper.accountOfflineChargeWrapper);
			}
			//End -SIMCO R3<<Locker Charges>>
			//Added by Suresh for R3 UK Capability UKCOR19
			if(wrapper.crossDataValidationWrapper != null) {
				createGLDataDetail(key, wrapper.crossDataValidationWrapper);
			}
			 /*Added By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
			if(wrapper.subsidiaryAccountSCIFATCAWrapper!=null){
				  createAccSciFatca(key,wrapper.subsidiaryAccountSCIFATCAWrapper);
			}
			
			logWriter.println("Beforer createSCAcctscAcctNo-"+wrapper.scAcctNo);
			if(wrapper.scAcctNo != null) {
				createSCAcct(wrapper);

			}
			
			if(wrapper.accountMiscWrapper != null) {
				createAccountMisc(key, wrapper);
			}
			
			EventMessageGenerator evtmsgGenerator = new DefaultEventMessageGenerator();		
			evtmsgGenerator.setDomainWrapper(wrapper);
			evtmsgGenerator.setEventId("CASA_CREATE");
			evtmsgGenerator.setContentVersion("V1");
			EventMessageWrapper evtmsg = null;
			try {
				//NEX-34785 -Added to switch ON/OFF the customer events 
				AbstractWrapper[] abstractWrappers = BusinessProcessParamCache.getInstance().getProcessParameters("EVENTALERT");
				 if (abstractWrappers != null) {
					evntBusinessParamWrapper=(EventBusinessParamWrapper) abstractWrappers[0];
				}
				 boolean isNexusAccount=false;
					if(wrapper!=null && wrapper.productCode!=null)
					{
					 isNexusAccount=NexusUtil.getInstance().isNexusAccount(wrapper.productCode);
					}
					log.println("isNexusAccount------->"+isNexusAccount);
				if ((evntBusinessParamWrapper != null) && (evntBusinessParamWrapper.getEnableCasaEvents() != null)
	                    && (evntBusinessParamWrapper.getEnableCasaEvents().equalsIgnoreCase("Y"))) {
					log.println("BPP value obtained to switch ON/OFF the casa events - CASA_CREATE");
				scb.util.LogWriter.getInstance().println("Query CASA CREATE START");
				if(isNexusAccount){
				evtmsg = evtmsgGenerator.generateEvent();
				EventLogger eventLogger = new EventLoggerFactory().getEventLogger("CASA_CREATE");
				eventLogger.logEventForCreate(evtmsg);
				}
				scb.util.LogWriter.getInstance().println("Query CASA CREATE END");
				}
				
				//Added for CasaCardLinkage Events - ADO #5407513
				if(wrapper.isCardLinkageRequired){
					BusinessEvent businessEvent = new BusinessEvent(EBBSBusinessConstants.CASA_CARD_LINK_EVENT, wrapper);
					EventProcessor eventProcessor = EventProcessor.getInstance();
					eventProcessor.triggerEvent(businessEvent);
				}
				
			} catch ( SCBApplicationException e) {
				e.printStackTrace();
			} catch ( EventApplicationException e) {
				e.printStackTrace();
			}
			// Added By Sankar For EOD OPT Changes
			try{
				AccountValidationUtility accountValidationUtility = new AccountValidationUtility();
				accountValidationUtility.fillEODTxnWrapper( wrapper.accountNo, wrapper.currencyCode);
			}catch (Exception e) {
				e.printStackTrace();
			}
			if(enableSAccount()){
				 insertIntoSAccount(key,wrapper);
			}
		return key;

	}

	// Code added by Selvarasu fro e12 india
	private boolean insertHistoryForCustomerAccLink(SubsidiaryAccountEntityKey key, CustomerLinkWrapper[] wrapper, char activeFlag, SubsidiaryAccountWrapper subsidiaryWrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SubsidiaryAccountWrapper mastWrapper = subsidiaryWrapper;

		// CustomerLinkWrapper[]
		// customerLinkWrapper=wrapper.customerLinkWrapper;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_CUSLNK, false, false);

			//System.out.println("Query" + INSERT_CUSLNK);
			//scb.util.LogWriter.getInstance().println("Query" + INSERT_CUSLNK);
			//System.out.println("Wrapper.length" + wrapper.length);
			//scb.util.LogWriter.getInstance().println("Wrapper.length" + wrapper.length);
			
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					// changes done by Yuvarani for India ST
					// wrapper[i].recordStatus=EBBSConstants.NO_CHANGE;//ends
					stmt.setString(1, mastWrapper.currencyCode);
					stmt.setString(2, mastWrapper.accountNo);
					stmt.setString(3, wrapper[i].relationshipTypeCode);
					stmt.setString(4, wrapper[i].relationshipNo);
					stmt.setString(5, Utility.getString(activeFlag));
					stmt.setString(6, mastWrapper.makerDetail.getUserBranch());
					stmt.setString(7, mastWrapper.makerDetail.getUserID());
					stmt.setString(8, mastWrapper.makerDetail.getUserIPAddress());
					stmt.setDate(9, mastWrapper.makerDetail.getUserDate());
					stmt.setTime(10, mastWrapper.makerDetail.getUserTime());
					stmt.setString(11, mastWrapper.checkerDetail.getUserBranch());
					stmt.setString(12, mastWrapper.checkerDetail.getUserID());
					stmt.setString(13, mastWrapper.checkerDetail.getUserIPAddress());
					stmt.setDate(14, mastWrapper.checkerDetail.getUserDate());
					stmt.setTime(15, mastWrapper.checkerDetail.getUserTime());
					stmt.setShort(16, mastWrapper.statusFlag);
					int result = stmt.executeUpdate();
					if (result == 0) {
						throw new CreateException("Unable to create Child.");
					}
				}
				/*
				 * if(stmt.executeUpdate() <= 0) { throw new CreateException(); }
				 */
			}
			boolean cuslnk1 = true;
			return cuslnk1;

		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);
			throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {

			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (IllegalArgumentException iae) {
			scb.util.LogWriter.getInstance().printErrorMessage(iae);
			throw new CreateException(EBBSConstants.ILLEGAL_ARGUMENT_EXCEPTION);
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
				throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
			}
		}
	}

	// End here
	// Code added by Selvarasu fro e12 india
	private boolean updateHistoryForCustomerAccLink(SubsidiaryAccountEntityKey key, CustomerLinkWrapper[] wrapper, char activeFlag, SubsidiaryAccountWrapper subsidiaryWrapper) throws javax.ejb.CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		// SubsidiaryAccountWrapper mastWrapper = subsidiaryWrapper;
		boolean cuslnk2 = true;

		// CustomerLinkWrapper[]
		// customerLinkWrapper=wrapper.customerLinkWrapper;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_CUSLNK, false, false);

			//System.out.println("Query" + UPDATE_CUSLNK);
//scb.util.LogWriter.getInstance().println("Query" + UPDATE_CUSLNK);
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.MODIFIED || wrapper[i].recordStatus == EBBSConstants.DELETED) {					
					logWriter.println("wrapper[i].recordStatus:" + wrapper[i].recordStatus);
					stmt.setString(1, Utility.getString(activeFlag));
					stmt.setString(2, key.accountNo);
					stmt.setString(3, key.currencyCode);
					stmt.setString(4, wrapper[i].relationshipNo);
					stmt.executeUpdate();
				}
				/*
				 * if(stmt.executeUpdate() <= 0) { throw new CreateException(); }
				 */

			}
			return cuslnk2;
		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);
			throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {

			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (IllegalArgumentException iae) {
			scb.util.LogWriter.getInstance().printErrorMessage(iae);
			throw new CreateException(EBBSConstants.ILLEGAL_ARGUMENT_EXCEPTION);
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
				throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
			}
		}
	}

	// End here

	/**
	 * fetchAccountCharge method comment Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @Purpose fetching AccountCharge Details
	 * @returnType scb.ebbs.accounts.wrapper.AccountChargeWrapper[]
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public AccountChargeWrapper[] fetchAccountCharge(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		AccountChargeWrapper[] resultWrapper = null;
		AccountChargeWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		Vector result = new Vector();

		try {
			BusinessInfo bi = BusinessInfo.getInstance();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCHARGE, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCHARGE, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();

			while (rs.next()) {
				wrapper = new AccountChargeWrapper();
				wrapper.chargeCode = rs.getString(1);
				wrapper.chargesWaivedFlag = Utility.getChar(rs.getString(2));
				wrapper.chargeOffset = rs.getBigDecimal(3);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				wrapper.chargeOffset = bi.setPrecision(key.currencyCode, wrapper.chargeOffset);
				//Code Added by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
				wrapper.chargePercent = rs.getDouble(4);
				wrapper.reviewDate=rs.getDate(5);
				wrapper.waiverReason=rs.getString(6);
				//  Ends Here.
				 //Added by balaji for E12 Migration - R1 Phase - Project id 09002841
				wrapper.discountFlag = Utility.getChar(rs.getString(7));
				wrapper.systemGeneratedFlag = Utility.getChar(rs.getString(8));
				wrapper.noOfDiscounts = rs.getInt(9);
				wrapper.availableDiscount = rs.getBigDecimal(10);
				//Start -SIMCO R3<<Locker Charges>>
				wrapper.chargeGroupFlag = Utility.getChar(rs.getString(11));	
				//End -SIMCO R3<<Locker Charges>>				
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new AccountChargeWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} catch (Exception e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e); // //- F16
			// reengineering
		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultWrapper;

	}

	/**
	 * fetchAccountLinks method comment
	 *
	 * @Creation date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching AccountLinks Details
	 * @returnType scb.ebbs.accounts.wrapper.AccountLinksWrapper[]
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */
	public AccountLinksWrapper[] fetchAccountLinks(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		AccountLinksWrapper[] resultWrapper = null;
		AccountLinksWrapper wrapper = null;
		Vector result = new Vector();

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCLINKS, false, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCLINKS, false, false);
			}

			stmt.setString(1, key.accountNo);
			stmt.setString(2, key.currencyCode);

			rs = stmt.executeQuery();

			while (rs.next()) {
				wrapper = new AccountLinksWrapper();
				wrapper.seqNo = Integer.parseInt(rs.getString(1).trim());
				wrapper.templateId = rs.getString(2);
				wrapper.accountNo = rs.getString(3).trim();
				wrapper.currencyCode = rs.getString(4);
				wrapper.masterNumber = rs.getString(5);
				wrapper.relationshipNo = rs.getString(6);
				wrapper.accountType = Utility.getChar(rs.getString(7));
				wrapper.branchCode = rs.getString(8);
				wrapper.productCode = rs.getString(9);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new AccountLinksWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultWrapper;

	}

	/**
	 * fetchAccountNominee method comment
	 *
	 * @Modifed date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching Nominee Details
	 * @returnType scb.ebbs.accounts.wrapper.AccountNomineeWrapper[]
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public AccountNomineeWrapper[] fetchAccountNominee(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		AccountNomineeWrapper[] resultWrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		AccountNomineeWrapper wrapper = null;
		Vector result = new Vector();

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACNOMINEE, false, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACNOMINEE, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);

			rs = stmt.executeQuery();

			while (rs.next()) {
				wrapper = new AccountNomineeWrapper();
				wrapper.seqNo = Integer.parseInt(rs.getString(1).trim());
				wrapper.relationshipNo = rs.getString(2);
				wrapper.name = rs.getString(3);
				wrapper.flatNo = rs.getString(4);
				wrapper.buildingName = rs.getString(5);
				wrapper.streetName = rs.getString(6);
				wrapper.locationCode = rs.getString(7);
				wrapper.postBox = rs.getString(8);
				wrapper.cityCode = rs.getString(9);
				wrapper.countryCode = rs.getString(10);
				wrapper.postalCode = rs.getString(11);
				wrapper.telephoneNo = rs.getString(12);

				// wrapper.addressee=rs.getString(13);
				wrapper.address1 = rs.getString(13);
				wrapper.address2 = rs.getString(14);

				wrapper.cityName = rs.getString(15);
				wrapper.state = rs.getString(16);
				wrapper.attentionParty = rs.getString(17);
				wrapper.nearLandmark = rs.getString(18);
				wrapper.noYrsCurrentAddress = rs.getShort(19);
				wrapper.isMailingAddress = Utility.getChar(rs.getString(20));
				//Added for EBBSHRM-53506
				wrapper.isNomineeRegistered = Utility.getChar(rs.getString(21));
				wrapper.lastUpdatedDate = rs.getDate(22); // CBRCPBE-340 - lastUpdatedDate added - 1562748
				//IN NOMINEE
				wrapper.nomConsentTaken = Utility.getChar(rs.getString(23)); // char field
				wrapper.nominationType = rs.getString(24); // String field
				wrapper.nomord = rs.getString(25); // String field
				wrapper.nomShare = rs.getBigDecimal(26); // BigDecimal field
				wrapper.address3 = rs.getString(27); // String field
				wrapper.nomEmail = rs.getString(28); // String field
				wrapper.nomMob = rs.getString(29); // String field
				wrapper.nomRelTypeCode = rs.getString(30); // String field
				//wrapper.nomAge = Integer.parseInt(rs.getString(31).trim()); // int field
				String strAge = rs.getString(31);
				String trimmedStrAge = (strAge == null) ? null : strAge.trim();
				if(trimmedStrAge != null && !trimmedStrAge.isEmpty()) {
					wrapper.nomAge = Integer.parseInt(trimmedStrAge); // int field
				} else {
					wrapper.nomAge = 0; // int field
				}
				wrapper.nomAgeason = rs.getDate(32); // Date field
				wrapper.nomDob = rs.getDate(33); // Date field
				wrapper.nomGrdnName = rs.getString(34); // String field
				wrapper.nomGrdnAddress = rs.getString(35); // String field
				wrapper.nomGrdnRelTypeCode = rs.getString(36); // String field
				wrapper.nomGrdnMobile = rs.getString(37); // String field
				wrapper.nomGrdnEmail = rs.getString(38); // String field
				//wrapper.nomGrdnAge = Integer.parseInt(rs.getString(39).trim()); // int field
				String strGrdnAge = rs.getString(39);
				String trimmedStrGrdnAge = (strGrdnAge == null) ? null : strGrdnAge.trim();
				if(trimmedStrGrdnAge != null && !trimmedStrGrdnAge.isEmpty()) {
					wrapper.nomGrdnAge = Integer.parseInt(trimmedStrGrdnAge); // int field
				} else {
					wrapper.nomGrdnAge = 0; // int field
				}
				wrapper.nomGrdnAgeASON = rs.getDate(40); // Date field
				wrapper.isDeceased = Utility.getChar(rs.getString(41)); // char field
				wrapper.deceasedRecvDate = rs.getDate(42); // Date field
				
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new AccountNomineeWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle); // //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}
		return resultWrapper;

	}

	/**
	 * fetchInfoType method comment
	 *
	 * @Creation date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching InfoType Details
	 * @returnType scb.ebbs.accounts.wrapper.AccountNomineeWrapper[]
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public scb.general.wrapper.GenericInfoTypeWrapper[] fetchInfoType(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		scb.general.wrapper.GenericInfoTypeWrapper[] resultWrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		Vector result = new Vector();
		scb.general.wrapper.GenericInfoTypeWrapper wrapper = null;

		// System.out.println("inside the subsidiaryHelper
		// fetchAccountInfoType()");

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCINFOTYPE, false, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCINFOTYPE, false, false);
			}

			stmt.setString(1, key.accountNo);
			stmt.setString(2, key.currencyCode);

			rs = stmt.executeQuery();

			while (rs.next()) {
				wrapper = new scb.general.wrapper.GenericInfoTypeWrapper();
				wrapper.seqNo = rs.getString(1).trim();
				wrapper.misCode = rs.getString(2);
				wrapper.misValue = rs.getString(3);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new scb.general.wrapper.GenericInfoTypeWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} catch (Exception e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e); // //- F16
			// reengineering
		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement and resultset
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}

		}

		return resultWrapper;

	}
	
	/**
	 * fetchInfoType method comment
	 * @Creation date (10/06/2003 5:38:35 PM)
	 * @Purpose  fetching InfoType Details
	 * @returnType Vector[] languageComponentHash
	 * @param key scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException The exception description.
	 */

	public GenericInfoTypeWrapper[] fetchMultilingualInfoType(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SQLStatementObject stmt=null;
		SQLResultObject rs = null;
		Vector result = new Vector();
		scb.general.wrapper.GenericInfoTypeWrapper[] mwrapper = null;

		//System.out.println("inside the subsidiaryHelper fetchAccountInfoType()");

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if(key.fetchForUpdate)
				stmt = con.getStatementObject(SELECT_MACCINFO,true,false);
			else
				stmt = con.getStatementObject(SELECT_MACCINFO,false,false);

			stmt.setString(1, key.accountNo);
			stmt.setString(2, key.currencyCode);

			rs = stmt.executeQuery();

			while(rs.next())
			{
				scb.general.wrapper.GenericInfoTypeWrapper wrapper = new scb.general.wrapper.GenericInfoTypeWrapper();
				wrapper.seqNo=rs.getString(1).trim();
				wrapper.misCodeLangDescription = rs.getString(2);
				wrapper.misValueLangDescription=rs.getString(3);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;

				String languageCode = rs.getString(4);
				result.add(wrapper);
				//languageComponentHash = classifyMultilingualInfoTypeByLanguage(languageCode, wrapper, languageComponentHash);
			}
			mwrapper = new GenericInfoTypeWrapper[result.size()];
			for (int i = 0; i < result.size(); i++) {
				mwrapper[i] = (GenericInfoTypeWrapper) result.elementAt(i);
			}
		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return mwrapper;

	}


	/**
	 * fetchMaster method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Modifed date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching Master Details
	 * @returnType scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */
	public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchMaster(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		LogWriter out = null;

		//Added for UK 1604375
		if(out==null){
			out = LogWriter.getInstance("Subsidiary Account",  "Subsidiary Account");			
		}
		// out.println("inside the subsidiaryHelper fetchMaster()");		

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			boolean isExcessChargesApplicable = isExcessChargesApplicable();
			
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(isExcessChargesApplicable ? SELECT_ACCOUNT_EXCESS : SELECT_ACCOUNT, true, false);
			} else {
				stmt = con.getStatementObject(isExcessChargesApplicable ? SELECT_ACCOUNT_EXCESS : SELECT_ACCOUNT, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);

			rs = stmt.executeQuery();
			if (rs.next()) {
				wrapper = new SubsidiaryAccountWrapper();

				wrapper.currencyCode = rs.getString(1);
				wrapper.accountNo = rs.getString(2);
				wrapper.masterNo = rs.getString(3);
				wrapper.shortName = rs.getString(4);
				wrapper.productCode = rs.getString(5);
				wrapper.segmentCode = rs.getString(6);

				wrapper.operatingInstruct = rs.getString(7);
				wrapper.crInterestCurrencyCode = rs.getString(8);
				wrapper.crInterestAccountNo = rs.getString(9);
				wrapper.drInterestCurrencyCode = rs.getString(10);
				wrapper.drInterestAccountNo = rs.getString(11);
				wrapper.crIntIndicatorFlag = Utility.getChar(rs.getString(12));

				wrapper.drIntIndicatorFlag = Utility.getChar(rs.getString(13));
				wrapper.interestCode = rs.getString(14);
				wrapper.advIntIndicator = Utility.getChar(rs.getString(15));
				wrapper.interestStmtIndicatorFlag = Utility.getChar(rs.getString(16));

				wrapper.accountClassCode = rs.getString(17);
				wrapper.blockFlag = Utility.getChar(rs.getString(18));

				wrapper.exchangeControlFlag = Utility.getChar(rs.getString(19));
				wrapper.prppaFlag = Utility.getChar(rs.getString(20));

				wrapper.frozenSurrender = Utility.getChar(rs.getString(21));

				wrapper.matchingFlag = Utility.getChar(rs.getString(22));
				wrapper.forwardCoverRate = rs.getBigDecimal(23);
				wrapper.exchangeRate = rs.getBigDecimal(24);

				wrapper.notes1 = rs.getString(25);
				wrapper.notes2 = rs.getString(26);
				wrapper.notes3 = rs.getString(27);
				wrapper.memoFlag1 = rs.getString(28);
				wrapper.memoFlag2 = rs.getString(29);
				wrapper.memoFlag3 = rs.getString(30);

				wrapper.memoFlag4 = rs.getString(31);
				wrapper.memoFlag5 = rs.getString(32);
				wrapper.userDefinedCode1 = rs.getString(33);
				wrapper.userDefinedCode2 = rs.getString(34);
				wrapper.userDefinedCode3 = rs.getString(35);
				wrapper.userDefinedCode4 = rs.getString(36);

				wrapper.userDefinedCode5 = rs.getString(37);
				wrapper.userDefinedCode6 = rs.getString(38);
				wrapper.userDefinedCode7 = rs.getString(39);
				wrapper.userDefinedCode8 = rs.getString(40);
				wrapper.userDefinedCode9 = rs.getString(41);
				wrapper.userDefinedCode10 = rs.getString(42);

				wrapper.accountClosureReason = rs.getString(43);
				wrapper.accountCloseDate = rs.getDate(44);
				wrapper.bulkChargesFlag = Utility.getChar(rs.getString(45));
				wrapper.bulkingFrequency = Utility.getChar(rs.getString(46));
				wrapper.bulkExecutionDate = rs.getDate(47);
				wrapper.accountOpenDate = rs.getDate(48);

				wrapper.refEntriesMarker = Utility.getChar(rs.getString(49));
				wrapper.rejEntriesMarker = Utility.getChar(rs.getString(50));
				wrapper.makerDetail = new UserDetail();
				wrapper.makerDetail.setUserBranch(rs.getString(51));
				wrapper.makerDetail.setUserDate(rs.getDate(52));
				wrapper.makerDetail.setUserID(rs.getString(53));
				wrapper.makerDetail.setUserIPAddress(rs.getString(54));

				wrapper.makerDetail.setUserTime(rs.getTime(55));
				wrapper.checkerDetail = new UserDetail();
				wrapper.checkerDetail.setUserBranch(rs.getString(56));
				wrapper.checkerDetail.setUserDate(rs.getDate(57));
				wrapper.checkerDetail.setUserID(rs.getString(58));
				wrapper.checkerDetail.setUserIPAddress(rs.getString(59));
				wrapper.checkerDetail.setUserTime(rs.getTime(60));
				wrapper.statusFlag = rs.getShort(61);

				wrapper.accountBranch = rs.getString(62);
				wrapper.ucaCode = rs.getString(63);
				wrapper.isEbswCustSwift = Utility.getChar(rs.getString(64));
				wrapper.ebswCustSwift = rs.getString(65);

				wrapper.accountCurrentStatus = Utility.getChar(rs.getString(66));
				wrapper.transToDormantDate = rs.getDate(67);
				wrapper.transToUnclaimDate = rs.getDate(68);
				wrapper.renewRolloverDate = rs.getDate(69);
				wrapper.reactiveDate = rs.getDate(70);

				wrapper.lastDrTrnDate = rs.getDate(71);
				wrapper.lastCrTrnDate = rs.getDate(72);
				wrapper.lastCrTrnExclSysDate = rs.getDate(73);
				wrapper.lastDrTrnExclSysDate = rs.getDate(74);

				wrapper.interestInSuspenceFlag = Utility.getChar(rs.getString(75));
				wrapper.crLastAccrualDate = rs.getDate(76);
				wrapper.drLastAccrualDate = rs.getDate(77);
				wrapper.crLastInterestPaymentDate = rs.getDate(78);
				wrapper.drLastInterestPaymentDate = rs.getDate(79);
				wrapper.crNextInterestPaymentDate = rs.getDate(80);
				wrapper.drNextInterestPaymentDate = rs.getDate(81);

				// CRINTACCRUEDAMT,DRINTACCRUEDAMT,CRINTADJAMT,DRINTADJAMT,CRMANUALADJAMT,DRMANUALADJAMT
				wrapper.creditInterestAccrued = rs.getBigDecimal(82);
				wrapper.debitInterestAccrued = rs.getBigDecimal(83);
				wrapper.creditInterestAdjustment = rs.getBigDecimal(84);
				wrapper.debitInterestAdjustment = rs.getBigDecimal(85);
				wrapper.creditManualAdjustment = rs.getBigDecimal(86);
				wrapper.debitManualAdjustment = rs.getBigDecimal(87);
				wrapper.provisionAdjustmentAmount = rs.getBigDecimal(88);
				wrapper.isIncludedInInterestPooling = Utility.getChar(rs.getString(89));
				wrapper.oldAccountNumber = rs.getString(90);
				wrapper.lastOfflineChargesProcessedDate = rs.getDate(91);

				wrapper.supressStatementFlag = Utility.getChar(rs.getString(92));
				wrapper.transferPricingRate = rs.getBigDecimal(93);
				
				//Added by 1604375 for UK view issue-
				//commented for ZA MT900/M910 Issue
				if(SystemProperties.getInstance().getCompanyID().equalsIgnoreCase("GB")||SystemProperties.getInstance().getCompanyID().equalsIgnoreCase("DE")) {
					wrapper.accountType = this.getAccountType(rs.getString(3)); 
					}
//				wrapper.accountType = this.getAccountType(rs.getString(3)); 
	else{
				wrapper.accountType = key.accountType;
				}

				wrapper.suppressAdviceFlag = Utility.getChar(rs.getString(94));
				wrapper.suppressOtherCorros = Utility.getChar(rs.getString(95));
				wrapper.bulkingTranactionFlag = Utility.getChar(rs.getString(96));
//				Commented and modified by Saridha for SIMCO - 10000702_All_TSD_Selfrecon Fix_V1.0.doc
//				wrapper.selfReconcileFlag = Utility.getChar(rs.getString(97));
				wrapper.selfReconcileTypeFlag = Utility.getChar(rs.getString(97));
//				ends here
				wrapper.instrumentTypeFlag = Utility.getChar(rs.getString(98));
				// wrapper.thresholdAmount=rs.getBigDecimal(99);
				wrapper.limitNo = rs.getString(99);
				wrapper.limitMasterNo = rs.getString(100);
				wrapper.debitInterestPrdCode = rs.getString(101);
				wrapper.creditInterestPrdCode = rs.getString(102);
				wrapper.multipleLimits = Utility.getChar(rs.getString(103));
				wrapper.drLastAccruedAdjAmt = rs.getBigDecimal(104);
				wrapper.crLastAccruedAdjAmt = rs.getBigDecimal(105);
				//Commented for  Limit ReEngineering & Group IOD Project changes
				/*wrapper.intraDayLmtMastNo = rs.getString(106);
				wrapper.intraDayLmtNo = rs.getString(107);*/
				wrapper.accountTitle = rs.getString(106);
				wrapper.supressInterestStmtFlag = Utility.getChar(rs.getString(107));

				// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
				// Retrofitted for new fields added in MESA and PH
				wrapper.prppaCurrencyCode = rs.getString(108);
				wrapper.prppaAccountNo = rs.getString(109);
				wrapper.lastCrintRate = rs.getBigDecimal(110);
				wrapper.lastDrintRate = rs.getBigDecimal(111);
				wrapper.lastExsintRate = rs.getBigDecimal(112);
				wrapper.pcrintAccruedamt = rs.getBigDecimal(113);
				wrapper.pdrintAccruedamt = rs.getBigDecimal(114);
				wrapper.pcrintAdjamt = rs.getBigDecimal(115);
				wrapper.pdrintAdjamt = rs.getBigDecimal(116);
				wrapper.pcrmanualAdjamt = rs.getBigDecimal(117);
				wrapper.pdrmanualAdjamt = rs.getBigDecimal(118);
				wrapper.interestEligibilityFlag = Utility.getChar(rs.getString(119));
				wrapper.crIntAccrForAccrPeriod = rs.getBigDecimal(120);
				wrapper.drIntAccrForAccrPeriod = rs.getBigDecimal(121);
				wrapper.reasonForIntForfeiture = rs.getString(122);
				// wrapper.chargeProductCode = rs.getString(125);
				// included by Sumithra on 11.02.2004 for Tax - PH030
				wrapper.taxNomCurrCode = rs.getString(123);
				wrapper.taxNomAccountNo = rs.getString(124);
				wrapper.taxCtgCode = rs.getString(125);
				wrapper.maturityDate = rs.getDate(126);
				wrapper.lastTaxApplDate = rs.getDate(127);
				wrapper.lastCondIntApplDate = rs.getDate(128);
				// ends
				// changes end here
				// Added for Japan Retrofit - Suthahar Akbar on 18.5.2005
				wrapper.conSolStmtFlag = Utility.getChar(rs.getString(129));
				// code changed by S.Ramesh for E-10-SubAccount on 25-05-2005
				wrapper.mirrorTrnCurr = rs.getString(130);
				wrapper.mirrorTrnAccNo = rs.getString(131);
				wrapper.glDepartmentID = rs.getString(132);
				// Added by Jayanthi for Compounding Interest
				wrapper.crNextCompDate = rs.getDate(133);
				wrapper.drNextCompDate = rs.getDate(134);
				wrapper.lastcrIntCompoundedDate = rs.getDate(135);
				wrapper.lastdrIntCompoundedDate = rs.getDate(136);
				wrapper.crIntToCompound = rs.getBigDecimal(137);
				wrapper.drIntToCompound = rs.getBigDecimal(138);
				wrapper.autoClose = Utility.getChar(rs.getString(139));
				// End Change
				// Added by Bavithra for E11 Gap IAS
				// Commented by Anand.K for E12 - Provision
				// wrapper.impairmentflag = Utility.getChar(rs.getString(142));
				// wrapper.chargeOffFlag = Utility.getChar(rs.getString(143));
				//
				wrapper.cacsIndicator = Utility.getChar(rs.getString(140));
				// Ends
				// code added by vani e11 indo gap
				wrapper.referralID = rs.getString(141);
				wrapper.sourcingID = rs.getString(142);
				wrapper.closingID = rs.getString(143);

				// Added by yusuf for E11 day2

				wrapper.channelID = rs.getString(144);
				wrapper.originatorMakerDetail = new UserDetail();
				wrapper.originatorMakerDetail.setUserID(rs.getString(145));
				wrapper.originatorMakerDetail.setUserDate(rs.getDate(146));
				wrapper.originatorMakerDetail.setUserIPAddress(rs.getString(147));
				wrapper.originatorMakerDetail.setUserTime(rs.getTime(148));
				wrapper.originatorMakerDetail.setUserBranch(rs.getString(149));
				// Change ends here

				wrapper.calenderAccountOpenDate = rs.getDate(150);// added by
				// venkatachalapathy
				// for R1
				// E12 eBBS
				// India on
				// 19-09-2007

				// Code Added by selvarasu for e12 on 16-Nov-07
				wrapper.accountCategory = Utility.getChar(rs.getString(151));
				// Code Ends here
				// Added by murugan for INDIA E12
				wrapper.oldProductCode = rs.getString(152);
				wrapper.oldMasterNo = rs.getString(153);
				wrapper.lastPrdChangeDt = rs.getDate(154);
				wrapper.lastMasterChangeDt = rs.getDate(155);
				// End by murugan

				// Code added by Sangeetha
				//changes done by ramachandran to assign correct field mapping for Last Dr,Cr amount
				wrapper.lastDrTrnAmt = rs.getBigDecimal(156);
				wrapper.lastCrTrnAmt = rs.getBigDecimal(157);
				//  ends here
				wrapper.lastCrTrnExclTrnAmt = rs.getBigDecimal(158);
				wrapper.lastDrTrnExclTrnAmt = rs.getBigDecimal(159);
				wrapper.provisionStatusFlag = Utility.getChar(rs.getString(160));
				wrapper.cacsDownReason = Utility.getChar(rs.getString(161));
				wrapper.tccFlag = Utility.getChar(rs.getString(162));
			//	wrapper.utilizeIntrdayLimitFlag = Utility.getChar(rs.getString(165)); Commented for  Limit ReEngineering & Group IOD Project changes
				// End of code added by sangeetha
				wrapper.lastRiskChangeDate = rs.getDate(163);
				wrapper.IBAN = rs.getString(164);
				wrapper.autoReorderChqBkFlag=Utility.getChar(rs.getString(165));
               // Added by Ramesh N for UK VAT Changes on 23/06/2009
				wrapper.vccFlag = Utility.getChar(rs.getString(166));
				wrapper.vatCtgCode = rs.getString(167);
               //Added by balaji for E12 Migration - R1 Phase - Project id 09002841 - Field Addition in Others tab
				wrapper.atmAllowed=Utility.getChar(rs.getString(168));
		 	    wrapper.ivrAllowed=Utility.getChar(rs.getString(169));
			    wrapper.ibankingAllowed=Utility.getChar(rs.getString(170));
				wrapper.impairmentflag = Utility.getChar(rs.getString(171));
				wrapper.chargeOffFlag = Utility.getChar(rs.getString(172));
				//End-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
				wrapper.suspendImpairment=Utility.getChar(rs.getString(173));
				wrapper.suspendProvision=Utility.getChar(rs.getString(174));
			    wrapper.suspendChargeoff=Utility.getChar(rs.getString(175));
//addde by hasi fopr DAUELIMITS
				wrapper.relNoForAcctType=rs.getString(176);
				wrapper.acctAddressTypeCode=rs.getString(177);

				wrapper.daueLimitNo = rs.getString(178);
				wrapper.daueLimitMasterNo = rs.getString(179);
				//end hasi
               //End-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
				//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu - Starts here
				wrapper.odClassIntCd = rs.getString(180);
				wrapper.odClassIntPrdCd = rs.getString(181);
				wrapper.waiveExcessInterest= Utility.getChar(rs.getString(182));
				//ends here
     		   //Description  :   -> changes done as per New Field Set Up Multi Country Change
				wrapper.deptCode =rs.getString(183);
				wrapper.reconCode = rs.getString(184);
				//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
				wrapper.crActualInterestPaymentDate = rs.getDate(185);
				wrapper.drActualInterestPaymentDate = rs.getDate(186);
				//ends here
				//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
				wrapper.promoCreditIntCd = rs.getString(187);
				wrapper.promoCreditIntPrdCd = rs.getString(188);
				wrapper.promoDebitIntCd = rs.getString(189);
				wrapper.promoDebitIntPrdCd = rs.getString(190);
				wrapper.manualDrIntFlag= Utility.getChar(rs.getString(191));
				wrapper.manualCrIntFlag= Utility.getChar(rs.getString(192));
				//ends here
				//Added by Sivaranjani (1271869)for DODream E12 - RM
				wrapper.crSplSystemAdustedInterest = rs.getBigDecimal(193);
				wrapper.crSplAccruedInterest = rs.getBigDecimal(194);
				// End DoDream
				//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
				wrapper.nextCRIntChngDt = rs.getDate(195);
				wrapper.nextDBIntChngDt = rs.getDate(196);
				wrapper.promoCrIntFlag = rs.getString(197);
				wrapper.promoDbIntFlag = rs.getString(198);
				//Ends here
				
				//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
				wrapper.crPromoCode = rs.getString(199);
				wrapper.drPromoCode = rs.getString(200);
				wrapper.splCrIntPrdCd = rs.getString(201);
				wrapper.splDrIntPrdCd = rs.getString(202);
				//Ends here 
				//Added for SGExcessInterest Logic
				wrapper.splIntIndFlag = Utility.getChar(rs.getString(203));
				//End Added for SGExcessInterest Logic
				//Account Reactivation :start				
				wrapper.accountReOpenDate = rs.getDate(204);
				wrapper.accountReOpenReason = rs.getString(205);
				//LogWriter.getInstance().println("Re Open Details : " + wrapper.accountReOpenDate + wrapper.accountReOpenReason);
				//End
				//CL-H 6 changes starts here
				wrapper.accountTitle2= rs.getString(206);
				//CL-H 6 changes ends
				//Added for TH with Reference 13001410_ALL_TSD_TH_WHT_V1.0.docx
				wrapper.valThresholdFlag = Utility.getChar(rs.getString(207));
				//End
				//Added by Hasi
				wrapper.ignoreChargeAdvice = Utility.getChar(rs.getString(208));
				//Added new column-fatcaCrsExclReason by 1554622 for Account level restriction project - jira # CBRCPBO-10899r
				wrapper.fatcaCrsExclReason = rs.getString(209);
				//End here by 1554622 for Account level restriction project - jira # CBRCPBO-10899
				
				/*Added By : Pravin for EBBSHRM-8571-UKDE Negative Interest_Rate : eBBS Harmonization    **** */ 
				wrapper.posCrIntAccuredAmt = rs.getBigDecimal(210);
				wrapper.negCrIntAccuredAmt = rs.getBigDecimal(211);
				wrapper.posCrIntAdjustedAmt = rs.getBigDecimal(212);
				wrapper.negCrIntAdjustedAmt = rs.getBigDecimal(213);
				wrapper.posCrManualAdjustment = rs.getBigDecimal(214);
				wrapper.negCrManualAdjustment = rs.getBigDecimal(215);

				wrapper.gstRegistrationNo = rs.getString(216);
				//added by 1563531(Sivanageswarareddy) as part of Day 2
				wrapper.gstRegistrationFlag = Utility.getChar(rs.getString(217));
				//Added  Account level restriction by 1546761
				wrapper.gstCustomerSpecialStatus = Utility.getChar(rs.getString(218));
				wrapper.gstCustomerType = Utility.getChar(rs.getString(219));
				//added by 1624396 George, for EBBSHRM-78916
				wrapper.intAccProIndicator = Utility.getChar(rs.getString(220));
				wrapper.acInactiveDate = rs.getDate(221);
				wrapper.signaturelevel = Utility.getChar(rs.getString(222)); //KEYSTONEHK-29109
				wrapper.lastSigUpdateDT = rs.getDate(223);
				if(isExcessChargesApplicable) {
				wrapper.exChrgAccruedAmount = rs.getBigDecimal(224);
				wrapper.exLastAccrualDate = rs.getDate(225);
				wrapper.lastExChargeRate = rs.getBigDecimal(226);
				}
			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedsstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return wrapper;

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchMasterForInterestAccural(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;	
		
		try {
			boolean isExcessChargesApplicable = isExcessChargesApplicable();
						
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(isExcessChargesApplicable ? SELECT_ACCOUNT_INTERESTACCURAL_EX : SELECT_ACCOUNT_INTERESTACCURAL, true, false);
			} else {
				stmt = con.getStatementObject(isExcessChargesApplicable ? SELECT_ACCOUNT_INTERESTACCURAL_EX : SELECT_ACCOUNT_INTERESTACCURAL, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();

			if (rs.next()) {
				wrapper = new SubsidiaryAccountWrapper();

				wrapper.currencyCode = rs.getString(1);
				wrapper.accountNo = rs.getString(2);
				wrapper.creditInterestAccrued = rs.getBigDecimal(3);
				wrapper.debitInterestAccrued = rs.getBigDecimal(4);
				wrapper.lastCrintRate = rs.getBigDecimal(5);
				wrapper.lastDrintRate = rs.getBigDecimal(6);
				wrapper.lastExsintRate = rs.getBigDecimal(7);
				wrapper.crLastAccrualDate = rs.getDate(8);
				wrapper.drLastAccrualDate = rs.getDate(9);
				wrapper.lastcrIntCompoundedDate = rs.getDate(10);
				wrapper.lastdrIntCompoundedDate = rs.getDate(11);
				wrapper.crNextCompDate = rs.getDate(12);
				wrapper.drNextCompDate = rs.getDate(13);
				wrapper.crIntToCompound = rs.getBigDecimal(14);
				wrapper.drIntToCompound = rs.getBigDecimal(15);
				//added by hasi for DAUELimit 
				wrapper.daueLimitNo = rs.getString(16);
				wrapper.daueLimitMasterNo = rs.getString(17);
//end hasi
				//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu - Starts here
				wrapper.odClassIntCd = rs.getString(18);
				wrapper.odClassIntPrdCd = rs.getString(19);
				wrapper.waiveExcessInterest= Utility.getChar(rs.getString(20));
				//Changes done by Geetha on 9/29/2011
				wrapper.productCode= rs.getString(21);
				
				//Code added As Per PSS FIX
				wrapper.crNextInterestPaymentDate=rs.getDate(22);
				wrapper.drNextInterestPaymentDate=rs.getDate(23);
                wrapper.crSplAccruedInterest=rs.getBigDecimal(24);
			    wrapper.crSplSystemAdustedInterest=rs.getBigDecimal(25);

				//ends here
			    /*Added By : Pravin for EBBSHRM-8571-UKDE Negative Interest_Rate : eBBS Harmonization    **** */ 
				wrapper.posCrIntAccuredAmt = rs.getBigDecimal(26);
				wrapper.negCrIntAccuredAmt = rs.getBigDecimal(27);
				wrapper.posCrIntAdjustedAmt = rs.getBigDecimal(28);
				wrapper.negCrIntAdjustedAmt = rs.getBigDecimal(29);
				wrapper.posCrManualAdjustment = rs.getBigDecimal(30);
				wrapper.negCrManualAdjustment = rs.getBigDecimal(31);
				wrapper.provisionStatusFlag = Utility.getChar(rs.getString(32));
				if(isExcessChargesApplicable) {
				wrapper.limitNo = rs.getString(33);
				wrapper.limitMasterNo = rs.getString(34);
				wrapper.exChrgAccruedAmount = rs.getBigDecimal(35);
				wrapper.exLastAccrualDate = rs.getDate(36);
				wrapper.lastExChargeRate = rs.getBigDecimal(37);
				}
			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return wrapper;

	}

	/**
	 * fetchMaster method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Modifed date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching Master Details
	 * @returnType scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */
	public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchMasterForInterestCapitalisation(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCOUNT_INTERESTCAPITALISATION, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCOUNT_INTERESTCAPITALISATION, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);

			rs = stmt.executeQuery();
			if (rs.next()) {
				wrapper = new SubsidiaryAccountWrapper();

				wrapper.currencyCode = rs.getString(1);
				wrapper.accountNo = rs.getString(2);
				wrapper.segmentCode = rs.getString(3);
				wrapper.crNextInterestPaymentDate = rs.getDate(4);
				wrapper.creditInterestAccrued = rs.getBigDecimal(5);
				wrapper.creditInterestAdjustment = rs.getBigDecimal(6);
				wrapper.creditManualAdjustment = rs.getBigDecimal(7);
				wrapper.crLastInterestPaymentDate = rs.getDate(8);
				wrapper.pcrintAccruedamt = rs.getBigDecimal(9);
				wrapper.pcrintAdjamt = rs.getBigDecimal(10);
				wrapper.pcrmanualAdjamt = rs.getBigDecimal(11);
				wrapper.drNextInterestPaymentDate = rs.getDate(12);
				wrapper.debitInterestAccrued = rs.getBigDecimal(13);
				wrapper.debitInterestAdjustment = rs.getBigDecimal(14);
				wrapper.debitManualAdjustment = rs.getBigDecimal(15);
				wrapper.drLastInterestPaymentDate = rs.getDate(16);
				wrapper.crIntToCompound = rs.getBigDecimal(17);
				wrapper.drIntToCompound = rs.getBigDecimal(18);
				wrapper.masterNo=rs.getString(19);//Masterno
				wrapper.productCode=rs.getString(20);//productCode
				//added by hasi for DAUE
				wrapper.daueLimitNo=rs.getString(21);
				wrapper.daueLimitMasterNo=rs.getString(22);
				//emd by hasi
				//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu - Starts here
				wrapper.odClassIntCd = rs.getString(23);
				wrapper.odClassIntPrdCd = rs.getString(24);
				wrapper.waiveExcessInterest= Utility.getChar(rs.getString(25));
				//ends here
				//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
				wrapper.crActualInterestPaymentDate = rs.getDate(26);
				wrapper.drActualInterestPaymentDate = rs.getDate(27);
				//ends here
				/*//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
				wrapper.promoCreditIntCd = rs.getString(28);
				wrapper.promoCreditIntPrdCd = rs.getString(29);
				wrapper.promoDebitIntCd = rs.getString(30);
				wrapper.promoDebitIntPrdCd = rs.getString(31);
				wrapper.manualDrIntFlag= Utility.getChar(rs.getString(32));
				wrapper.manualCrIntFlag= Utility.getChar(rs.getString(33));
				//ends here
				//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
				wrapper.nextCRIntChngDt = rs.getDate(34);
				wrapper.nextDBIntChngDt = rs.getDate(35);
				wrapper.promoCrIntFlag = rs.getString(36);
				wrapper.promoDbIntFlag = rs.getString(37);*/
				// changes done by ramachandran to fetch taxCtgCode also - few cases coming as null during TDS calculation   
				wrapper.taxCtgCode = rs.getString(28);
				//Ends
				/*Added By : Pravin for EBBSHRM-8571-UKDE Negative Interest_Rate : eBBS Harmonization    **** */ 
				wrapper.posCrIntAccuredAmt = rs.getBigDecimal(29);
				wrapper.negCrIntAccuredAmt = rs.getBigDecimal(30);
				wrapper.posCrIntAdjustedAmt = rs.getBigDecimal(31);
				wrapper.negCrIntAdjustedAmt = rs.getBigDecimal(32);
				//Added by 1559885-Sivanesh.C for UK_DE VAT Stamping for neg Interest
				wrapper.posCrManualAdjustment = rs.getBigDecimal(33);
				wrapper.negCrManualAdjustment = rs.getBigDecimal(34);
			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return wrapper;

	}


//	PT Changes done For INDIA PRODUCTION By Bala
	public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchMasterForInterestMonthlyAccural(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		LogWriter out = null;
		if(out==null){
			out = LogWriter.getInstance("Subsidiary Account",  "fetchMasterForInterestMonthlyAccural");			
		}
		
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject("EBACC09580SY", true, false);
			} else {
				stmt = con.getStatementObject("EBACC09580SY", false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();


			if (rs.next()) {
				wrapper = new SubsidiaryAccountWrapper();

				wrapper.currencyCode = rs.getString(1);
				wrapper.accountNo = rs.getString(2);
				wrapper.creditInterestAccrued = rs.getBigDecimal(3);
				wrapper.crIntAccrForAccrPeriod = rs.getBigDecimal(4);
				wrapper.lastCrintRate = rs.getBigDecimal(5);
				wrapper.crLastAccrualDate = rs.getDate(6);
				wrapper.lastcrIntCompoundedDate = rs.getDate(7);
				wrapper.crNextCompDate = rs.getDate(8);
				wrapper.crIntToCompound = rs.getBigDecimal(9);
				wrapper.lastdrIntCompoundedDate = rs.getDate(10);
				wrapper.drNextCompDate = rs.getDate(11);
				wrapper.drIntToCompound = rs.getBigDecimal(12);
				//added by hasi for DAUE
				wrapper.daueLimitNo = rs.getString(13);
				wrapper.daueLimitMasterNo = rs.getString(14);
				//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu - Starts here
				wrapper.odClassIntCd = rs.getString(15);
				wrapper.odClassIntPrdCd = rs.getString(16);
				wrapper.waiveExcessInterest= Utility.getChar(rs.getString(17));
				//ends here
				wrapper.posCrIntAccuredAmt = rs.getBigDecimal(18);
				wrapper.negCrIntAccuredAmt = rs.getBigDecimal(19);
				wrapper.posCrIntAdjustedAmt = rs.getBigDecimal(20);
				wrapper.negCrIntAdjustedAmt = rs.getBigDecimal(21);
				wrapper.posCrManualAdjustment = rs.getBigDecimal(22);
				wrapper.negCrManualAdjustment = rs.getBigDecimal(23);
				wrapper.interestEligibilityFlag=Utility.getChar(rs.getString(24));
				out.println("wrapper.interestEligibilityFlag::"+wrapper.interestEligibilityFlag);
			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return wrapper;

	}

	/**
	 * fetchMasterForView method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Modifed date (10/06/2003 5:38:35 PM)
	 * @Purpose fetching Master Details for viewing purpose
	 * @returnType scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param statusFlag
	 *            int
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchMasterForView(SubsidiaryAccountEntityKey key, int statusFlag) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(SELECT_ACCOUNT_FOR_VIEW, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.setInt(3, statusFlag);

			rs = stmt.executeQuery();
			if (rs.next()) {
				wrapper = new SubsidiaryAccountWrapper();

				wrapper.currencyCode = rs.getString(1);
				wrapper.accountNo = rs.getString(2);
				wrapper.masterNo = rs.getString(3);
				wrapper.shortName = rs.getString(4);
				wrapper.productCode = rs.getString(5);
				wrapper.segmentCode = rs.getString(6);

				wrapper.operatingInstruct = rs.getString(7);
				wrapper.crInterestCurrencyCode = rs.getString(8);
				wrapper.crInterestAccountNo = rs.getString(9);
				wrapper.drInterestCurrencyCode = rs.getString(10);
				wrapper.drInterestAccountNo = rs.getString(11);
				wrapper.crIntIndicatorFlag = Utility.getChar(rs.getString(12));

				wrapper.drIntIndicatorFlag = Utility.getChar(rs.getString(13));
				wrapper.interestCode = rs.getString(14);
				wrapper.advIntIndicator = Utility.getChar(rs.getString(15));
				wrapper.interestStmtIndicatorFlag = Utility.getChar(rs.getString(16));

				wrapper.accountClassCode = rs.getString(17);
				wrapper.blockFlag = Utility.getChar(rs.getString(18));

				wrapper.exchangeControlFlag = Utility.getChar(rs.getString(19));
				wrapper.prppaFlag = Utility.getChar(rs.getString(20));

				wrapper.frozenSurrender = Utility.getChar(rs.getString(21));

				wrapper.matchingFlag = Utility.getChar(rs.getString(22));
				wrapper.forwardCoverRate = rs.getBigDecimal(23);
				wrapper.exchangeRate = rs.getBigDecimal(24);

				wrapper.notes1 = rs.getString(25);
				wrapper.notes2 = rs.getString(26);
				wrapper.notes3 = rs.getString(27);
				wrapper.memoFlag1 = rs.getString(28);
				wrapper.memoFlag2 = rs.getString(29);
				wrapper.memoFlag3 = rs.getString(30);

				wrapper.memoFlag4 = rs.getString(31);
				wrapper.memoFlag5 = rs.getString(32);
				wrapper.userDefinedCode1 = rs.getString(33);
				wrapper.userDefinedCode2 = rs.getString(34);
				wrapper.userDefinedCode3 = rs.getString(35);
				wrapper.userDefinedCode4 = rs.getString(36);

				wrapper.userDefinedCode5 = rs.getString(37);
				wrapper.userDefinedCode6 = rs.getString(38);
				wrapper.userDefinedCode7 = rs.getString(39);
				wrapper.userDefinedCode8 = rs.getString(40);
				wrapper.userDefinedCode9 = rs.getString(41);
				wrapper.userDefinedCode10 = rs.getString(42);

				wrapper.accountClosureReason = rs.getString(43);
				wrapper.accountCloseDate = rs.getDate(44);
				wrapper.bulkChargesFlag = Utility.getChar(rs.getString(45));
				wrapper.bulkingFrequency = Utility.getChar(rs.getString(46));
				wrapper.bulkExecutionDate = rs.getDate(47);
				wrapper.accountOpenDate = rs.getDate(48);

				wrapper.refEntriesMarker = Utility.getChar(rs.getString(49));
				wrapper.rejEntriesMarker = Utility.getChar(rs.getString(50));
				wrapper.makerDetail = new UserDetail();
				wrapper.makerDetail.setUserBranch(rs.getString(51));
				wrapper.makerDetail.setUserDate(rs.getDate(52));
				wrapper.makerDetail.setUserID(rs.getString(53));
				wrapper.makerDetail.setUserIPAddress(rs.getString(54));

				wrapper.makerDetail.setUserTime(rs.getTime(55));
				wrapper.checkerDetail = new UserDetail();
				wrapper.checkerDetail.setUserBranch(rs.getString(56));
				wrapper.checkerDetail.setUserDate(rs.getDate(57));
				wrapper.checkerDetail.setUserID(rs.getString(58));
				wrapper.checkerDetail.setUserIPAddress(rs.getString(59));
				wrapper.checkerDetail.setUserTime(rs.getTime(60));
				wrapper.statusFlag = rs.getShort(61);

				wrapper.accountBranch = rs.getString(62);
				wrapper.ucaCode = rs.getString(63);
				wrapper.isEbswCustSwift = Utility.getChar(rs.getString(64));
				wrapper.ebswCustSwift = rs.getString(65);

				wrapper.accountCurrentStatus = Utility.getChar(rs.getString(66));
				wrapper.transToDormantDate = rs.getDate(67);
				wrapper.transToUnclaimDate = rs.getDate(68);
				wrapper.renewRolloverDate = rs.getDate(69);
				wrapper.reactiveDate = rs.getDate(70);

				wrapper.lastDrTrnDate = rs.getDate(71);
				wrapper.lastCrTrnDate = rs.getDate(72);
				wrapper.lastCrTrnExclSysDate = rs.getDate(73);
				wrapper.lastDrTrnExclSysDate = rs.getDate(74);
				wrapper.interestInSuspenceFlag = Utility.getChar(rs.getString(75));
				wrapper.crLastAccrualDate = rs.getDate(76);
				wrapper.drLastAccrualDate = rs.getDate(77);
				wrapper.crLastInterestPaymentDate = rs.getDate(78);
				wrapper.drLastInterestPaymentDate = rs.getDate(70);
				wrapper.crNextInterestPaymentDate = rs.getDate(80);
				wrapper.drNextInterestPaymentDate = rs.getDate(81);
				// modified field
				wrapper.transferPricingRate = rs.getBigDecimal(82);

				wrapper.suppressAdviceFlag = Utility.getChar(rs.getString(83));
				wrapper.suppressOtherCorros = Utility.getChar(rs.getString(84));
				wrapper.bulkingTranactionFlag = Utility.getChar(rs.getString(85));
//				Commented and modified by Saridha for SIMCO - 10000702_All_TSD_Selfrecon Fix_V1.0.doc
//				wrapper.selfReconcileFlag = Utility.getChar(rs.getString(86));
				wrapper.selfReconcileTypeFlag = Utility.getChar(rs.getString(86));
//				ends here
				wrapper.instrumentTypeFlag = Utility.getChar(rs.getString(87));
				// wrapper.thresholdAmount=rs.getBigDecimal(88);
				wrapper.limitNo = rs.getString(88);
				wrapper.limitMasterNo = rs.getString(89);

				wrapper.debitInterestPrdCode = rs.getString(90);
				wrapper.creditInterestPrdCode = rs.getString(91);
				wrapper.multipleLimits = Utility.getChar(rs.getString(92));

				wrapper.drLastAccruedAdjAmt = rs.getBigDecimal(93);
				wrapper.crLastAccruedAdjAmt = rs.getBigDecimal(94);
				//Commented for  Limit ReEngineering & Group IOD Project changes
				/*wrapper.intraDayLmtMastNo = rs.getString(95);
				wrapper.intraDayLmtNo = rs.getString(96);*/
				wrapper.accountTitle = rs.getString(95);
				wrapper.supressInterestStmtFlag = Utility.getChar(rs.getString(96));

				// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
				// Retrofitted for new fields added in MESA and PH
				wrapper.prppaCurrencyCode = rs.getString(97);
				wrapper.prppaAccountNo = rs.getString(98);
				wrapper.lastCrintRate = rs.getBigDecimal(99);
				wrapper.lastDrintRate = rs.getBigDecimal(100);
				wrapper.lastExsintRate = rs.getBigDecimal(101);
				wrapper.pcrintAccruedamt = rs.getBigDecimal(102);
				wrapper.pdrintAccruedamt = rs.getBigDecimal(103);
				wrapper.pcrintAdjamt = rs.getBigDecimal(104);
				wrapper.pdrintAdjamt = rs.getBigDecimal(105);
				wrapper.pcrmanualAdjamt = rs.getBigDecimal(106);
				wrapper.pdrmanualAdjamt = rs.getBigDecimal(107);
				wrapper.interestEligibilityFlag = Utility.getChar(rs.getString(108));
				wrapper.crIntAccrForAccrPeriod = rs.getBigDecimal(109);
				wrapper.drIntAccrForAccrPeriod = rs.getBigDecimal(110);
				wrapper.reasonForIntForfeiture = rs.getString(111);
				// wrapper.chargeProductCode = rs.getString(114);
				// included by Sumithra on 11.02.2004 for Tax - PH030
				wrapper.taxNomCurrCode = rs.getString(112);
				wrapper.taxNomAccountNo = rs.getString(113);
				wrapper.taxCtgCode = rs.getString(114);
				wrapper.maturityDate = rs.getDate(115);
				wrapper.lastTaxApplDate = rs.getDate(116);
				wrapper.lastCondIntApplDate = rs.getDate(117);
				// ends

				// Added by yusuf for E11 day2
				wrapper.channelID = rs.getString(118);
				wrapper.originatorMakerDetail = new UserDetail();
				wrapper.originatorMakerDetail.setUserID(rs.getString(119));
				wrapper.originatorMakerDetail.setUserDate(rs.getDate(120));
				wrapper.originatorMakerDetail.setUserIPAddress(rs.getString(121));
				wrapper.originatorMakerDetail.setUserTime(rs.getTime(122));
				wrapper.originatorMakerDetail.setUserBranch(rs.getString(123));
				// Change ends here
				wrapper.calenderAccountOpenDate = rs.getDate(124);// added by
				// venkatachalapathy
				// for R1
				// E12 eBBS
				// India on
				// 19-09-2007

				// Code Added by Selvarasu for e12 on 16-Nov-07
				wrapper.accountCategory = Utility.getChar(rs.getString(125));
				//wrapper.utilizeIntrdayLimitFlag = Utility.getChar(rs.getString(128));//Commented for  Limit ReEngineering & Group IOD Project changes
				wrapper.tccFlag = Utility.getChar(rs.getString(126));
				// Code Ends here
				wrapper.IBAN = rs.getString(127);
              // Added by Ramesh N for UK VAT Changes on 23/06/2009
				wrapper.vccFlag = Utility.getChar(rs.getString(128));
				wrapper.vatCtgCode = rs.getString(129);
              //Added by balaji for E12 Migration - R1 Phase - Project id 09002841 - Field Addition in Others tab
				wrapper.atmAllowed=Utility.getChar(rs.getString(130));
		 	    wrapper.ivrAllowed=Utility.getChar(rs.getString(131));
			    wrapper.ibankingAllowed=Utility.getChar(rs.getString(132));
			    //added by hasi fpr DAUELIMITS
			    wrapper.daueLimitNo = rs.getString(133);
			    wrapper.daueLimitMasterNo = rs.getString(134);
			    //end by hasi
			    //R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu - Starts here
			    wrapper.odClassIntCd = rs.getString(135);
			    wrapper.odClassIntPrdCd = rs.getString(136);
			    wrapper.waiveExcessInterest= Utility.getChar(rs.getString(137));
			    //ends here
		        // Description  :   -> changes done as per New Field Set Up Multi Country Change
			    wrapper.deptCode = (String) rs.getString(138);
			    wrapper.reconCode =rs.getString(139);
				//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
			    wrapper.crActualInterestPaymentDate = rs.getDate(140);
			    wrapper.drActualInterestPaymentDate = rs.getDate(141);
			    //ends here
			    //Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
				wrapper.promoCreditIntCd = rs.getString(142);
				wrapper.promoCreditIntPrdCd = rs.getString(143);
				wrapper.promoDebitIntCd = rs.getString(144);
				wrapper.promoDebitIntPrdCd = rs.getString(145);
				wrapper.manualDrIntFlag= Utility.getChar(rs.getString(146));
				wrapper.manualCrIntFlag= Utility.getChar(rs.getString(147));
				//ends here
			    //Added by Sivaranjani (1271869)for DODream E12 - RM
			    wrapper.crSplSystemAdustedInterest = rs.getBigDecimal(148);
			    wrapper.crSplAccruedInterest = rs.getBigDecimal(149);
			    //End DoDream
			  //Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
			    wrapper.nextCRIntChngDt = rs.getDate(150);
			    wrapper.nextDBIntChngDt = rs.getDate(151);
			    wrapper.promoCrIntFlag = rs.getString(152);
				wrapper.promoDbIntFlag = rs.getString(153);
			  //End here
				
				//Added for SIMCO R4 -10000702_ALL_TSD_PromotionalBand_V1.0.doc
				wrapper.crPromoCode = rs.getString(154);
				wrapper.drPromoCode = rs.getString(155);
				wrapper.splCrIntPrdCd = rs.getString(156);
				wrapper.splDrIntPrdCd = rs.getString(157);
				//Ends here 
				//Added for SGExcessInterest Logic
				wrapper.splIntIndFlag = Utility.getChar(rs.getString(158));
				//End Added for SGExcessInterest Logic
				//CL-H 6 changes starts
				wrapper.accountTitle2= rs.getString(159);
				//CL-H changes ends here
				//Added new column-fatcaCrsExclReason by 1554622 for Account level restriction project - jira # CBRCPBO-10899
				wrapper.fatcaCrsExclReason = rs.getString(160);
				//End here by 1554622 for Account level restriction project - jira # CBRCPBO-10899
				
//added for in gst
				wrapper.gstRegistrationNo = rs.getString(161);
				//added by 1563531(Sivanageswarareddy) as part of Day 2
				wrapper.gstRegistrationFlag = Utility.getChar(rs.getString(162));
				//Added  Account level restriction by 1546761
				wrapper.gstCustomerSpecialStatus = Utility.getChar(rs.getString(163));
				wrapper.gstCustomerType = Utility.getChar(rs.getString(164));
				//Added by 1604375 for UK view issue
				//Commented for ZA-MT900/910 Issue
				
				//added by 1624396 George,for EBBSHRM-78916
				wrapper.intAccProIndicator = Utility.getChar(rs.getString(165));
				
				wrapper.signaturelevel = Utility.getChar(rs.getString(166)); //KEYSTONEHK-29109
				wrapper.lastSigUpdateDT = rs.getDate(167);
				if(SystemProperties.getInstance().getCompanyID().equalsIgnoreCase("GB")||SystemProperties.getInstance().getCompanyID().equalsIgnoreCase("DE")) {
				wrapper.accountType = this.getAccountType(rs.getString(3)); 
				}
				
			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return wrapper;

	}
	
	//Added by 1604375 for UK view issue
	//Commented the Method for ZA-MT900/910 Issue
	private char getAccountType(String masterNo) throws FinderException {
		
		SQLExecutor con1 = null;
		SQLStatementObject pstmt = null;
		SQLResultObject rs1 = null;
		char acctType = '\u0000';
		
		logWriter.println("Inside get account type");
		try {
			con1 = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			pstmt = con1.getStatementObject(FIND_BY_PRIMARYKEY_FOR_ACCTTYPE, false, false);
			pstmt.setString(1, masterNo);
			rs1 = pstmt.executeQuery();
			if (rs1.next()) {
				acctType = Utility.getChar(rs1.getString(1));
				logWriter.println("accountType :::: " + acctType);
			}
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (rs1 != null) {
					rs1.close();
				}
				if (pstmt != null) {
					pstmt.close();
				}
				if (con1 != null) {
					con1.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		return acctType;
	}
	

	

	// Code added by S.Ramesh for E10-MLTS on 09-10-2005
	public SubsidiaryAccountWrapper fetchMltsMain(SubsidiaryAccountEntityKey key,SubsidiaryAccountWrapper wrapper) throws javax.ejb.FinderException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		Vector v = new Vector();
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_MACCOUNT, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_MACCOUNT, false, false);
				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				rs = stmt.executeQuery();
				HashMap valueHash = null;
				while (rs.next()) {
					valueHash = new HashMap();
					valueHash.put("ACCOUNTTITLE", rs.getString(1));
					valueHash.put("LANGUAGECODE", rs.getString(2));
					valueHash.put("RECORDSTATUS", Integer.valueOf(EBBSConstants.NO_CHANGE));
					valueHash.put("ACCOUNTTITLE2", rs.getString(3));
					valueHash.put("SHORTNAME", rs.getString(4));
					v.add(valueHash);
				}

			}
			wrapper.languageComponentHash = v;
			// OBOR-14931 lang description fields are editable multilingually
			wrapper.maccountInfoTypeWrapper = fetchMultilingualInfoType(key);
		}catch(NamingException ne){
			ne.printStackTrace();
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering

		}

		finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}

		}

		return wrapper;

	}

	/**
	 * findAccountInBranch method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Purpose finding an account in Branch
	 * @returnType java.util.Enumeration
	 * @param argBranchCode
	 *            String
	 * @param argAccountNo
	 *            String
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public Enumeration findAccountInBranch(String argBranchCode, String argAccountNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		Vector keys = new Vector();
		SQLStatementObject statement = null;
		SQLResultObject rs = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			String FIND_SQL = "EBACC00170SY";
			statement = con.getStatementObject(FIND_SQL, false, false);

			statement.setString(1, argBranchCode);
			statement.setString(2, argAccountNo);

			rs = statement.executeQuery();
			while (rs.next()) {
				SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				keys.addElement(key);
			}

			if (keys.size() == 0) {
				throw new ObjectNotFoundException();
			}

		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new FinderException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (statement != null) {
					statement.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);// //-
				// F16
				// reengineering
				throw new FinderException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}

		return keys.elements();
	}

	/**
	 * Insert the method's description here. Creation date: (06/29/2002 1:57:45
	 * PM)
	 *
	 * @return java.util.Enumeration
	 */
	public Enumeration findAccountsByRelationship(String relNo, boolean result) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SQLStatementObject pstmt = null;
		SQLResultObject rs = null;
		// Vector v = new Vector();
		Vector resultVector = new Vector();

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (result) {
				pstmt = con.getStatementObject(FIND_ALL_MASTERNO_BY_RELATIONSHIP, true, false);
			} else {
				pstmt = con.getStatementObject(FIND_ALL_MASTERNO_BY_RELATIONSHIP, false, false);
			}

			pstmt.setString(1, relNo);
			rs = pstmt.executeQuery();

			while (rs.next()) {
				resultVector.addElement(new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2)));
			}

			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}
		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16
			// reengineering
			throw new FinderException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} finally {
			try
			// changes done by venkat for india eBBS on 14/08/2007 for the
			// compilation issues
			// { //to comment additional open brace
			// end changes
			{
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (pstmt != null) {
					pstmt.close();
				}
			if(con!=null){
				con.destroy();
				con=null;
			}

				// end releaseConnection(con);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * findAccountInBranch method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Purpose finds account and Braanch
	 * @returnType java.util.Enumeration
	 * @param argBranchCode
	 *            String
	 * @param argAccountNo
	 *            String
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */
	public Enumeration findByAccountNoAndBranch(String argAccountNo, String argBranchCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_ACCOUNTNO_BRANCH, false, false);
			stmt.setString(1, argAccountNo);
			stmt.setString(2, argBranchCode);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * findByAccountNos method comment
	 *
	 * @Creation date: (12/7/00 6:33:49 PM)
	 * @Purpose finds the accounts in all currencies
	 * @returnType java.util.Enumeration
	 * @param argAccountNo
	 *            String
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */

	public Enumeration findByAccountNos(String argAccountNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_ACCOUNTNOS, false, false);
			stmt.setString(1, argAccountNo);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}
			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if(con != null) {
					con.destroy();
				}

				// end releaseConnection(con);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();
	}
	/**
	 * findByAccountNos method comment
	 *
	 * @Creation date: (16/02/16 3:37:49 PM)
	 * @Purpose finds the accounts in all currencies --New method for loading  required table data
	 * @returnType java.util.Enumeration
	 * @param argAccountNo
	 *            String
	 * @exception scb.exception.javax.ejb.FinderException
	 *                The exception description.
	 */
	//SivaKumar S Added New method for loading  required table data
	public Enumeration findByAccountNos(String argAccountNo, int[] child) throws javax.ejb.FinderException {
		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
			try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_ACCOUNTNOS, false, false);
			stmt.setString(1, argAccountNo);
			rs = stmt.executeQuery();
			while (rs.next()) {
			resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2), child);
			resultVector.addElement(resultKey);
			}
			if (resultVector.size() == 0) {
			throw new ObjectNotFoundException();
			}
			} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			} finally {
					try {

					if (rs != null) {
						rs.close();
					}
						if (stmt != null) {
						stmt.close();
					}
					if(con != null)
					 {
						con.destroy();
						// end releaseConnection(con);
					}
					} catch (SQLExecuteException sqle) {
						scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
						// F16
						// reengineering
						throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
					}
			}
		return resultVector.elements();
	}
	//ended

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */
	public Enumeration findByActiveMasterNos(String argMasterNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_ACTIVE_MASTERNO, false, false);
			stmt.setString(1, argMasterNo);
			stmt.setShort(2, EBBSConstants.CLOSED);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if(con != null)
				 {
					con.destroy();
				// end releaseConnection(con);
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */
	public Enumeration findByActiveMasterNos(SubsidiaryAccountWrapper argWrapper) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_ACTIVE_MASTERNO, false, false);
			stmt.setString(1, argWrapper.masterNo);
			stmt.setShort(2, EBBSConstants.ACTIVE);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findByBranchAndAccountNo(String argAccountNo, String argBranchCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_BRANCH_ACCOUNT, false, false);
			stmt.setString(1, argAccountNo);
			stmt.setString(2, argBranchCode);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), argAccountNo);
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */

	public Enumeration findByLimit(String argMasterNo, String argLimitNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		String[] str = new String[2];
		SubsidiaryAccountEntityKey resultKey = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			stmt = con.getStatementObject(FIND_BY_LIMIT, false, false);
			stmt.setString(1, argMasterNo);
			stmt.setString(2, argLimitNo);
			//Commented for  Limit ReEngineering & Group IOD Project changes
			/*stmt.setString(3, argMasterNo);
			stmt.setString(4, argLimitNo);*/
			stmt.setShort(3, EBBSConstants.CLOSED);

			rs = stmt.executeQuery();

			while (rs.next()) {
				str[0] = rs.getString(1);
				str[1] = rs.getString(2);
				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				// changes done by venkat for india eBBS on 14/08/2007 for the
				// compilation issues
				// { //to comment additional open brace
				// end changes
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findByMast_Curr_Prd_Seq(String argMasterNo, String argCurrencyCode, String argProductCode, String argSeqNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_MAST_CURR_PRD_SEQ, false, false);
			String queryString = "%" + argSeqNo.trim();
			stmt.setString(1, queryString);
			stmt.setString(2, argCurrencyCode);
			stmt.setString(3, argProductCode);
			stmt.setString(4, argMasterNo);

			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() <= 0) {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}

				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findByMasterAndCurrency(String argMasterNo, String argCurrencyCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_MASTERNO_CURRCODE, false, false);
			stmt.setString(1, argMasterNo);
			stmt.setString(2, argCurrencyCode);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findByMasterNoAccount(String argMasterNo, String argCurrencyCode, String argAccountNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_ALL_MASTERNO_ACCOUNT, false, false);
			stmt.setString(1, argMasterNo);
			stmt.setString(2, argCurrencyCode);
			stmt.setString(3, argAccountNo);

			rs = stmt.executeQuery();

			while (rs.next()) {
				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findByMasterNoAndProduct(String argMasterNo, String productCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_MASTERNO_AND_PRODUCT, false, false);
			stmt.setString(1, argMasterNo);
			stmt.setString(2, productCode);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findAccountsForCrDrInterestAccount(String argCurrencyCode, String argAccountNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(SELECT_ACCOUNTS_FOR_CR_DR_INTEREST_ACCOUNT, false, false);
			stmt.setString(1, argCurrencyCode);
			stmt.setString(2, argAccountNo);
			stmt.setString(3, argCurrencyCode);
			stmt.setString(4, argAccountNo);
			rs = stmt.executeQuery();
			while (rs.next()) {
				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}
			if (resultVector.size() == 0) {
				throw new FinderException();
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		return resultVector.elements();
	}

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */
	public Enumeration findByMasterNos(String argMasterNo, boolean forUpdate) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (forUpdate) {
				stmt = con.getStatementObject(FIND_BY_MASTERNO, true, false);
			} else {
				stmt = con.getStatementObject(FIND_BY_MASTERNO, false, false);
			}

			stmt.setString(1, argMasterNo);
			rs = stmt.executeQuery();

			while (rs.next()) {
				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}

			// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
			// Retrofitted from MESA
			/*
			 * if (resultVector.size() == 0) throw new FinderException();
			 */
			// changes done by Jabbar for PNCH00001723468_PNCH00001726945 - Risk
			// related changes on 03/06/2004.
			// changed FinderException to ObjectNotFoundException.
			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}
			// changes end here.

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */
	public Enumeration findByMasterNosForUpdate(String argMasterNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_MASTERNO, false, false);
			stmt.setString(1, argMasterNo);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultKey.fetchForUpdate = true;
				resultVector.addElement(resultKey);
			}

			// // changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
			// Retrofitted from MESA
			/*
			 * if(resultVector.size()==0) throw new FinderException();
			 */
			// changes done by Jabbar for PNCH00001723468_PNCH00001726945 - Risk
			// related changes on 03/06/2004.
			// changed FinderException to ObjectNotFoundException.
			if (resultVector.size() == 0) {
				throw new ObjectNotFoundException();
			}
			// changes end here.

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * Insert the method's description here. Creation date: (12/7/00 6:33:49 PM)
	 *
	 * @return scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 */

	public Enumeration findByMasterNosForUpdateUS(String argMasterNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_MASTERNO, false, false);
			stmt.setString(1, argMasterNo);
			rs = stmt.executeQuery();

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultKey.fetchForUpdate = true;
				resultVector.addElement(resultKey);
			}

			if (resultVector.size() == 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}
				// end
				if(con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	/**
	 * findPrimaryKeyObject method comment.
	 */
	public scb.wrapper.PrimaryKey findByNonClosedAccounts(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_NON_CLOSED, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.setShort(3, EBBSConstants.CLOSED);
			rs = stmt.executeQuery();

			if (!rs.next()) {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return argKey;

	}

	public SubsidiaryAccountEntityKey findByStatusFlag(SubsidiaryAccountEntityKey key, short[] statusFlag) throws javax.ejb.FinderException {
       LogWriter out =null;
	   if(out==null){
		   out= scb.util.LogWriter.getInstance("Subsidiary Account ","findByStatusFlag");
	   }
	   		out.println("findByStatusFlag called with key: " + key.accountNo +","+key.currencyCode+ " and statusFlag: " + Arrays.toString(statusFlag));
		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		boolean found = false;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_STATUSFLAG, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);

			rs = stmt.executeQuery();

			if (rs.next()) {
				short status = rs.getShort(1);

				for (int i = 0; i < statusFlag.length; i++) {
					if (status == statusFlag[i]) {
						found = true;
						break;
					}
				}
				if (!found) {
					throw new FinderException();
				}

			} else {
				throw new ObjectNotFoundException();

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}

				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}
		return key;

	}

	public Enumeration findForBulkingCharges(Date executionDate) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_FOR_CHARGE_BULKING, false, false);
			stmt.setString(1, "Y");
			stmt.setDate(2, executionDate);
			rs = stmt.executeQuery();

			while (rs.next()) {

				SubsidiaryAccountEntityKey resultkey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultkey.fetchForUpdate = true;
				resultVector.addElement(resultkey);
			}

			if (resultVector.size() <= 0) {
				throw new ObjectNotFoundException();
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();

	}

	public Enumeration findForOfflineCharges(String argCurrecyCode, String argProductCode, String argBranchCode, String argSegmentCode, String argInstitutionClassCode, String lastAccountNo) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			String SELECT_ACCOUNT_SQL = "EBACC00171SN";
			String where_Clause = " WHERE ACCOUNT.MASTERNO = MAST.MASTERNO";

			if (argCurrecyCode != null) {
				where_Clause += " AND CURRENCYCODE='" + argCurrecyCode + "'";
			}
			if (argProductCode != null) {
				where_Clause += " AND PRODUCTCODE='" + argProductCode + "'";
			}
			if (argBranchCode != null) {
				where_Clause += " AND ACCOUNTBRANCH='" + argBranchCode + "'";
			}
			if (argSegmentCode != null) {
				where_Clause += " AND ACCOUNT.SEGMENTCODE='" + argSegmentCode + "'";
			}
			if (argInstitutionClassCode != null) {
				where_Clause += " AND INSTCLASSCODE='" + argInstitutionClassCode + "'";
			}
			if (lastAccountNo != null) {
				where_Clause += " AND ACCOUNTNO > '" + lastAccountNo + "'";
			}

			where_Clause += " ORDER BY ACCOUNTNO "+OptimizeFor.getOptimizeForJavaQuery("OPTIMIZE FOR 100 ROWS");

			SELECT_ACCOUNT_SQL += where_Clause;

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject();
			rs = stmt.executeQuery(SELECT_ACCOUNT_SQL);

			while (rs.next()) {

				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
				if (resultVector.size() == 100) {
					break;
				}
			}

			if (resultVector.size() <= 0) {
				throw new FinderException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}

				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultVector.elements();
	}

	public SubsidiaryAccountEntityKey findMaxAccountNo(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		// Vector resultVector = new Vector(1);
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_MAX_ACCOUNTNO, false, false);
			stmt.setString(1, key.currencyCode);
			String tempString = key.accountNo.trim() + "%";
			stmt.setString(2, tempString);

			rs = stmt.executeQuery();
			rs.next();

			if (rs.getString(1) != null && rs.getString(1).trim().length() > 0) {
				resultKey = new SubsidiaryAccountEntityKey(key.currencyCode, rs.getString(1));

			} else {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}

				if (stmt != null) {
					stmt.close();
				}

				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultKey;

	}

	/**
	 * findPrimaryKeyObject method comment.
	 */
	public scb.wrapper.PrimaryKey findPrimaryKeyObject(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {
		LogWriter out =null;
		if(out==null){
			out= scb.util.LogWriter.getInstance("Subsidiary Account ","findPrimaryKeyObject");
		}
		out.println("findByStatusFlag called with argKey: ");
		// System.out.println("findByPrimaryKey::::::::::");
		// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
		// Retrofitted from MESA
		String scbAccountNo;
		// changes end here

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
		// Retrofitted from MESA
		if (key.isOldAccountNo) {
			scbAccountNo = findSCBAccountNo(key.accountNo, key.currencyCode);
			if (scbAccountNo != null) {
				key.accountNo = scbAccountNo;
			}
			key.isOldAccountNo = false;
		}
		// change ends here
		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;

		SQLStatementObject stmt = null;
		SQLStatementObject pstmt = null;
		SQLResultObject rs = null;
		SQLResultObject rs1 = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				out.println("Fetching for update");
				stmt = con.getStatementObject(FIND_BY_PRIMARYKEY, true, false);
			} else {
        	//PostEngineAccountsQueue Fix
				stmt = con.getStatementObject(FIND_BY_PRIMARYKEY_CS, false, false);
			}

			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();

			if (rs.next()) {

				if (key.loadChild[2]) {
					pstmt = con.getStatementObject(FIND_BY_PRIMARYKEY_FOR_ACCTTYPE, false, false);
					pstmt.setString(1, rs.getString(1));
					rs1 = pstmt.executeQuery();

					if (rs1.next()) {
						key.accountType = Utility.getChar(rs1.getString(1));
					}

				}

			} else {
				throw new ObjectNotFoundException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} catch (FinderException fe) {
			throw fe;
		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement

				if (rs != null) {
					rs.close();
				}
				if (rs1 != null) {
					rs1.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (pstmt != null) {
					pstmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}

		}

		return key;

	}

	public scb.wrapper.PrimaryKey findPrimaryKeyObjectForView(scb.wrapper.PrimaryKey argKey, int statusFlag) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		fetchMaster(key);
		fetchMasterForView(key, statusFlag);
		fetchAccountLinks(key);
		// Code added by Manikandan for E12 Customer Linkage on 02-10-2007
		fetchCustomerAccLink(key);
		fetchLinkAccountInformations(key);
		return argKey;

	}

	/**
	 * loadObject method comment.
	 */
	public scb.wrapper.AbstractWrapper loadObject(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		AbstractWrapper wrapper = null;
		if (key.moduleName == key.INTEREST_ACCRUAL) {
			wrapper = loadObjectForInterestAccural(key);
		} else if (key.moduleName == key.INTEREST_APPLICATION) {
			wrapper = loadObjectForInterestCapitalisation(key);
		}
	  else if (key.moduleName == key.INTEREST_MONTHLY_ACCRUAL) {
		wrapper = loadObjectForInterestMonthlyAccural(key);
	}
	else {
			wrapper = loadObjectDefault(key);
		}

		return wrapper;
	}

	/*----------*/
	/**
	 * loadObjectDefault method comment.
	 */
	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper loadObjectDefault(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;

		//Added for UK 1604375
		LogWriter out = null;
		if(out==null){
			out = LogWriter.getInstance("Subsidiary Account",  "Subsidiary Account");			
		}
	//	out.println("Inside the subsidiaryHelper loadObjectDefault()");		

		SubsidiaryAccountWrapper wrapper = fetchMaster(key);
		wrapper = fetchMltsMain(key,wrapper);

		if (key.loadChild[0]) {
			wrapper.accountNomineeWrapper = fetchAccountNominee(key);
		}

		if (key.loadChild[1]) {
			wrapper.accountChargeWrapper = fetchAccountCharge(key);
		}
		if (key.loadChild[3]) {
			wrapper.accountLinksWrapper = fetchAccountLinks(key);
		}
		if (key.loadChild[4]) {
			wrapper.accountInfoTypeWrapper = fetchInfoType(key);
		}
		// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
		// Retrofitted from PH
		// included by sumithra on 10.02.2004 for PH047 - Nominated Charge
		// Acocunt
		if (key.loadChild[5]) {
			wrapper.nominatedChargeAccountWrapper = fetchNominatedChargeAccount(key);
		}
		if (key.loadChild[6]) {
			wrapper.taxWaiverWrapper = fetchAcTaxWaiver(key);
		}
		// changes end here
		if (key.loadChild[7]) {
			wrapper.customerLinkWrapper = fetchCustomerAccLink(key);
		}
			//		Added by Suresh for R3 UK Capability UKCOR19
		if (key.loadChild[8]) {
			wrapper.crossDataValidationWrapper = fetchGLDataDetails(key);
				}
		//Start -SIMCO R3<<Locker Charges>>
		if (key.loadChild[9]) {
			wrapper.accountOfflineChargeWrapper = fetchAccountOfflineCharge(key);
		}
		//End -SIMCO R3<<Locker Charges>>	
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## loadObjectDefault() ## beforeLinkAccinfo");
		if (key.loadChild[10]) {
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## loadObjectDefault() ## insideLinkaccinfo");
			wrapper.linkAccountInformationWrapper = fetchLinkAccountInformations(key);
		}

		/*Added By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */
		wrapper.subsidiaryAccountSCIFATCAWrapper=fetchAccSciFatca(key);
		
		wrapper = fetchSCAcct(key,wrapper);
		
		//Added changes for RPRCode - 8266187
		wrapper = fetchAccountMisc(key, wrapper);

		return wrapper;
	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper loadObjectForInterestAccural(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SubsidiaryAccountWrapper wrapper = fetchMasterForInterestAccural(key);
		// wrapper.languageComponentHash = fetchMltsMain(key);
		// wrapper.put("InterestAccural","InterestAccural");
		return wrapper;
	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper loadObjectForInterestCapitalisation(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SubsidiaryAccountWrapper wrapper = fetchMasterForInterestCapitalisation(key);

		// wrapper.put("InterestCapitalisation","InterestCapitalisation");
		return wrapper;
	}


	public scb.wrapper.AbstractWrapper loadObjectForInterestMonthlyAccural(scb.wrapper.PrimaryKey argKey) throws javax.ejb.FinderException {

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		//PT Changes done For INDIA PRODUCTION By Bala
		SubsidiaryAccountWrapper wrapper = fetchMasterForInterestMonthlyAccural(key);
		// wrapper.languageComponentHash = fetchMltsMain(key);
		// wrapper.put("InterestAccural","InterestAccural");
		return wrapper;
	}
	public AccountChargeWrapper[] modifyAccountCharge(SubsidiaryAccountEntityKey key, AccountChargeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		AccountChargeWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACCHARGE, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACCHARGE, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACCHARGE, false, false);

			Vector vector = new Vector();
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					stmtInsert.setString(1, key.currencyCode);
					stmtInsert.setString(2, key.accountNo);
					stmtInsert.setString(3, wrapper[i].chargeCode);
					stmtInsert.setString(4, Utility.getString(wrapper[i].chargesWaivedFlag));
					stmtInsert.setBigDecimal(5, wrapper[i].chargeOffset);
					//Code Added by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
					stmtInsert.setDouble(6,wrapper[i].chargePercent);
					stmtInsert.setDate(7,wrapper[i].reviewDate);
					stmtInsert.setString(8,wrapper[i].waiverReason);
					logWriter.println("Currency Code/Account No: " + key.currencyCode+"/"+key.accountNo);					
					// Ends Here.
					 //Added by balaji for E12 Migration - R1 Phase - Project id 09002841
					if(wrapper[i].discountFlag !='\u0000') {
						stmtInsert.setString(9, Utility.getString(wrapper[i].discountFlag));
					} else {
						stmtInsert.setString(9, Utility.getString('N'));
					}
					stmtInsert.setString(10, Utility.getString(wrapper[i].systemGeneratedFlag));
					stmtInsert.setInt(11, wrapper[i].noOfDiscounts);
					stmtInsert.setBigDecimal(12, wrapper[i].availableDiscount);
					//Start -SIMCO R3<<Locker Charges>>
					stmtInsert.setString(13, Utility.getString(wrapper[i].chargeGroupFlag));	
					//End -SIMCO R3<<Locker Charges>>					
					stmtInsert.executeUpdate();
					vector.addElement(wrapper[i]);
				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					stmtUpdate.setString(1, Utility.getString(wrapper[i].chargesWaivedFlag));
					stmtUpdate.setBigDecimal(2, wrapper[i].chargeOffset);
					/*stmtUpdate.setString(3, key.currencyCode);
					stmtUpdate.setString(4, key.accountNo);
					stmtUpdate.setString(5, wrapper[i].chargeCode);*/
					//Code Added by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
					stmtUpdate.setDouble(3,wrapper[i].chargePercent);
					stmtUpdate.setDate(4,wrapper[i].reviewDate);
					stmtUpdate.setString(5,wrapper[i].waiverReason);
					 //Added by balaji for E12 Migration - R1 Phase - Project id 09002841
					if(wrapper[i].discountFlag !='\u0000') {
						stmtUpdate.setString(6, Utility.getString(wrapper[i].discountFlag));
					} else {
						stmtUpdate.setString(6, Utility.getString('N'));
					}	
					stmtUpdate.setString(7, Utility.getString(wrapper[i].systemGeneratedFlag));
					stmtUpdate.setInt(8, wrapper[i].noOfDiscounts);
					stmtUpdate.setBigDecimal(9, wrapper[i].availableDiscount);
					//Start -SIMCO R3<<Locker Charges>>
					stmtUpdate.setString(10, Utility.getString(wrapper[i].chargeGroupFlag));	
					//End -SIMCO R3<<Locker Charges>>
					stmtUpdate.setString(11, key.currencyCode);
					stmtUpdate.setString(12, key.accountNo);
					stmtUpdate.setString(13, wrapper[i].chargeCode);					
					// Ends Here.
					stmtUpdate.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, wrapper[i].chargeCode);
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);

				}

			}

			if (vector.size() > 0) {
				newWrapper = new AccountChargeWrapper[vector.size()];
				vector.copyInto(newWrapper);

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}

	public AccountLinksWrapper[] modifyAccountLinks(SubsidiaryAccountEntityKey key, AccountLinksWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		AccountLinksWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;

		// System.out.println("modifyAccountLinks key.accountno"+key.accountNo);
		// System.out.println("modifyAccountLinks
		// key.currencycode"+key.currencyCode);

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACCLINKS, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACCLINKS, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACCLINKS, false, false);

			Vector vector = new Vector();

			for (int i = 0; i < wrapper.length; i++) {
				logWriter.println("Key Currency Code/Key Account No/Wrapper Currency Code/Wrapper Account No: "+key.currencyCode+"/"+key.accountNo+"/"+wrapper[i].currencyCode+"/"+wrapper[i].accountNo);
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {

					stmtInsert.setString(1, key.accountNo);
					stmtInsert.setString(2, key.currencyCode);
					stmtInsert.setString(3, String.valueOf(wrapper[i].seqNo));

					stmtInsert.setString(4, wrapper[i].templateId);
					stmtInsert.setString(5, wrapper[i].accountNo);
					stmtInsert.setString(6, wrapper[i].currencyCode);
					stmtInsert.setString(7, wrapper[i].masterNumber);
					stmtInsert.setString(8, wrapper[i].relationshipNo);
					stmtInsert.setString(9, Utility.getString(wrapper[i].accountType));
					stmtInsert.setString(10, wrapper[i].branchCode);
					stmtInsert.setString(11, wrapper[i].productCode);					
					stmtInsert.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					stmtUpdate.setString(1, wrapper[i].templateId);
					stmtUpdate.setString(2, wrapper[i].accountNo);
					stmtUpdate.setString(3, wrapper[i].currencyCode);
					stmtUpdate.setString(4, wrapper[i].masterNumber);
					stmtUpdate.setString(5, wrapper[i].relationshipNo);
					stmtUpdate.setString(6, Utility.getString(wrapper[i].accountType));
					stmtUpdate.setString(7, wrapper[i].branchCode);
					stmtUpdate.setString(8, wrapper[i].productCode);
					stmtUpdate.setString(9, key.currencyCode);
					stmtUpdate.setString(10, key.accountNo);
					stmtUpdate.setString(11, String.valueOf(wrapper[i].seqNo));
					stmtUpdate.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {					
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, String.valueOf(wrapper[i].seqNo));
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);

				}

			}

			if (vector.size() > 0) {
				newWrapper = new AccountLinksWrapper[vector.size()];
				vector.copyInto(newWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}

	public AccountNomineeWrapper[] modifyAccountNominee(SubsidiaryAccountEntityKey key, AccountNomineeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		AccountNomineeWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACNOMINEE, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACNOMINEE, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACNOMINEE, false, false);

			Vector vector = new Vector();
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					stmtInsert.setString(1, key.currencyCode);
					stmtInsert.setString(2, key.accountNo);
					stmtInsert.setString(3, String.valueOf(wrapper[i].seqNo));
					stmtInsert.setString(4, wrapper[i].relationshipNo);
					stmtInsert.setString(5, wrapper[i].name);
					stmtInsert.setString(6, wrapper[i].flatNo);
					stmtInsert.setString(7, wrapper[i].buildingName);
					stmtInsert.setString(8, wrapper[i].streetName);
					stmtInsert.setString(9, wrapper[i].locationCode);
					stmtInsert.setString(10, wrapper[i].postBox);
					stmtInsert.setString(11, wrapper[i].cityCode);
					stmtInsert.setString(12, wrapper[i].countryCode);
					stmtInsert.setString(13, wrapper[i].postalCode);
					stmtInsert.setString(14, wrapper[i].telephoneNo);

					// stmtInsert.setString(15, wrapper[i].addressee);
					stmtInsert.setString(15, wrapper[i].address1);
					stmtInsert.setString(16, wrapper[i].address2);
					stmtInsert.setString(17, wrapper[i].cityName);
					stmtInsert.setString(18, wrapper[i].state);
					stmtInsert.setString(19, wrapper[i].attentionParty);
					stmtInsert.setString(20, wrapper[i].nearLandmark);
					stmtInsert.setString(21, String.valueOf(wrapper[i].noYrsCurrentAddress));
					stmtInsert.setString(22, Utility.getString(wrapper[i].isMailingAddress));
					//Changed added for EBBSHRM-53506
					// Changes done by Jahnavi for AccountNomineePrint to India E12 - New Field added NomineeRegistered to ACNOM,TACNOM Table  
					stmtInsert.setString(23, Utility.getString(wrapper[i].isNomineeRegistered));
					//Ends Here
					stmtInsert.setDate(24,wrapper[i].lastUpdatedDate); // CBRCPBE-340 - lastUpdatedDate added - 1562748
                    //IN NOMINEE
					stmtInsert.setString(25, Utility.getString(wrapper[i].nomConsentTaken)); // char field
					stmtInsert.setString(26, wrapper[i].nominationType); // String field
					stmtInsert.setString(27, wrapper[i].nomord); // String field
					stmtInsert.setBigDecimal(28, wrapper[i].nomShare); // BigDecimal field
					stmtInsert.setString(29, wrapper[i].address3); // String field
					stmtInsert.setString(30, wrapper[i].nomEmail); // String field
					stmtInsert.setString(31, wrapper[i].nomMob); // String field
					stmtInsert.setString(32, wrapper[i].nomRelTypeCode); // String field
					stmtInsert.setInt(33, wrapper[i].nomAge); // int field
					stmtInsert.setDate(34, wrapper[i].nomAgeason); // Date field
					stmtInsert.setDate(35, wrapper[i].nomDob); // Date field
					stmtInsert.setString(36, wrapper[i].nomGrdnName); // String field
					stmtInsert.setString(37, wrapper[i].nomGrdnAddress); // String field
					stmtInsert.setString(38, wrapper[i].nomGrdnRelTypeCode); // String field
					stmtInsert.setString(39, wrapper[i].nomGrdnMobile); // String field
					stmtInsert.setString(40, wrapper[i].nomGrdnEmail); // String field
					stmtInsert.setInt(41, wrapper[i].nomGrdnAge); // int field
					stmtInsert.setDate(42, wrapper[i].nomGrdnAgeASON); // Date field
					stmtInsert.setString(43, Utility.getString(wrapper[i].isDeceased)); // char field
					stmtInsert.setDate(44, wrapper[i].deceasedRecvDate); // Date field
					stmtInsert.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {

					stmtUpdate.setString(1, wrapper[i].relationshipNo);
					stmtUpdate.setString(2, wrapper[i].name);
					stmtUpdate.setString(3, wrapper[i].flatNo);
					stmtUpdate.setString(4, wrapper[i].buildingName);
					stmtUpdate.setString(5, wrapper[i].streetName);
					stmtUpdate.setString(6, wrapper[i].locationCode);
					stmtUpdate.setString(7, wrapper[i].postBox);
					stmtUpdate.setString(8, wrapper[i].cityCode);
					stmtUpdate.setString(9, wrapper[i].countryCode);
					stmtUpdate.setString(10, wrapper[i].postalCode);
					stmtUpdate.setString(11, wrapper[i].telephoneNo);

					// stmtUpdate.setString(12, wrapper[i].addressee);
					stmtUpdate.setString(12, wrapper[i].address1);
					stmtUpdate.setString(13, wrapper[i].address2);
					stmtUpdate.setString(14, wrapper[i].cityName);
					stmtUpdate.setString(15, wrapper[i].state);
					stmtUpdate.setString(16, wrapper[i].attentionParty);
					stmtUpdate.setString(17, wrapper[i].nearLandmark);
					stmtUpdate.setString(18, String.valueOf(wrapper[i].noYrsCurrentAddress));
					stmtUpdate.setString(19, Utility.getString(wrapper[i].isMailingAddress));
					//Changes added for EBBSHRM-53506
					// Changes done by Jahnavi for AccountNomineePrint to India E12 - New Field added NomineeRegistered to ACNOM,TACNOM Table  
					stmtUpdate.setString(20, Utility.getString(wrapper[i].isNomineeRegistered));
					//Ends Here
					stmtUpdate.setDate(21,wrapper[i].lastUpdatedDate); // CBRCPBE-340 - lastUpdatedDate added - 1562748
                    //IN NOMINEE
					stmtUpdate.setString(22, Utility.getString(wrapper[i].nomConsentTaken)); // char field
                    stmtUpdate.setString(23, wrapper[i].nominationType); // String field
                    stmtUpdate.setString(24, wrapper[i].nomord); // String field
                    stmtUpdate.setBigDecimal(25, wrapper[i].nomShare); // BigDecimal field
                    stmtUpdate.setString(26, wrapper[i].address3); // String field
                    stmtUpdate.setString(27, wrapper[i].nomEmail); // String field
                    stmtUpdate.setString(28, wrapper[i].nomMob); // String field
                    stmtUpdate.setString(29, wrapper[i].nomRelTypeCode); // String field
                    stmtUpdate.setInt(30, wrapper[i].nomAge); // int field
                    stmtUpdate.setDate(31, wrapper[i].nomAgeason); // Date field
					stmtUpdate.setDate(32, wrapper[i].nomDob); // Date field
					stmtUpdate.setString(33, wrapper[i].nomGrdnName); // String field
					stmtUpdate.setString(34, wrapper[i].nomGrdnAddress); // String field
					stmtUpdate.setString(35, wrapper[i].nomGrdnRelTypeCode); // String field
					stmtUpdate.setString(36, wrapper[i].nomGrdnMobile); // String field
					stmtUpdate.setString(37, wrapper[i].nomGrdnEmail); // String field
					stmtUpdate.setInt(38, wrapper[i].nomGrdnAge); // int field
					stmtUpdate.setDate(39, wrapper[i].nomGrdnAgeASON); // Date field
					stmtUpdate.setString(40, Utility.getString(wrapper[i].isDeceased)); // char field
					stmtUpdate.setDate(41, wrapper[i].deceasedRecvDate); // Date field
					stmtUpdate.setString(42, key.currencyCode); // String field
					stmtUpdate.setString(43, key.accountNo); // String field
					stmtUpdate.setString(44, String.valueOf(wrapper[i].seqNo)); // int field converted to String
					stmtUpdate.executeUpdate();

					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {

					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, String.valueOf(wrapper[i].seqNo));
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);

				}

			}

			if (vector.size() > 0) {
				newWrapper = new AccountNomineeWrapper[vector.size()];
				vector.copyInto(newWrapper);

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}

	public scb.general.wrapper.GenericInfoTypeWrapper[] modifyInfoType(SubsidiaryAccountEntityKey key, scb.general.wrapper.GenericInfoTypeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject psInsert = null;
		SQLStatementObject psUpdate = null;
		SQLStatementObject psDelete = null;
		Vector vec = new Vector();

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			psInsert = con.getStatementObject(INSERT_ACCINFOTYPE, false, false);
			psUpdate = con.getStatementObject(UPDATE_ACCINFOTYPE, false, false);
			psDelete = con.getStatementObject(MODIFY_DELETE_ACCINFOTYPE, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					psInsert.setString(1, key.accountNo);
					psInsert.setString(2, key.currencyCode);
					psInsert.setString(3, wrapper[i].seqNo);
					psInsert.setString(4, wrapper[i].misCode);
					psInsert.setString(5, wrapper[i].misValue);

					if (psInsert.executeUpdate() == 0) {
						throw new SQLExecuteException("Unable to insert child reocrd.");
					}
					vec.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					psUpdate.setString(1, wrapper[i].misCode);
					psUpdate.setString(2, wrapper[i].misValue);
					psUpdate.setString(3, key.accountNo);
					psUpdate.setString(4, key.currencyCode);
					psUpdate.setString(5, wrapper[i].seqNo);

					if (psUpdate.executeUpdate() == 0) {
						throw new SQLExecuteException("Unable to modify child record.");
					}
					vec.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {

					psDelete.setString(1, key.accountNo);
					psDelete.setString(2, key.currencyCode);
					psDelete.setString(3, wrapper[i].seqNo);

					if (psDelete.executeUpdate() == 0) {
						throw new SQLExecuteException("Unable to delete child record.");
					}

				} else {
					vec.addElement(wrapper[i]);
				}

			}
			wrapper = new scb.general.wrapper.GenericInfoTypeWrapper[vec.size()];
			vec.copyInto(wrapper);
			return wrapper;

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (psInsert != null) {
					psInsert.close();
				}
				if (psUpdate != null) {
					psUpdate.close();
				}
				if (psDelete != null) {
					psDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}
	}

	public GenericInfoTypeWrapper[] modifyMultilingualInfoType(SubsidiaryAccountEntityKey key,
                                      String languageCode, GenericInfoTypeWrapper[] abstractWrapper)
			throws CreateException {
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "modifyMultilingualInfoType");
		SQLExecutor con = null;
		SQLStatementObject psInsert = null;
		SQLStatementObject psUpdate	= null;
		SQLStatementObject psDelete	= null;
		Vector vec = new Vector();

		try {
			if(abstractWrapper != null){
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				psInsert = con.getStatementObject(INSERT_MACCINFO);
				psUpdate = con.getStatementObject(UPDATE_MACCINFO);
				psDelete = con.getStatementObject(MODIFY_DELETE_MACCINFO);

				for (int i = 0; i < abstractWrapper.length; i++) {
					GenericInfoTypeWrapper wrapper = abstractWrapper[i];

					if (wrapper.recordStatus == EBBSConstants.NEW) {
						log.println("<<<<<<<<<<Inside New mode>>>>>>");
						psInsert.setString(1, key.accountNo);
						psInsert.setString(2, key.currencyCode);
						psInsert.setString(3, wrapper.seqNo);
						psInsert.setString(4, wrapper.misCodeLangDescription);
						psInsert.setString(5, wrapper.misValueLangDescription);
						psInsert.setString(6, languageCode);

						if (psInsert.executeUpdate() == 0)
							throw new SQLExecuteException("Unable to insert child reocrd.");
						vec.addElement(wrapper);

					} else
					if (wrapper.recordStatus == EBBSConstants.MODIFIED) {
						log.println("<<<<<<<<<<Inside modify mode>>>>>>");
						psUpdate.setString(1, wrapper.misCodeLangDescription);
						psUpdate.setString(2, wrapper.misValueLangDescription);
						psUpdate.setString(3, key.accountNo);
						psUpdate.setString(4, key.currencyCode);
						psUpdate.setString(5, wrapper.seqNo);

						if (psUpdate.executeUpdate() == 0)
							throw new SQLExecuteException("Unable to modify child record.");
						vec.addElement(wrapper);

					} else
					if (wrapper.recordStatus == EBBSConstants.DELETED) {
						log.println("<<<<<<<<<<Inside deleted mode>>>>>>");
						psDelete.setString(1, key.accountNo);
						psDelete.setString(2, key.currencyCode);
						psDelete.setString(3, wrapper.seqNo);

						if (psDelete.executeUpdate() == 0)
							throw new SQLExecuteException("Unable to delete child record.");

					} else {
						vec.addElement(wrapper);
					}

				}
				abstractWrapper = new GenericInfoTypeWrapper[vec.size()];
				vec.copyInto(abstractWrapper);
			}
		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

		}
		finally {
			try{
				if(psInsert != null)
					psInsert.close();
				if(psUpdate != null)
					psUpdate.close();
				if(psDelete != null)
					psDelete.close();

				//releaseConnection(con);//E11.12 Sonar fix
				////scb.ebbs.util.SonarLog.println("CloseResource");
				if(con != null)
				{
					con.destroy();
				}

			} catch	(SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

			}
		}
        return abstractWrapper;
	}

	/**
	 * postCreateObject method comment.
	 */
	public void postCreateObject(scb.wrapper.AbstractWrapper wrapper) {
	}

	public void removeAccountCharge(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SQLStatementObject stmt = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACCHARGE, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	public void removeAccountLinks(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SQLStatementObject stmt = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACCLINKS, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	public void removeAccountNominee(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SQLStatementObject stmt = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACNOMINEE, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/** Info Type Related */

	public void removeInfoType(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SQLStatementObject ps = null;

		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(DELETE_ACCINFOTYPE, false, false);

			ps.setString(1, key.accountNo);
			ps.setString(2, key.currencyCode);
			ps.executeUpdate();

		}

		catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	public void removeMaster(scb.wrapper.PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;

		try {			
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACCOUNT, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();
			if(enableLeanAccount()) {
				createTxnAccountHelper();
				this.txnAccountHelper.removeTxnAccount((SubsidiaryAccountEntityKey) argKey);
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// //code added by S.Ramesh for E10-MLTS on 4-06-2005
	public void removeMultilingual(scb.wrapper.PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_MACCOUNT, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();

			removeMultilingualInfoType(key);
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * refer to OBOR-14931: lang description fields of info type can be edited
	 * @param key SubsidiaryAccountEntityKey
	 * @throws RemoveException
	 */
	public void removeMultilingualInfoType(SubsidiaryAccountEntityKey key) throws RemoveException {
		LogWriter log = LogWriter.getInstance("SubsidiaryAccountHelper", "removeMultilingualInfoType");
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		log.println("Inside removeMultilingualInfoType:"+ key.currencyCode+"/"+ key.accountNo);
		try {
			con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(MODIFY_DELETE_MACCINFO);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();
		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
		} finally {
			try {
				if(stmt != null)
					stmt.close();
				//releaseConnection(con);//E11.12 Sonar fix
				//////scb.ebbs.util.SonarLog.println("CloseResource");
				if(con != null)
				{
					con.destroy();;
				}
			} catch	(SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			}
		}
	}

	/**
	 * removeObject method comment.
	 */
	public void removeObject(scb.wrapper.PrimaryKey key, AbstractWrapper argWrapper) throws javax.ejb.RemoveException, CreateException {
		scb.util.LogWriter out = new LogWriter("EOD","removeObject","removeObject");
		removeAccountNominee(key);
		removeAccountCharge(key);
		removeAccountLinks(key);
		removeLinkAccountInformations(key);
		removeInfoType(key);
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		// SubsidiaryAccountEntityKey key1 = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);

		// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005.
		// Retrofitted from PH
		// included by sumithra on 10.02.2004 for NominatedCHargeAccount - PH047
		removeNominatedChargeAccount(key);
		removeAcTaxWaiver(key); // PH030 - Tax
		// changes end here
		// code added by S.Ramesh for E10-MLTS on 4-06-2005
		removeMultilingual(key);
		// Changes End here
		//		Added by Suresh for R3 UK Capability UKCOR19
		  
		  removeGLDataDetails(key);
		  //end
		removeMaster(key);
		// Code added by Manikandan for E12 - Customer Linkage on 02-10-2007

		removeCustomerAccLink(key, wrapper);
		// removeCustomerAccLink(key1,wrapper);
		//Start -SIMCO R3<<Locker Charges>>
		removeAccountOfflineCharge(key , wrapper.accountOfflineChargeWrapper);
		//End -SIMCO R3<<Locker Charges>>
		 /*Added By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
		removeAccSciFatca(key);
		removeSCAcct(key);
	}
	
	public void removeFastAccountObject(scb.wrapper.PrimaryKey key) throws javax.ejb.RemoveException {
		removeGLDataDetails(key);
		removeInfoType(key);
		removeMaster(key); 
	}

	/**
	 * storeObject method comment.
	 */
	/** Code added and changed by Ramesh N for Entity Bean framework */
	public void storeObject(scb.wrapper.AbstractWrapper argWrapper, scb.wrapper.PrimaryKey argKey) throws CreateException {

		// SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		if (key.moduleName == key.INTEREST_ACCRUAL) {
			storeObjectForInterestAccural(argWrapper);
		} else if (key.moduleName == key.INTEREST_APPLICATION) {
			storeObjectForInterestCapitalisation(argWrapper);
		} else {
			storeObjectDefault(argWrapper);
		}
	}

	public void storeObjectDefault(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {
		scb.util.LogWriter out = new LogWriter("EOD","StoreObjectDefault","storeObjectDefault");
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);
  
		updateMaster(wrapper);
		if (wrapper.accountNomineeWrapper != null) {
			updateAccountNominee(key, wrapper.accountNomineeWrapper);
		}

		if (wrapper.accountChargeWrapper != null) {
			updateAccountCharge(key, wrapper.accountChargeWrapper);
		}

		if (wrapper.accountLinksWrapper != null) {
			updateAccountLinks(key, wrapper.accountLinksWrapper);
		}

		if (wrapper.linkAccountInformationWrapper != null) {
			updateLinkAccountInformations(key, wrapper);
		}

		if (wrapper.accountInfoTypeWrapper != null) {
			updateInfoType(key, wrapper.accountInfoTypeWrapper);
			// updateAccountLinks(wrapper, wrapper.accountLinksWrapper);
		}

		if(wrapper.accountOfflineChargeWrapper != null){
			updateAccountOfflineCharge(key,wrapper.accountOfflineChargeWrapper);
		}
//		Added by Suresh for R3 UK Capability UKCOR19		 
						if(wrapper.crossDataValidationWrapper != null){
							try{
							out.println("--CDV----SubsidiaryAccountHelper-- StoreObjectDefault--Accno/Curr:"+key.accountNo+"/"+key.currencyCode);  								
							removeGLDataDetails(key);
							createGLDataDetail(key,wrapper.crossDataValidationWrapper);
							}
							catch (RemoveException re) {
							 scb.util.LogWriter.getInstance().printErrorMessage(re);// //- F16 reengineering
						}

						}
						
						 /*Added By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
						if(wrapper.subsidiaryAccountSCIFATCAWrapper!=null && wrapper.subsidiaryAccountSCIFATCAWrapper.fatcaDocType!=null){
							//modifyAccSciFatca(key, wrapper.subsidiaryAccountSCIFATCAWrapper);
							updateAccSciFatca(key, wrapper.subsidiaryAccountSCIFATCAWrapper);
						}

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public void storeObjectForInterestCapitalisation(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {

		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		// SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);

		updateMasterForInterestCapitalisation(wrapper);

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public void storeObjectForInterestAccural(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {

		//System.out.println("Inside storeObjectForInterestAccural method####");
		//scb.util.LogWriter.getInstance().printDebugMode("Inside storeObjectForInterestAccural method####");
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		// SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);

		updateMasterForInterestAccural(wrapper);

	}

	public void updateAccountCharge(SubsidiaryAccountEntityKey key, AccountChargeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_ACCHARGE, false, false);
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, Utility.getString(wrapper[i].chargesWaivedFlag));
				stmt.setBigDecimal(2, wrapper[i].chargeOffset);
				//Code Commented out by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
/*				stmt.setString(3, key.currencyCode);
				stmt.setString(4, key.accountNo);
				stmt.setString(5, wrapper[i].chargeCode);*/
				//Code Added by Anitha N for India Day2 ChargeWaiverPercentage on 28.10.2009
				stmt.setDouble(3,wrapper[i].chargePercent);
				stmt.setDate(4,wrapper[i].reviewDate);
				stmt.setString(5,wrapper[i].waiverReason);
				 //Added by balaji for E12 Migration - R1 Phase - Project id 09002841
				if(wrapper[i].discountFlag !='\u0000') {
					stmt.setString(6, Utility.getString(wrapper[i].discountFlag));
				} else {
					stmt.setString(6, Utility.getString('N'));
				}
				stmt.setString(7, Utility.getString(wrapper[i].systemGeneratedFlag));
				stmt.setInt(8, wrapper[i].noOfDiscounts);
				stmt.setBigDecimal(9, wrapper[i].availableDiscount);
				//Start -SIMCO R3<<Locker Charges>>
				stmt.setString(10, Utility.getString(wrapper[i].chargeGroupFlag));	
				//End -SIMCO R3<<Locker Charges>>
				stmt.setString(11, key.currencyCode);
				stmt.setString(12, key.accountNo);
				stmt.setString(13, wrapper[i].chargeCode);
				// Ends Here.				

				stmt.executeUpdate();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * removeObject method comment.
	 */
	public void updateAccountLinks(SubsidiaryAccountEntityKey key, AccountLinksWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;		
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(this.UPDATE_ACCLINKS, false, false);
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, wrapper[i].templateId);
				stmt.setString(2, wrapper[i].accountNo);
				stmt.setString(3, wrapper[i].currencyCode);
				stmt.setString(4, wrapper[i].masterNumber);
				stmt.setString(5, wrapper[i].relationshipNo);
				stmt.setString(6, Utility.getString(wrapper[i].accountType));
				stmt.setString(7, wrapper[i].branchCode);
				stmt.setString(8, wrapper[i].productCode);
				stmt.setString(9, key.currencyCode);
				stmt.setString(10, key.accountNo);
				stmt.setString(11, String.valueOf(wrapper[i].seqNo));
				stmt.executeUpdate();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	public void updateAccountNominee(SubsidiaryAccountEntityKey key, AccountNomineeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_ACNOMINEE, false, false);
			for (int i = 0; i < wrapper.length; i++) {

				stmt.setString(1, wrapper[i].relationshipNo);
				stmt.setString(2, wrapper[i].name);
				stmt.setString(3, wrapper[i].flatNo);
				stmt.setString(4, wrapper[i].buildingName);
				stmt.setString(5, wrapper[i].streetName);
				stmt.setString(6, wrapper[i].locationCode);
				stmt.setString(7, wrapper[i].postBox);
				stmt.setString(8, wrapper[i].cityCode);
				stmt.setString(9, wrapper[i].countryCode);
				stmt.setString(10, wrapper[i].postalCode);
				stmt.setString(11, wrapper[i].telephoneNo);

				// stmt.setString(12, wrapper[i].addressee);
				stmt.setString(12, wrapper[i].address1);
				stmt.setString(13, wrapper[i].address2);
				stmt.setString(14, wrapper[i].cityName);
				stmt.setString(15, wrapper[i].state);
				stmt.setString(16, wrapper[i].attentionParty);
				stmt.setString(17, wrapper[i].nearLandmark);
				stmt.setString(18, String.valueOf(wrapper[i].noYrsCurrentAddress));
				stmt.setString(19, Utility.getString(wrapper[i].isMailingAddress));
				//Changes added for EBBSHRM-53506
				// Changes done by Jahnavi for AccountNomineePrint to India E12 - New Field added NomineeRegistered to ACNOM,TACNOM Table  
				stmt.setString(20, Utility.getString(wrapper[i].isNomineeRegistered));
				//Ends Here 
				if (wrapper[i].recordStatus != EBBSConstants.NO_CHANGE){
					stmt.setDate(21, DateUtility.today()); // CBRCPBE-340 - lastUpdatedDate added - 1562748
				}else{
					stmt.setDate(21, wrapper[i].lastUpdatedDate);
				}
				//IN NOMINEE
				stmt.setString(22, Utility.getString(wrapper[i].nomConsentTaken)); // char field
				stmt.setString(23, wrapper[i].nominationType); // String field
				stmt.setString(24, wrapper[i].nomord); // String field
				stmt.setBigDecimal(25, wrapper[i].nomShare); // BigDecimal field
				stmt.setString(26, wrapper[i].address3); // String field
				stmt.setString(27, wrapper[i].nomEmail); // String field
				stmt.setString(28, wrapper[i].nomMob); // String field
				stmt.setString(29, wrapper[i].nomRelTypeCode); // String field
				stmt.setInt(30, wrapper[i].nomAge); // int field
				stmt.setDate(31, wrapper[i].nomAgeason); // Date field
				stmt.setDate(32, wrapper[i].nomDob); // Date field
				stmt.setString(33, wrapper[i].nomGrdnName); // String field
				stmt.setString(34, wrapper[i].nomGrdnAddress); // String field
				stmt.setString(35, wrapper[i].nomGrdnRelTypeCode); // String field
				stmt.setString(36, wrapper[i].nomGrdnMobile); // String field
				stmt.setString(37, wrapper[i].nomGrdnEmail); // String field
				stmt.setInt(38, wrapper[i].nomGrdnAge); // int field
				stmt.setDate(39, wrapper[i].nomGrdnAgeASON); // Date field
				stmt.setString(40, Utility.getString(wrapper[i].isDeceased)); // char field
				stmt.setDate(41, wrapper[i].deceasedRecvDate); // Date field
				stmt.setString(42, key.currencyCode); // String field
				stmt.setString(43, key.accountNo); // String field
				stmt.setString(44, String.valueOf(wrapper[i].seqNo)); // int field converted to String

				stmt.executeUpdate();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/**
	 * removeObject method comment.
	 */
	private void updateInfoType(SubsidiaryAccountEntityKey key, scb.general.wrapper.GenericInfoTypeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject ps = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(UPDATE_ACCINFOTYPE, false, false);
			for (int i = 0; i < wrapper.length; i++) {
				ps.setString(1, wrapper[i].misCode);
				ps.setString(2, wrapper[i].misValue);
				ps.setString(3, key.accountNo);
				ps.setString(4, key.currencyCode);
				ps.setString(5, wrapper[i].seqNo);
				ps.executeUpdate();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		}

		finally {
			try {
				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}

		}

	}

	public void updateMaster(SubsidiaryAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {
			//Date eoddate=getEODDate();
			boolean isExcessChargesApplicable = isExcessChargesApplicable();
						
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (isExcessChargesApplicable) {
			stmt = con.getStatementObject(STORE_ACCOUNT_EXCESS, false, false);
			}else {
				stmt = con.getStatementObject(STORE_ACCOUNT, false, false);
			}

			stmt.setString(1, wrapper.masterNo);
			stmt.setString(2, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
			stmt.setString(3, wrapper.productCode);
			stmt.setString(4, wrapper.segmentCode);

			stmt.setString(5, wrapper.operatingInstruct);
			stmt.setString(6, wrapper.crInterestCurrencyCode);
			stmt.setString(7, wrapper.crInterestAccountNo);
			stmt.setString(8, wrapper.drInterestCurrencyCode);

			stmt.setString(9, wrapper.drInterestAccountNo);
			stmt.setString(10, Utility.getString(wrapper.crIntIndicatorFlag));
			stmt.setString(11, Utility.getString(wrapper.drIntIndicatorFlag));
			stmt.setString(12, wrapper.interestCode);

			stmt.setString(13, Utility.getString(wrapper.advIntIndicator));
			stmt.setString(14, Utility.getString(wrapper.interestStmtIndicatorFlag));
			stmt.setString(15, wrapper.accountClassCode);
			stmt.setString(16, Utility.getString(wrapper.blockFlag));

			stmt.setString(17, Utility.getString(wrapper.exchangeControlFlag));
			stmt.setString(18, Utility.getString(wrapper.prppaFlag));
			stmt.setString(19, Utility.getString(wrapper.frozenSurrender));
			stmt.setString(20, Utility.getString(wrapper.matchingFlag));

			stmt.setBigDecimal(21, wrapper.forwardCoverRate);
			stmt.setBigDecimal(22, wrapper.exchangeRate);
			stmt.setString(23, wrapper.notes1);
			stmt.setString(24, wrapper.notes2);

			stmt.setString(25, wrapper.notes3);
			stmt.setString(26, wrapper.memoFlag1);
			stmt.setString(27, wrapper.memoFlag2);
			stmt.setString(28, wrapper.memoFlag3);

			stmt.setString(29, wrapper.memoFlag4);
			stmt.setString(30, wrapper.memoFlag5);
			stmt.setString(31, wrapper.userDefinedCode1);
			stmt.setString(32, wrapper.userDefinedCode2);

			stmt.setString(33, wrapper.userDefinedCode3);
			stmt.setString(34, wrapper.userDefinedCode4);
			stmt.setString(35, wrapper.userDefinedCode5);
			stmt.setString(36, wrapper.userDefinedCode6);

			stmt.setString(37, wrapper.userDefinedCode7);
			stmt.setString(38, wrapper.userDefinedCode8);
			stmt.setString(39, wrapper.userDefinedCode9);
			stmt.setString(40, wrapper.userDefinedCode10);

			stmt.setString(41, wrapper.accountClosureReason);
			stmt.setDate(42, wrapper.accountCloseDate);
			stmt.setString(43, Utility.getString(wrapper.bulkChargesFlag));
			stmt.setString(44, Utility.getString(wrapper.bulkingFrequency));

			stmt.setDate(45, wrapper.bulkExecutionDate);
			stmt.setDate(46, wrapper.accountOpenDate);
			stmt.setString(47, Utility.getString(wrapper.refEntriesMarker));
			stmt.setString(48, Utility.getString(wrapper.rejEntriesMarker));

			stmt.setString(49, wrapper.makerDetail.getUserBranch());
			stmt.setDate(50, wrapper.makerDetail.getUserDate());
			stmt.setString(51, wrapper.makerDetail.getUserID());
			stmt.setString(52, wrapper.makerDetail.getUserIPAddress());

			stmt.setTime(53, wrapper.makerDetail.getUserTime());
			stmt.setString(54, wrapper.checkerDetail.getUserBranch());
			//setting eoddate to checkerdate for identifying events
			//stmt.setDate(55, eoddate);
			stmt.setDate(55, wrapper.checkerDetail.getUserDate());
			stmt.setString(56, wrapper.checkerDetail.getUserID());

			stmt.setString(57, wrapper.checkerDetail.getUserIPAddress());
			stmt.setTime(58, wrapper.checkerDetail.getUserTime());
			stmt.setInt(59, wrapper.statusFlag);
			stmt.setString(60, wrapper.accountBranch);

			stmt.setString(61, wrapper.ucaCode);
			stmt.setString(62, Utility.getString(wrapper.isEbswCustSwift));
			stmt.setString(63, wrapper.ebswCustSwift);
			stmt.setString(64, Utility.getString(wrapper.accountCurrentStatus));

			stmt.setDate(65, wrapper.transToDormantDate);
			stmt.setDate(66, wrapper.transToUnclaimDate);
			stmt.setDate(67, wrapper.renewRolloverDate);
			stmt.setDate(68, wrapper.reactiveDate);

			stmt.setDate(69, wrapper.lastDrTrnDate);
			stmt.setDate(70, wrapper.lastCrTrnDate);
			stmt.setDate(71, wrapper.lastCrTrnExclSysDate);
			stmt.setDate(72, wrapper.lastDrTrnExclSysDate);

			stmt.setString(73, Utility.getString(wrapper.interestInSuspenceFlag));
			stmt.setDate(74, wrapper.crLastAccrualDate);
			stmt.setDate(75, wrapper.drLastAccrualDate);
			stmt.setDate(76, wrapper.crLastInterestPaymentDate);

			stmt.setDate(77, wrapper.drLastInterestPaymentDate);
			stmt.setDate(78, wrapper.crNextInterestPaymentDate);
			stmt.setDate(79, wrapper.drNextInterestPaymentDate);
			stmt.setBigDecimal(80, wrapper.creditInterestAccrued);

			stmt.setBigDecimal(81, wrapper.debitInterestAccrued);
			stmt.setBigDecimal(82, wrapper.creditInterestAdjustment);
			stmt.setBigDecimal(83, wrapper.debitInterestAdjustment);
			stmt.setBigDecimal(84, wrapper.creditManualAdjustment);

			stmt.setBigDecimal(85, wrapper.debitManualAdjustment);
			stmt.setBigDecimal(86, wrapper.provisionAdjustmentAmount);
			stmt.setString(87, Utility.getString(wrapper.isIncludedInInterestPooling));
			stmt.setString(88, wrapper.oldAccountNumber);

			stmt.setDate(89, wrapper.lastOfflineChargesProcessedDate);
			stmt.setString(90, Utility.getString(wrapper.supressStatementFlag));
			stmt.setBigDecimal(91, wrapper.transferPricingRate);
			stmt.setString(92, Utility.getString(wrapper.suppressAdviceFlag));

			stmt.setString(93, Utility.getString(wrapper.suppressOtherCorros));
			stmt.setString(94, Utility.getString(wrapper.bulkingTranactionFlag));
//			Commented and modified by Saridha for SIMCO - 10000702_All_TSD_Selfrecon Fix_V1.0.doc
//			stmt.setString(95, String.valueOf(wrapper.selfReconcileFlag));
			stmt.setString(95, Utility.getString(wrapper.selfReconcileTypeFlag));
//			ends here
			stmt.setString(96, Utility.getString(wrapper.instrumentTypeFlag));

			// stmt.setBigDecimal(97, wrapper.thresholdAmount);
			stmt.setString(97, wrapper.limitNo);
			stmt.setString(98, wrapper.limitMasterNo);
			stmt.setString(99, wrapper.debitInterestPrdCode);

			stmt.setString(100, wrapper.creditInterestPrdCode);
			stmt.setString(101, Utility.getString(wrapper.multipleLimits));
			stmt.setBigDecimal(102, wrapper.drLastAccruedAdjAmt);
			stmt.setBigDecimal(103, wrapper.crLastAccruedAdjAmt);
			//Commented for  Limit ReEngineering & Group IOD Project changes
			/*stmt.setString(104, wrapper.intraDayLmtMastNo);
			stmt.setString(105, wrapper.intraDayLmtNo);*/
			stmt.setString(104, Utility.removeNonPrintableAndLinefeed(wrapper.accountTitle));
			stmt.setString(105, Utility.getString(wrapper.supressInterestStmtFlag));
			// TAXCTGCODE=? ,MATURITYDATE=? ,LASTTAXAPPLDATE=?
			// ,LASTCONDINTAPPLDATE=? WHERE CURRENCYCODE=? AND ACCOUNTNO=? ";
			stmt.setString(106, wrapper.prppaCurrencyCode);
			stmt.setString(107, wrapper.prppaAccountNo);
			stmt.setBigDecimal(108, wrapper.lastCrintRate);
			stmt.setBigDecimal(109, wrapper.lastDrintRate);
			stmt.setBigDecimal(110, wrapper.lastExsintRate);
			stmt.setBigDecimal(111, wrapper.pcrintAccruedamt);
			stmt.setBigDecimal(112, wrapper.pdrintAccruedamt);
			stmt.setBigDecimal(113, wrapper.pcrintAdjamt);
			stmt.setBigDecimal(114, wrapper.pdrintAdjamt);
			stmt.setBigDecimal(115, wrapper.pcrmanualAdjamt);
			stmt.setBigDecimal(116, wrapper.pdrmanualAdjamt);
			stmt.setString(117, Utility.getString(wrapper.interestEligibilityFlag));
			stmt.setBigDecimal(118, wrapper.crIntAccrForAccrPeriod);
			stmt.setBigDecimal(119, wrapper.drIntAccrForAccrPeriod);
			stmt.setString(120, wrapper.reasonForIntForfeiture);
			// stmt.setString(123, wrapper.chargeProductCode);
			stmt.setString(121, wrapper.taxNomCurrCode);
			stmt.setString(122, wrapper.taxNomAccountNo);
			stmt.setString(123, wrapper.taxCtgCode);
			stmt.setDate(124, wrapper.maturityDate);
			stmt.setDate(125, wrapper.lastTaxApplDate);
			stmt.setDate(126, wrapper.lastCondIntApplDate);
			// Added for Japan Retrofit - Suthahar Akbar on 18.5.2005
			stmt.setString(127, Utility.getString(wrapper.conSolStmtFlag));

			// end - Japan Retrofit
			// code changed by S.Ramesh for E-10-SubAccount on 25-05-2005
			stmt.setString(128, wrapper.mirrorTrnCurr);
			stmt.setString(129, wrapper.mirrorTrnAccNo);
			stmt.setString(130, wrapper.glDepartmentID);

			// end here

			// Added by Jayanthi for Compounding Interest
			stmt.setDate(131, wrapper.crNextCompDate);
			stmt.setDate(132, wrapper.drNextCompDate);
			stmt.setDate(133, wrapper.lastcrIntCompoundedDate);
			stmt.setDate(134, wrapper.lastdrIntCompoundedDate);
			stmt.setBigDecimal(135, wrapper.crIntToCompound);
			stmt.setBigDecimal(136, wrapper.drIntToCompound);
			stmt.setString(137, Utility.getString(wrapper.autoClose));
			// End Change
			// Added by Bavithra for E11 gap IAS

			// Commented by Anand.K for E12 - PROVISION
			// stmt.setString(140, Utility.getString(wrapper.impairmentflag));
			// stmt.setString(141, Utility.getString(wrapper.chargeOffFlag));

			stmt.setString(138, Utility.getString(wrapper.cacsIndicator));
			// code added by vani for e11 indo gap
			// DSRREFERRALID,DSRSOURCINGID,DSRCLOSINGID
			stmt.setString(139, wrapper.referralID);
			stmt.setString(140, wrapper.sourcingID);
			stmt.setString(141, wrapper.closingID);
			// Ends

			// Added by yusuf for E11 day2
			stmt.setString(142, wrapper.channelID);
			stmt.setString(143, wrapper.originatorMakerDetail.getUserID());
			stmt.setDate(144, wrapper.originatorMakerDetail.getUserDate());
			stmt.setString(145, wrapper.originatorMakerDetail.getUserIPAddress());
			stmt.setTime(146, wrapper.originatorMakerDetail.getUserTime());
			stmt.setString(147, wrapper.originatorMakerDetail.getUserBranch());
			stmt.setDate(148, wrapper.calenderAccountOpenDate);
			// Code Added by selvarasu for e12 on 16-Nov-07
			stmt.setString(149, Utility.getString(wrapper.accountCategory));
			// Added by murugan for INDIA E12
			stmt.setString(150, wrapper.oldProductCode);
			stmt.setString(151, wrapper.oldMasterNo);
			stmt.setDate(152, wrapper.lastPrdChangeDt);
			stmt.setDate(153, wrapper.lastMasterChangeDt);
			// End by murugan

			// Code added by sangeetha
			//order of setBigDecimal changed by Valarmathi for India_R3_ST defect id:753 as LastCrTrnAmt is updated for Dr Transactions.
			//stmt.setBigDecimal(156, wrapper.lastCrTrnAmt);
			stmt.setBigDecimal(154, wrapper.lastDrTrnAmt);
			stmt.setBigDecimal(155, wrapper.lastCrTrnAmt);
			stmt.setBigDecimal(156, wrapper.lastCrTrnExclTrnAmt);
			stmt.setBigDecimal(157, wrapper.lastDrTrnExclTrnAmt);

			// End of code added by Sangeetha

			stmt.setString(158, Utility.getString(wrapper.provisionStatusFlag));
			stmt.setString(159, Utility.getString(wrapper.cacsDownReason));
			// Code Ends Here
			stmt.setString(160, Utility.getString(wrapper.tccFlag));
			//stmt.setString(163, Utility.getString(wrapper.utilizeIntrdayLimitFlag));//Commented for  Limit ReEngineering & Group IOD Project changes
			stmt.setDate(161,wrapper.lastRiskChangeDate);
			stmt.setString(162, wrapper.IBAN);
			//Added by Devaraj for the AutoReorder Cheque
			stmt.setString(163,Utility.getString(wrapper.autoReorderChqBkFlag));
			//Changes Ends
         //	Added by Ramesh N for UK VAT Changes on 23/06/2009
			 stmt.setString(164, Utility.getString(wrapper.vccFlag));
			 stmt.setString(165, wrapper.vatCtgCode);
           //Added by balaji for E12 Migration - R1 Phase - Project id 09002841 - Field Addition in Others tab
			 stmt.setString(166,Utility.getString(wrapper.atmAllowed));
			// stmt.setString(167,Utility.getString(wrapper.ivrAllowed));
			 if (wrapper.ivrAllowed != '\u0000') {
				 stmt.setString(167,Utility.getString(wrapper.ivrAllowed));
			 } else {
				 stmt.setString(167, Utility.getString('N'));
			 }
			 
			 stmt.setString(168,Utility.getString(wrapper.ibankingAllowed));
			 stmt.setString(169, Utility.getString(wrapper.impairmentflag));
			 stmt.setString(170, Utility.getString(wrapper.chargeOffFlag));
   // Start-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
			 stmt.setString(171, Utility.getString(wrapper.suspendImpairment));
			 stmt.setString(172, Utility.getString(wrapper.suspendProvision));
			 stmt.setString(173, Utility.getString(wrapper.suspendChargeoff));
			//addde by hasi for daue
			 stmt.setString(174, wrapper.relNoForAcctType);
			 stmt.setString(175, wrapper.acctAddressTypeCode);

				stmt.setString(176, wrapper.daueLimitNo);
				stmt.setString(177, wrapper.daueLimitMasterNo);
				//end hasi
			  //End-SIMCO-12.04-R3 Release- Retail Asset Provision-10000702  
			//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu Starts here
			stmt.setString(178, wrapper.odClassIntCd);
			stmt.setString(179, wrapper.odClassIntPrdCd);
			stmt.setString(180, Utility.getString(wrapper.waiveExcessInterest));
			//stmt.setString(181, wrapper.currencyCode);
			//stmt.setString(182, wrapper.accountNo);
		 //Description  :   -> changes done as per New Field Set Up Multi Country Change
			stmt.setString(181, wrapper.deptCode);
			stmt.setString(182, wrapper.reconCode);
             //ends
			//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
			stmt.setDate(183,wrapper.crActualInterestPaymentDate);
			stmt.setDate(184,wrapper.drActualInterestPaymentDate);
			//stmt.setString(188, wrapper.currencyCode);
			//stmt.setString(189, wrapper.accountNo);
			//ends here
			//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
			stmt.setString(185, wrapper.promoCreditIntCd);
			stmt.setString(186, wrapper.promoCreditIntPrdCd);
			stmt.setString(187, wrapper.promoDebitIntCd);
			stmt.setString(188, wrapper.promoDebitIntPrdCd);
			stmt.setString(189, Utility.getString(wrapper.manualDrIntFlag));
			stmt.setString(190, Utility.getString(wrapper.manualCrIntFlag));
			 //Added by Sivaranjani (1271869)for DODream E12 - RM
			 stmt.setBigDecimal(191, wrapper.crSplSystemAdustedInterest);
			 stmt.setBigDecimal(192, wrapper.crSplAccruedInterest);
			//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
				stmt.setDate(193,wrapper.nextCRIntChngDt);
				stmt.setDate(194,wrapper.nextDBIntChngDt);
				stmt.setString(195, wrapper.promoCrIntFlag);
				stmt.setString(196, wrapper.promoDbIntFlag);
				//Ends here
				//Added SIMCO R4 -10000702_ALL_TSD_PromotionalBand_V1.0.doc
				stmt.setString(197, wrapper.crPromoCode);
				stmt.setString(198, wrapper.drPromoCode);
				if (wrapper.splCrIntPrdCd!=null && wrapper.splCrIntPrdCd.trim().length()>0){
					stmt.setString(199, wrapper.splCrIntPrdCd);	
				}else{
					stmt.setString(199, null);
				}
				if (wrapper.splDrIntPrdCd!=null && wrapper.splDrIntPrdCd.trim().length()>0){
					stmt.setString(200, wrapper.splDrIntPrdCd);	
				}else{
					stmt.setString(200, null);
				}
				//Ends Here
				//Added for SGExcessInterest Logic
				stmt.setString(201, Utility.getString(wrapper.splIntIndFlag));
				//End Added for SGExcessInterest Logic
				//Account Reactivation 
				stmt.setDate(202, wrapper.accountReOpenDate);
				stmt.setString(203, wrapper.accountReOpenReason);
				//CL-H 6 changes starts
				stmt.setString(204, wrapper.accountTitle2);
				//CL-H 6 changes starts
				//Added for TH with Reference 13001410_ALL_TSD_TH_WHT_V1.0.docx
				stmt.setString(205, Utility.getString(wrapper.valThresholdFlag));
				//End
				logWriter.println("wrapper.currencyCode::/wrapper.accountno"+wrapper.currencyCode+"/"+wrapper.accountNo+"/"+wrapper.makerDetail.getUserBranch()+"/"+wrapper.accountClosureReason);
				stmt.setString(206, Utility.getString(wrapper.ignoreChargeAdvice));//Added By HAsi
				//Added new column-FATCACRSEXCLREASON by 1554622 for Account level restriction project - jira # CBRCPBO-10899
				stmt.setString(207, wrapper.fatcaCrsExclReason);
				
				// VH Negative interest Changes
				stmt.setBigDecimal(208, wrapper.posCrIntAccuredAmt);
				stmt.setBigDecimal(209, wrapper.negCrIntAccuredAmt);
				stmt.setBigDecimal(210, wrapper.posCrIntAdjustedAmt);
				stmt.setBigDecimal(211, wrapper.negCrIntAdjustedAmt);
				// VH Negative interest Changes
				stmt.setBigDecimal(212, wrapper.posCrManualAdjustment);
				stmt.setBigDecimal(213, wrapper.negCrManualAdjustment);
				
				//addded for in gst
				stmt.setString(214, wrapper.gstRegistrationNo);	
				//ends
			//added by 1563531(Sivanageswarareddy) as part of Day 2
			stmt.setString(215, Utility.getString(wrapper.gstRegistrationFlag));
			// end for IN GST
			stmt.setString(216, Utility.getString(wrapper.gstCustomerSpecialStatus));
			stmt.setString(217, Utility.getString(wrapper.gstCustomerType));
			//added by 1624396,added for EBBSHRM-78916
			stmt.setString(218,Utility.getString(wrapper.intAccProIndicator));
			stmt.setDate(219, wrapper.acInactiveDate);
			stmt.setString(220, Utility.getString(wrapper.signaturelevel)); //KEYSTONEHK-29109
			stmt.setDate(221, wrapper.lastSigUpdateDT);
			//Added for Fair lending back value transaction user story
			if (isExcessChargesApplicable) {
			stmt.setBigDecimal(222, wrapper.exChrgAccruedAmount);
			//changes ends here
			stmt.setString(223, wrapper.currencyCode);
			stmt.setString(224, wrapper.accountNo);
			}else {
				stmt.setString(222, wrapper.currencyCode);
				stmt.setString(223, wrapper.accountNo);
			}

				//End here by 1554622 for Account level restriction project - jira # CBRCPBO-10899
				
				
			//ends here
			

			if (stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}
			if(enableLeanAccount()) {
				TxnAccountWrapper oldWrap = null;
				try {
					createTxnAccountHelper();
					oldWrap = this.txnAccountHelper.LoadTxnAccountsWrapper(wrapper.currencyCode, wrapper.accountNo);
					if (oldWrap != null) {
						if (this.txnAccountHelper.isDataChangedInTxnAccounts(wrapper, oldWrap)) {
							this.txnAccountHelper.updateTxnAccount(wrapper, oldWrap);
						}
					} else {
						this.txnAccountHelper.createTxnAccount(wrapper);
				}
			} catch (FinderException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			}
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public void updateMasterForInterestCapitalisation(SubsidiaryAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTCAP, false, false);

			stmt.setString(1, wrapper.segmentCode);
			stmt.setDate(2, wrapper.crNextInterestPaymentDate);
			stmt.setBigDecimal(3, wrapper.creditInterestAccrued);
			stmt.setBigDecimal(4, wrapper.creditInterestAdjustment);
			stmt.setBigDecimal(5, wrapper.creditManualAdjustment);
			stmt.setDate(6, wrapper.crLastInterestPaymentDate);
			stmt.setBigDecimal(7, wrapper.pcrintAccruedamt);
			stmt.setBigDecimal(8, wrapper.pcrintAdjamt);
			stmt.setBigDecimal(9, wrapper.pcrmanualAdjamt);
			stmt.setDate(10, wrapper.drNextInterestPaymentDate);
			stmt.setBigDecimal(11, wrapper.debitInterestAccrued);
			stmt.setBigDecimal(12, wrapper.debitInterestAdjustment);
			stmt.setBigDecimal(13, wrapper.debitManualAdjustment);
			stmt.setDate(14, wrapper.drLastInterestPaymentDate);
			stmt.setBigDecimal(15, wrapper.crIntToCompound);
			stmt.setBigDecimal(16, wrapper.drIntToCompound);
			//added by hasi for DAUE
			stmt.setString(17, wrapper.daueLimitNo);
			stmt.setString(18, wrapper.daueLimitMasterNo);
			//end hasi
			//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu Starts here
//			stmt.setString(19, wrapper.currencyCode);
//			stmt.setString(20, wrapper.accountNo);
			stmt.setString(19, wrapper.odClassIntCd);
			stmt.setString(20, wrapper.odClassIntPrdCd);
			stmt.setString(21, Utility.getString(wrapper.waiveExcessInterest));
			//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
			stmt.setDate(22, wrapper.crActualInterestPaymentDate);
			stmt.setDate(23, wrapper.drActualInterestPaymentDate);
			//stmt.setString(24, wrapper.currencyCode);
			//stmt.setString(25, wrapper.accountNo);
			//ends here
			//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
			/*stmt.setString(24, wrapper.promoCreditIntCd);
			stmt.setString(25, wrapper.promoCreditIntPrdCd);
			stmt.setString(26, wrapper.promoDebitIntCd);
			stmt.setString(27, wrapper.promoDebitIntPrdCd);
			stmt.setString(28, Utility.getString(wrapper.manualDrIntFlag));
			stmt.setString(29, Utility.getString(wrapper.manualCrIntFlag));
			//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
			stmt.setDate(30, wrapper.nextCRIntChngDt);
			stmt.setDate(31, wrapper.nextDBIntChngDt);
			stmt.setString(32, wrapper.promoCrIntFlag);
			stmt.setString(33, wrapper.promoDbIntFlag);*/
			
			stmt.setBigDecimal(24, wrapper.posCrIntAccuredAmt);
			stmt.setBigDecimal(25, wrapper.negCrIntAccuredAmt);
			stmt.setBigDecimal(26, wrapper.posCrIntAdjustedAmt);
			stmt.setBigDecimal(27, wrapper.negCrIntAdjustedAmt);
			// VH Negative interest Changes
			stmt.setBigDecimal(28, wrapper.posCrManualAdjustment);
			stmt.setBigDecimal(29, wrapper.negCrManualAdjustment);
			
			//Ends Here
		//	stmt.setDate(30, eoddate);
			stmt.setString(30, wrapper.currencyCode);
			stmt.setString(31, wrapper.accountNo);
			//ends here

			if (stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}
			if(enableLeanAccount()) {
				createTxnAccountHelper();
				this.txnAccountHelper.updateMasterTxnAccountsForInterestCapitalisation(wrapper);
			}
			//System.out.println("==================================UPDATE INTEREST CAPITALIZATION IS COMPLETED=================");
			scb.util.LogWriter.getInstance().printDebugMode("UPDATE INTEREST CAPITALIZATION IS COMPLETED");
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}
	//PT Changes Begins
	public void updateBatchforInterestAccrual(Vector argVector) throws CreateException{

		SubsidiaryAccountWrapper wrapper = null;;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter out = new LogWriter("EOD","updateBatchforInterestAccrual","updateBatchforInterestAccrual");		
		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			boolean isExcessChargesApplicable = isExcessChargesApplicable();
			if(isExcessChargesApplicable) {
			stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTACCURAL_EXCESS, false, false);	
			}else {
				stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTACCURAL, false, false);		
			}
			if (argVector!=null && argVector.size()!=0){
				for(int i=0;i<argVector.size();i++){
					wrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);					
					stmt.setBigDecimal(1, wrapper.creditInterestAccrued);
					stmt.setBigDecimal(2, wrapper.debitInterestAccrued);
					stmt.setBigDecimal(3, wrapper.lastCrintRate);
					stmt.setBigDecimal(4, wrapper.lastDrintRate);
					stmt.setBigDecimal(5, wrapper.lastExsintRate);
					stmt.setDate(6, wrapper.crLastAccrualDate);
					stmt.setDate(7, wrapper.drLastAccrualDate);
					stmt.setDate(8, wrapper.lastcrIntCompoundedDate);
					stmt.setDate(9, wrapper.lastdrIntCompoundedDate);
					stmt.setDate(10, wrapper.crNextCompDate);
					stmt.setDate(11, wrapper.drNextCompDate);
					stmt.setBigDecimal(12, wrapper.crIntToCompound);
					stmt.setBigDecimal(13, wrapper.drIntToCompound);
					stmt.setString(14, wrapper.daueLimitNo);
					stmt.setString(15, wrapper.daueLimitMasterNo);
					//end by hasi
					//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu Starts here
//					stmt.setString(16, wrapper.currencyCode);
//					stmt.setString(17, wrapper.accountNo);
					stmt.setString(16, wrapper.odClassIntCd);
					stmt.setString(17, wrapper.odClassIntPrdCd);
					stmt.setString(18, Utility.getString(wrapper.waiveExcessInterest));
					//stmt.setString(19, wrapper.currencyCode);
					//stmt.setString(20, wrapper.accountNo);
					//ends here
					//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
			/*		
			 ,PROCRINTCD=?,PROCRINTPRDCD=?,PRODBINTCD=?,PRODBINTPRDCD=?,MANUALDBFLAG=?,MANUALCRFLAG=?,CRSPLINTACCRUEDAMT=?,CRSPLINTADJAMT=?,NEXTCRINTCHGDT=?,NEXTDBINTCHGDT=?,MANPROCRFLAG=?,MANPRODBFLAG=?
			  stmt.setString(19, wrapper.promoCreditIntCd);
					stmt.setString(20, wrapper.promoCreditIntPrdCd);
					stmt.setString(21, wrapper.promoDebitIntCd);
					stmt.setString(22, wrapper.promoDebitIntPrdCd);
					stmt.setString(23, Utility.getString(wrapper.manualDrIntFlag));
					stmt.setString(24, Utility.getString(wrapper.manualCrIntFlag));
					stmt.setBigDecimal(25, wrapper.crSplAccruedInterest);
					stmt.setBigDecimal(26, wrapper.crSplSystemAdustedInterest);
					//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
					stmt.setDate(27, wrapper.nextCRIntChngDt);
					stmt.setDate(28, wrapper.nextDBIntChngDt);
					stmt.setString(29, wrapper.promoCrIntFlag);
					stmt.setString(30, wrapper.promoDbIntFlag);*/
					//Ends Here
					
					stmt.setBigDecimal(19, wrapper.crSplAccruedInterest);
					stmt.setBigDecimal(20, wrapper.crSplSystemAdustedInterest);
					stmt.setDate(21,wrapper.crNextInterestPaymentDate);
					stmt.setDate(22, wrapper.drNextInterestPaymentDate);
					
					stmt.setBigDecimal(23, wrapper.posCrIntAccuredAmt);
					stmt.setBigDecimal(24, wrapper.negCrIntAccuredAmt);
					stmt.setBigDecimal(25, wrapper.posCrIntAdjustedAmt);
					stmt.setBigDecimal(26, wrapper.negCrIntAdjustedAmt);
					stmt.setBigDecimal(27, wrapper.posCrManualAdjustment);
					stmt.setBigDecimal(28, wrapper.negCrManualAdjustment);
					//stmt.setDate(29, eoddate);
					if(isExcessChargesApplicable) {
					stmt.setDate(29, wrapper.getExLastAccrualDate());
					stmt.setBigDecimal(30, wrapper.getExChrgAccruedAmount());
					stmt.setBigDecimal(31, wrapper.getLastExChargeRate());
					stmt.setString(32, wrapper.currencyCode);
					stmt.setString(33, wrapper.accountNo);
					}else {
						stmt.setString(29, wrapper.currencyCode);
						stmt.setString(30, wrapper.accountNo);
						
					}
					//ends here
					stmt.addBatch();
				}
				 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
				 int result[] = stmt.executeBatch();
				/*if (result.length <= 0)
					throw new CreateException();*/
				 if(enableLeanAccount()) {
					 createTxnAccountHelper();
					 this.txnAccountHelper.updateBatchOfTxnAccountsforInterestAccrual(argVector);
				 }
			}

		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper.currencyCode +":"+wrapper.accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}

         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	public void updateBatchforInterestApplication(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

		SubsidiaryAccountWrapper[] wrapper =(SubsidiaryAccountWrapper[])argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		//scb.util.LogWriter out = new LogWriter("EOD","updateBatchforInterestAccrual");
		//System.out.println("===========Batch updateAccountForInterestApplication===");
		scb.util.LogWriter.getInstance().printDebugMode("===========Batch updateAccountForInterestApplication===");
		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTCAP, false, false);
			if (wrapper.length!=0){
				for(int i=0;i<wrapper.length;i++){

					stmt.setString(1, wrapper[i].segmentCode);
					stmt.setDate(2, wrapper[i].crNextInterestPaymentDate);
					stmt.setBigDecimal(3, wrapper[i].creditInterestAccrued);
					stmt.setBigDecimal(4, wrapper[i].creditInterestAdjustment);
					stmt.setBigDecimal(5, wrapper[i].creditManualAdjustment);
					stmt.setDate(6, wrapper[i].crLastInterestPaymentDate);
					stmt.setBigDecimal(7, wrapper[i].pcrintAccruedamt);
					stmt.setBigDecimal(8, wrapper[i].pcrintAdjamt);
					stmt.setBigDecimal(9, wrapper[i].pcrmanualAdjamt);
					stmt.setDate(10, wrapper[i].drNextInterestPaymentDate);
					stmt.setBigDecimal(11, wrapper[i].debitInterestAccrued);
					stmt.setBigDecimal(12, wrapper[i].debitInterestAdjustment);
					stmt.setBigDecimal(13, wrapper[i].debitManualAdjustment);
					stmt.setDate(14, wrapper[i].drLastInterestPaymentDate);
					stmt.setBigDecimal(15, wrapper[i].crIntToCompound);
					stmt.setBigDecimal(16, wrapper[i].drIntToCompound);
					stmt.setString(17, wrapper[i].daueLimitNo);
					stmt.setString(18, wrapper[i].daueLimitMasterNo);
					//end hasi
					//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu Starts here
//					stmt.setString(19, wrapper[i].currencyCode);
//					stmt.setString(20, wrapper[i].accountNo);
					stmt.setString(19, wrapper[i].odClassIntCd);
					stmt.setString(20, wrapper[i].odClassIntPrdCd);
					stmt.setString(21, Utility.getString(wrapper[i].waiveExcessInterest));
					//Changes done for SIMCO R4 - 10000702_ALL_TSD_2752_V1 0.docx
					stmt.setDate(22, wrapper[i].crActualInterestPaymentDate);
					stmt.setDate(23, wrapper[i].drActualInterestPaymentDate);
				//,PROCRINTCD=?,PROCRINTPRDCD =?,PRODBINTCD=?,PRODBINTPRDCD=?,MANUALDBFLAG=?,MANUALCRFLAG=?,NEXTCRINTCHGDT=?,NEXTDBINTCHGDT=?,MANPROCRFLAG=?,MANPRODBFLAG=?	
					//stmt.setString(24, wrapper[i].currencyCode);
					//stmt.setString(25, wrapper[i].accountNo);
					//ends here
					/*//Added for SIMCO R4 - 10000702_ALL_TSD_Promotional_Interest_V1.0.doc
					stmt.setString(24, wrapper[i].promoCreditIntCd);
					stmt.setString(25, wrapper[i].promoCreditIntPrdCd);
					stmt.setString(26, wrapper[i].promoDebitIntCd);
					stmt.setString(27, wrapper[i].promoDebitIntPrdCd);
					stmt.setString(28, Utility.getString(wrapper[i].manualDrIntFlag));
					stmt.setString(29, Utility.getString(wrapper[i].manualCrIntFlag));
					//Added SIMCO R4 -10000702_ALL_TSD_Promotional_IntCode_V1.0.doc
					stmt.setDate(30, wrapper[i].nextCRIntChngDt);
					stmt.setDate(31, wrapper[i].nextDBIntChngDt);
					stmt.setString(32, wrapper[i].promoCrIntFlag);
					stmt.setString(33, wrapper[i].promoDbIntFlag);*/
					stmt.setBigDecimal(24, wrapper[i].posCrIntAccuredAmt);
					stmt.setBigDecimal(25, wrapper[i].negCrIntAccuredAmt);
					stmt.setBigDecimal(26, wrapper[i].posCrIntAdjustedAmt);
					stmt.setBigDecimal(27, wrapper[i].negCrIntAdjustedAmt);
					// VH Negative interest Changes
					stmt.setBigDecimal(28, wrapper[i].posCrManualAdjustment);
					stmt.setBigDecimal(29, wrapper[i].negCrManualAdjustment);
					//stmt.setDate(30, eoddate);
					//Ends Here
					stmt.setString(30, wrapper[i].currencyCode);
					stmt.setString(31, wrapper[i].accountNo);
					//ends here
					

					stmt.addBatch();
				}
				 //System.out.println(" Entity : before executing batch");
				 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
				 int result[] = stmt.executeBatch();
                 //System.out.println("no of records updated in account for Cap : " + result.length);
				 scb.util.LogWriter.getInstance().println("no of records updated in account for Cap : " + result.length);

				/*if (result.length <= 0)
					throw new CreateException();
					*/
				 if(enableLeanAccount()) {
					 createTxnAccountHelper();
					 this.txnAccountHelper.updateBatchTxnAccountsforInterestApplication(argWrapper);
				 }
			}

		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].currencyCode +":"+wrapper[i].accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}

         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	//PT CHanges Ends
	/** Code added and changed by Ramesh N for Entity Bean framework */
	public void updateMasterForInterestAccural(SubsidiaryAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		//System.out.println("===========updateMasterForInterestAccural===" + wrapper.crLastAccrualDate + "##" + wrapper.drLastAccrualDate);
		scb.util.LogWriter.getInstance().println("===========updateMasterForInterestAccural===" + wrapper.crLastAccrualDate + "##" + wrapper.drLastAccrualDate);

		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			boolean isExcessChargesApplicable = isExcessChargesApplicable();
			if(isExcessChargesApplicable) {
			stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTACCURAL_EXCESS, false, false);	
			}else {
				stmt = con.getStatementObject(STORE_ACCOUNT_INTERESTACCURAL, false, false);		
			}

			stmt.setBigDecimal(1, wrapper.creditInterestAccrued);
			stmt.setBigDecimal(2, wrapper.debitInterestAccrued);
			stmt.setBigDecimal(3, wrapper.lastCrintRate);
			stmt.setBigDecimal(4, wrapper.lastDrintRate);
			stmt.setBigDecimal(5, wrapper.lastExsintRate);
			stmt.setDate(6, wrapper.crLastAccrualDate);
			stmt.setDate(7, wrapper.drLastAccrualDate);
			stmt.setDate(8, wrapper.lastcrIntCompoundedDate);
			stmt.setDate(9, wrapper.lastdrIntCompoundedDate);
			stmt.setDate(10, wrapper.crNextCompDate);
			stmt.setDate(11, wrapper.drNextCompDate);
			stmt.setBigDecimal(12, wrapper.crIntToCompound);
			stmt.setBigDecimal(13, wrapper.drIntToCompound);
			//added by hasi for DAUE
			stmt.setString(14, wrapper.daueLimitNo);
			stmt.setString(15, wrapper.daueLimitMasterNo);
			//end by hasi
			//R4 SIMCO dev - SIMCO_OD_Class_InterestRate (Retail_Asset_CVDNO: 277,217) - Added by Saridha Pandu Starts here
//			stmt.setString(16, wrapper.currencyCode);
//			stmt.setString(17, wrapper.accountNo);
			stmt.setString(16, wrapper.odClassIntCd);
			stmt.setString(17, wrapper.odClassIntPrdCd);
			stmt.setString(18, Utility.getString(wrapper.waiveExcessInterest));
			//1474397 for 1310 Defect
			stmt.setBigDecimal(19, wrapper.crSplAccruedInterest);
			stmt.setBigDecimal(20, wrapper.crSplSystemAdustedInterest);
			stmt.setDate(21,wrapper.crNextInterestPaymentDate);
			stmt.setDate(22, wrapper.drNextInterestPaymentDate);
			
			stmt.setBigDecimal(23, wrapper.posCrIntAccuredAmt);
			stmt.setBigDecimal(24, wrapper.negCrIntAccuredAmt);
			stmt.setBigDecimal(25, wrapper.posCrIntAdjustedAmt);
			stmt.setBigDecimal(26, wrapper.negCrIntAdjustedAmt);
			// VH Negative interest Changes
			stmt.setBigDecimal(27, wrapper.posCrManualAdjustment);
			stmt.setBigDecimal(28, wrapper.negCrManualAdjustment);
			if(isExcessChargesApplicable) {
			stmt.setDate(29, wrapper.getExLastAccrualDate());
			stmt.setBigDecimal(30, wrapper.getExChrgAccruedAmount());
			stmt.setBigDecimal(31, wrapper.getLastExChargeRate());
			stmt.setString(32, wrapper.currencyCode);
			stmt.setString(33, wrapper.accountNo);
			}else {
				stmt.setString(29, wrapper.currencyCode);
				stmt.setString(30, wrapper.accountNo);
			}
			//ends here
			if (stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}
			if(enableLeanAccount()) {
				updateMasterTxnAccountsForInterestAccural(wrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper updateObject(scb.wrapper.AbstractWrapper argWrapper, scb.wrapper.PrimaryKey argKey) throws CreateException {
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SubsidiaryAccountWrapper resultWrapper = null;
		if (key.moduleName == key.INTEREST_ACCRUAL) {
			resultWrapper = (SubsidiaryAccountWrapper) updateObjectForInterestAccural(argWrapper);
		} else if (key.moduleName == key.INTEREST_APPLICATION) {
			resultWrapper = (SubsidiaryAccountWrapper) updateObjectForCapitalisation(argWrapper);
		} else {
			resultWrapper = (SubsidiaryAccountWrapper) updateObject(argWrapper);
		}
		storeObject(resultWrapper, key);
		return resultWrapper;
	}

	/**
	 * updateObject method comment.
	 */
	public scb.wrapper.AbstractWrapper updateObject(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {
		scb.util.LogWriter out = new LogWriter("EOD","updateObject","updateObject");
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);
		SubsidiaryAccountWrapper resultWrapper = wrapper;

		updateMaster(wrapper);

		if (wrapper.accountNomineeWrapper != null) {
			resultWrapper.accountNomineeWrapper = modifyAccountNominee(key, wrapper.accountNomineeWrapper);
		}

		if (wrapper.accountChargeWrapper != null) {
			resultWrapper.accountChargeWrapper = modifyAccountCharge(key, wrapper.accountChargeWrapper);
		}

		if (wrapper.accountLinksWrapper != null) {
			resultWrapper.accountLinksWrapper = modifyAccountLinks(key, wrapper.accountLinksWrapper);
			// resultWrapper.accountLinksWrapper = modifyAccountLinks(wrapper,
			// wrapper.accountLinksWrapper);

		}

		if (wrapper.linkAccountInformationWrapper != null) {
			resultWrapper.linkAccountInformationWrapper = modifyLinkAccountInformations(key, wrapper);
		}

		if (wrapper.accountInfoTypeWrapper != null) {
			resultWrapper.accountInfoTypeWrapper = modifyInfoType(key, wrapper.accountInfoTypeWrapper);
			// resultWrapper.accountLinksWrapper = modifyAccountLinks(wrapper,
			// wrapper.accountLinksWrapper);

		}

		// changes done by Ramkumar for eBBS_2005 - 14143 on 19-03-2005.
		// Retrofitted from PH
		// included by sumithra on 10.02.2004 for PH047 NominatedChargeAccount
		if (wrapper.nominatedChargeAccountWrapper != null) {
			resultWrapper.nominatedChargeAccountWrapper = modifyNominatedChargeAccount(key, wrapper.nominatedChargeAccountWrapper);
		}

		// included by Sumithra on 11.02.2004 for Tax - PH030
		if (wrapper.taxWaiverWrapper != null) {
			resultWrapper.taxWaiverWrapper = modifyAcTaxWaiver(key, wrapper.taxWaiverWrapper);
		}
		// changes end here

		if (wrapper.languageComponentHash != null) {
			resultWrapper = modifyMultilingual(key, wrapper.languageComponentHash,wrapper);
		}
		// Code added by Manikandan for E12 Customer Linkage on 02-10-2007
		if (wrapper.customerLinkWrapper != null && wrapper.customerLinkWrapper.length > 0) {
			resultWrapper.customerLinkWrapper = modifyCustomerAccLink(key, resultWrapper);
		}
		//Start -SIMCO R3<<Locker Charges>>
		if (wrapper.accountOfflineChargeWrapper != null && wrapper.accountOfflineChargeWrapper.length > 0) {
			resultWrapper.accountOfflineChargeWrapper = modifyAccountOfflineCharge(key, wrapper.accountOfflineChargeWrapper);
		}
		//End -SIMCO R3<<Locker Charges>>		
		// resultWrapper.customerLinkWrapper =
		// modifyCustomerAccLink(key,wrapper.customerLinkWrapper);
//		Added by Suresh for R3 UK Capability UKCOR19		           
				  if(wrapper.crossDataValidationWrapper != null){
				  	try{
                        out.println("---CDV--SubsidiaryAccountHelper-UpdateObject--Accno/curr:"+key.accountNo+"/"+key.currencyCode);	  	
					  removeGLDataDetails(key);
					  createGLDataDetail(key,wrapper.crossDataValidationWrapper);
				  }
				  catch (RemoveException e) {
							   scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16 reengineering
					  }
				  }
				  /*Added By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
				  if(wrapper.subsidiaryAccountSCIFATCAWrapper!=null){
						resultWrapper.subsidiaryAccountSCIFATCAWrapper=modifyAccSciFatca(key, wrapper.subsidiaryAccountSCIFATCAWrapper);		
					}

				  
					// Added By Sankar For EOD OPT Changes
					try{
						AccountValidationUtility accountValidationUtility = new AccountValidationUtility();
						accountValidationUtility.fillEODTxnWrapper( wrapper.accountNo, wrapper.currencyCode);
					}catch (Exception e) {
						e.printStackTrace();
					}
					
					 //added by 1572177 for EDF
					  if (enableSAccount()){
						  SubsidiaryAccountWrapper oldWrap = null;
						  try {
						  oldWrap = loadDataForSAccounts(wrapper.currencyCode,wrapper.accountNo);
						  if(oldWrap!=null) {
							boolean isModified= false;
							scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## oldWrap ");
							isModified=isFieldModified(wrapper, oldWrap);
							if(isModified){
								scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## isModified ");
								updateIntoSAccount(wrapper);
								scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## post updateIntoSAccount ");
							}
						  }
						  else {
							  insertIntoSAccount(key,wrapper);
						  }
						}
						catch (Exception e) {
							scb.util.LogWriter.getInstance().printErrorMessage(e);
						}
					}

					//Added changes for RPRCode - 8266187
					  if(wrapper.accountMiscWrapper != null) {
						  try {
							  resultWrapper.accountMiscWrapper = modifyAccountMisc(key, wrapper);
						  }
						  catch (CreateException e) {
							  resultWrapper.accountMiscWrapper = createAccountMisc(key, resultWrapper);
						  }
					  }

		return resultWrapper;

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper updateObjectForInterestAccural(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {

		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		// SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);

		SubsidiaryAccountWrapper resultWrapper = wrapper;

		updateMasterForInterestAccural(wrapper);
		return resultWrapper;

	}

	/** Code added and changed by Ramesh N for Entity Bean framework */
	public scb.wrapper.AbstractWrapper updateObjectForCapitalisation(scb.wrapper.AbstractWrapper argWrapper) throws CreateException {

		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		// SubsidiaryAccountEntityKey key = new SubsidiaryAccountEntityKey(wrapper.currencyCode, wrapper.accountNo);

		SubsidiaryAccountWrapper resultWrapper = wrapper;

		updateMasterForInterestCapitalisation(wrapper);
		return resultWrapper;

	}

	// changes done by Ramkumar for eBBS_2005 - 14143 on 25-01-2005. Retrofitted
	// from PH... new methods added
	// included by Sumithra on 11.02.2004 for Tax - PH030
	public void createAcTaxWaiver(SubsidiaryAccountEntityKey key, SubsidiaryAccountTaxWaiverWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null;// declared outside try block
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACTAXWV, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus != EBBSConstants.DELETED) {
					stmt.setString(1, key.currencyCode);
					stmt.setString(2, key.accountNo);
					stmt.setString(3, wrapper[i].taxCode);
					stmt.setDate(4,wrapper[i].waiverExpiryDate); //Changes done by Antara for Tax Waiver - eGold VH
					int rowsAffected = stmt.executeUpdate();
					if (rowsAffected <= 0) {
						throw new CreateException();
					}
					stmt.clearParameters();
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmt != null) {
					stmt.close();
				}
				// end

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// included by sumithra on 10.02.2004 for PH047 - NominatedChargeAccount

	public void createNominatedChargeAccount(SubsidiaryAccountEntityKey key, NominatedChargeAccountWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_CHRGNOM, false, false);
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus != EBBSConstants.DELETED) {
					stmt.setString(1, key.currencyCode);
					stmt.setString(2, key.accountNo);
					stmt.setString(3, wrapper[i].chargeCode);
					stmt.setString(4, wrapper[i].nominatedChargeCurrencyCode);
					stmt.setString(5, wrapper[i].nominatedChargeAccountNo);
					//Start -SIMCO R3<<Locker Charges>>
					stmt.setString(6, Utility.getString(wrapper[i].chargeGroupFlag));	
					//End -SIMCO R3<<Locker Charges>>
					int rowsAffected = stmt.executeUpdate();
					if (rowsAffected <= 0) {
						throw new CreateException();
					}
				}
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} catch (Exception xe) {
			scb.util.LogWriter.getInstance().printErrorMessage(xe);// //- F16
			// reengineering
		}

		finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}
	}

	public SubsidiaryAccountTaxWaiverWrapper[] fetchAcTaxWaiver(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountTaxWaiverWrapper[] resultWrapper = null;

		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		SQLResultObject rs = null; // end
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			// changes done by venkat for india eBBS on 14/08/2007 for the
			// compilation issues
			// PreparedStatement stmt = null; //it is commented as it is
			// declared globaly
			// end changes
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACTAXWV, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACTAXWV, false, false);
			}
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();
			Vector result = new Vector();
			while (rs.next()) {
				SubsidiaryAccountTaxWaiverWrapper wrapper = new SubsidiaryAccountTaxWaiverWrapper();
				wrapper.taxCode = rs.getString(1);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				wrapper.waiverExpiryDate = rs.getDate(2); //Changes done by Antara for Tax Waiver - eGold VH
				result.addElement(wrapper);
			}
			if (result.size() > 0) {
				resultWrapper = new SubsidiaryAccountTaxWaiverWrapper[result.size()];
				result.copyInto(resultWrapper);
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement and resultset
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		return resultWrapper;
	}

	// included by sumithra on 10.02.2004 for PH047 - NominatedChargeAccount
	public NominatedChargeAccountWrapper[] fetchNominatedChargeAccount(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		NominatedChargeAccountWrapper[] resultWrapper = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		SQLResultObject rs = null; // end
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			// changes done by venkat for india eBBS on 14/08/2007 for the
			// compilation issues
			// PreparedStatement stmt = null; //it is commented as it declared
			// globaly
			// end changes
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_CHRGNOM, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_CHRGNOM, false, false);
			}
			stmt.setString(1, key.accountNo);
			stmt.setString(2, key.currencyCode);
			// stmt.setString(3,"9999");
			Vector result = new Vector();
			rs = stmt.executeQuery();

			while (rs.next()) {
				NominatedChargeAccountWrapper wrapper = new NominatedChargeAccountWrapper();
				wrapper.chargeCode = rs.getString(1);
				wrapper.nominatedChargeAccountNo = rs.getString(2);
				wrapper.nominatedChargeCurrencyCode = rs.getString(3);
				//Start -SIMCO R3<<Locker Charges>>
				wrapper.chargeGroupFlag = Utility.getChar(rs.getString(4));					
				//End -SIMCO R3<<Locker Charges>>
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}
			if (result.size() > 0) {
				resultWrapper = new NominatedChargeAccountWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement and resultset
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultWrapper;

	}

	public Enumeration findByChargeCode(String currencyCode, String accountNo, String chargeCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		TSubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		String FIND_BY_CHARGECODE = "EBACC00172SY";
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		SQLResultObject rs = null; // end
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_BY_CHARGECODE, false, false);

			stmt.setString(1, currencyCode);
			stmt.setString(2, accountNo);
			stmt.setString(3, chargeCode);
			rs = stmt.executeQuery();

			while (rs.next()) {
				String curr = null;
				String acc = null;
				curr = rs.getString(1);
				acc = rs.getString(2);

				resultVector.addElement(curr);
				resultVector.addElement(acc);
				// System.out.println("Inside susbsssssss.............
				// ::"+resultVector.get(2));
				// resultVector.addElement(new SubsidiaryAccountEntityKey());
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement and resultset
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		return resultVector.elements();
	}

	// code added by S.Ramesh for E10-MLTS on 4-06-2005
	public SubsidiaryAccountWrapper modifyMultilingual(SubsidiaryAccountEntityKey key, Vector languageComponentVector, SubsidiaryAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		Vector rows = new Vector();
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmtInsert = null;// declared outsidee try block
		SQLStatementObject stmtDelete = null;//
		SQLStatementObject stmtModify = null;// end
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (languageComponentVector != null) {
				//String DELETE_MACCOUNT = "EBACC00173SY";
				String DELETE_MACCOUNT = "DELETE FROM MACCOUNT WHERE CURRENCYCODE = ? AND ACCOUNTNO = ? AND LANGUAGECODE = ?";
				//String UPDATE_MACCOUNT = "EBACC00174SY";
				String UPDATE_MACCOUNT = "UPDATE MACCOUNT SET  ACCTITLE =?,ACCTITLE2=?,SHORTNAME=?  WHERE CURRENCYCODE = ? AND ACCOUNTNO = ? AND LANGUAGECODE = ?";
				stmtInsert = con.getStatementObject(INSERT_MACCOUNT, false, false);
				stmtDelete = con.getStatementObject(DELETE_MACCOUNT, false, false);
				stmtModify = con.getStatementObject(UPDATE_MACCOUNT, false, false);
				// To delete any existing Rows
				HashMap valueHash = null;
				for (int i = 0; i < languageComponentVector.size(); i++) {
					valueHash = (HashMap) languageComponentVector.get(i);
					if (valueHash == null) {
						continue;
					}
					String languageCode = (String) valueHash.get("LANGUAGECODE");
					if (languageCode != EBBSConstants.ENGLISH_LANGUAGE) {

						if (((Integer) valueHash.get("RECORDSTATUS")).intValue() == EBBSConstants.NEW) {

							stmtInsert.setString(1, key.currencyCode);
							stmtInsert.setString(2, key.accountNo);
							stmtInsert.setString(3, (String) valueHash.get("ACCOUNTTITLE"));
							stmtInsert.setString(4, languageCode);
							stmtInsert.setString(5, (String) valueHash.get("ACCOUNTTITLE2"));
							stmtInsert.setString(6, (String) valueHash.get("SHORTNAME"));
							int result = stmtInsert.executeUpdate();
							if (result != 1) {
								throw new CreateException();
							}
							rows.add(i, valueHash);
						} else if (((Integer) valueHash.get("RECORDSTATUS")).intValue() == EBBSConstants.DELETED) {

							stmtDelete.setString(1, key.currencyCode);
							stmtDelete.setString(2, key.accountNo);
							stmtDelete.setString(3, languageCode);
							int result = stmtDelete.executeUpdate();
							if (result == 0) {
								throw new CreateException();
							}
						} else if (((Integer) valueHash.get("RECORDSTATUS")).intValue() == EBBSConstants.MODIFIED) {
							stmtModify.setString(1, (String) valueHash.get("ACCOUNTTITLE"));
							stmtModify.setString(2, (String) valueHash.get("ACCOUNTTITLE2"));
							stmtModify.setString(3, (String) valueHash.get("SHORTNAME"));
							stmtModify.setString(4, key.currencyCode);
							stmtModify.setString(5, key.accountNo);
							stmtModify.setString(6, languageCode);
							int result = stmtModify.executeUpdate();
							if (result == 0) {
								throw new CreateException();
							}
							rows.add(i, valueHash);
						} else {
							rows.add(i, valueHash);
						}
					}
					//valueHash.put("ACCINFO001", modifyMultilingualInfoType(key, languageCode, (AbstractWrapper[]) valueHash.get("ACCINFO001")));
					if(wrapper.maccountInfoTypeWrapper!=null){
					wrapper.maccountInfoTypeWrapper = modifyMultilingualInfoType(key, languageCode, wrapper.maccountInfoTypeWrapper);}
				}
			/*	stmtInsert.close();
				stmtDelete.close();
				stmtModify.close();*/
				if (rows.size() == 0) {
					wrapper.languageComponentHash = null;
					return wrapper;
				}
			}
		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtModify != null) {
					stmtModify.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);// //-
				// F16
				// reengineering
				throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
		return wrapper;

	}

	public SubsidiaryAccountTaxWaiverWrapper[] modifyAcTaxWaiver(SubsidiaryAccountEntityKey key, SubsidiaryAccountTaxWaiverWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmtInsert = null; // declared outside try block
		SQLStatementObject stmtDelete = null;// end
		SQLStatementObject stmtUpdate = null;
		SubsidiaryAccountTaxWaiverWrapper[] newWrapper = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACTAXWV, false, false);
			// PreparedStatement stmtUpdate =
			// con.prepareStatement(UPDATE_ACTAXWV);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACTAXWV, false, false);

			stmtUpdate = con.getStatementObject(UPDATE_ACTAXWV, false, false);
			Vector vector = new Vector();
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					stmtInsert.setString(1, key.currencyCode);
					stmtInsert.setString(2, key.accountNo);
					stmtInsert.setString(3, wrapper[i].taxCode);
					stmtInsert.setDate(4,wrapper[i].waiverExpiryDate); //Changes done by Antara for Tax Waiver - eGold VH
					int rowsAffected = stmtInsert.executeUpdate();
					vector.addElement(wrapper[i]);

				} /*
				 * else if(wrapper[i].recordStatus ==
				 * EBBSConstants.MODIFIED) { stmtUpdate.setByte(1,
				 * wrapper[i].recordStatus); stmtUpdate.setString(2,
				 * key.currencyCode); stmtUpdate.setString(3,
				 * key.accountNo); stmtUpdate.setString(4,
				 * wrapper[i].taxCode); stmtUpdate.executeUpdate();
				 * vector.addElement(wrapper[i]);
				 *  }  
				 */
				
				//Added by 1559879 for KE WHT ExpiryDate Updation
				else if(wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					stmtUpdate.setDate(1, wrapper[i].waiverExpiryDate);
					stmtUpdate.setString(2, key.currencyCode);
					stmtUpdate.setString(3, key.accountNo);
					stmtUpdate.setString(4, wrapper[i].taxCode);
					stmtUpdate.executeUpdate();
					vector.addElement(wrapper[i]);
				}
				//Ends here
				
				else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, wrapper[i].taxCode);
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);

				}

			}

			if (vector.size() > 0) {
				newWrapper = new SubsidiaryAccountTaxWaiverWrapper[vector.size()];
				vector.copyInto(newWrapper);

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}

	public NominatedChargeAccountWrapper[] modifyNominatedChargeAccount(SubsidiaryAccountEntityKey key, NominatedChargeAccountWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		NominatedChargeAccountWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;
		try {

			Vector vector = new Vector();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_CHRGNOM, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_CHRGNOM, false, false);
			stmtDelete = con.getStatementObject(DELETE_CHRGNOM, false, false);

			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					// private final String UPDATE_CHRGNOM = "UPDATE CHRGNOM SET
					// NOMACCOUNTNO = ? , NOMCURRENCYCODE = ? WHERE ACCOUNTNO =
					// ? AND CURRENCYCODE = ? AND CHARGECODE = ?";
					// private final String INSERT_CHRGNOM = "INSERT INTO
					// CHRGNOM(CURRENCYCODE,ACCOUNTNO,CHARGECODE,NOMCURRENCYCODE,NOMACCOUNTNO)
					// VALUES(?,?,?,?,?)";
					// private final String DELETE_CHRGNOM = "DELETE FROM
					// CHRGNOM WHERE ACCOUNTNO = ? AND CURRENCYCODE = ? AND
					// CHARGECODE = ?";

					stmtInsert.setString(1, key.currencyCode);
					stmtInsert.setString(2, key.accountNo);
					stmtInsert.setString(3, wrapper[i].chargeCode);
					stmtInsert.setString(4, wrapper[i].nominatedChargeCurrencyCode);
					stmtInsert.setString(5, wrapper[i].nominatedChargeAccountNo);
					//Start -SIMCO R3<<Locker Charges>>
					stmtInsert.setString(6, Utility.getString(wrapper[i].chargeGroupFlag));	
					//End -SIMCO R3<<Locker Charges>>

					int rowsAffected = stmtInsert.executeUpdate();
					// if(rowsAffected != 1)
					// throw new CreateException();
					vector.addElement(wrapper[i]);
				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					stmtUpdate.setString(1, wrapper[i].nominatedChargeAccountNo);
					stmtUpdate.setString(2, wrapper[i].nominatedChargeCurrencyCode);
					//Start -SIMCO R3<<Locker Charges>>
					stmtUpdate.setString(3, Utility.getString(wrapper[i].chargeGroupFlag));	//2861 SIMCO UAT FIX MAY 21 2012
					//End -SIMCO R3<<Locker Charges>>
					stmtUpdate.setString(5, key.currencyCode);
					stmtUpdate.setString(4, key.accountNo);
					stmtUpdate.setString(6, wrapper[i].chargeCode);
					int result = stmtUpdate.executeUpdate();
					stmtUpdate.executeUpdate();

					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					stmtDelete.setString(2, key.currencyCode);
					stmtDelete.setString(1, key.accountNo);
					stmtDelete.setString(3, String.valueOf(wrapper[i].chargeCode));
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);
				}
			}

			if (vector.size() > 0) {
				newWrapper = new NominatedChargeAccountWrapper[vector.size()];
				vector.copyInto(newWrapper);
			}

			// stmtUpdate.setString(1, wrapper.nominatedChargeAccountNo);
			// stmtUpdate.setString(2, wrapper.nominatedChargeCurrencyCode);
			// stmtUpdate.setString(3, key.currencyCode);
			// stmtUpdate.setString(4, key.accountNo);
			// stmtUpdate.setString(5, wrapper.chargeCode);
			// int result = stmtUpdate.executeUpdate();
			//
			// if(result == 0){
			// stmtInsert.setString(1, key.currencyCode);
			// stmtInsert.setString(2, key.accountNo);
			// stmtInsert.setString(3, wrapper.chargeCode);
			// stmtInsert.setString(4, wrapper.nominatedChargeCurrencyCode);
			// stmtInsert.setString(5, wrapper.nominatedChargeAccountNo);
			// int rowsAffected = stmtInsert.executeUpdate();
			// }
			//
			// newWrapper = wrapper;

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}

	public void removeAcTaxWaiver(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACTAXWV, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// included by sumithra on 10.02.2004 for PH047 - NominatedChargeAccount
	public void removeNominatedChargeAccount(scb.wrapper.PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_CHRGNOM, false, false);
			stmt.setString(1, key.accountNo);
			stmt.setString(2, key.currencyCode);
			stmt.setString(3, "9999");
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement

				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// included by sumithra on 10.02.2004 for PH047 - NominatedChargeAccount

	public void updateNominatedChargeAccount(SubsidiaryAccountEntityKey key, NominatedChargeAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		// changes done by venkat for India eBBS on 06/08/2007
		SQLStatementObject stmt = null; // declared outside try block
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_CHRGNOM, false, false);
			stmt.setString(1, wrapper.nominatedChargeAccountNo);
			stmt.setString(2, wrapper.nominatedChargeCurrencyCode);
			//Start -SIMCO R3<<Locker Charges>>
			stmt.setString(3, Utility.getString(wrapper.chargeGroupFlag));	
			//End -SIMCO R3<<Locker Charges>>
			stmt.setString(4, key.accountNo);
			stmt.setString(5, key.currencyCode);
			stmt.setString(6, wrapper.chargeCode);
			stmt.executeUpdate();

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// PreparedStatement
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// retrofitted from MESA
	public void createAccountInfoType(SubsidiaryAccountEntityKey key, scb.general.wrapper.GenericInfoTypeWrapper[] wrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACCINFO, false, false);

			for (int i = 0; i < wrapper.length; i++) {

				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				stmt.setString(3, wrapper[i].misCode);
				stmt.setString(4, wrapper[i].seqNo);
				stmt.setString(5, wrapper[i].misValue);

				int rowsAffected = stmt.executeUpdate();
				if (rowsAffected <= 0) {
					throw new CreateException();
				}
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// new method added by Prabha for eBBS/Single Source on 21/05/2004 - method
	// retrofitted from uae.
	public void customStoreObject(AbstractWrapper argWrapper) throws CreateException {
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			StringBuffer sql = new StringBuffer("UPDATE ACCOUNT SET ");
			Object[] values = new Object[wrapper.getHash().size()];
			java.util.Iterator it = wrapper.getHash().keySet().iterator();
			int i = 0;
			while (it.hasNext()) {
				Object column = it.next();
				sql.append(column);
				sql.append("=?,");
				values[i++] = wrapper.getHash().get(column);
			}
			//setting checkerdate to identify events
			//sql.append("CHECKERDATE=?,");
			//values[i++] = eoddate;
			sql.deleteCharAt(sql.length() - 1);
			sql.append(" WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?");
			stmt = con.getStatementObject(sql.toString(), false, false);
			int j = 1;
			for (i = 0; i < values.length; i++) {
				if (values[i] instanceof Character && values[i] != null) {
					stmt.setObject(i + 1, values[i].toString());
				} else {
					stmt.setObject(i + 1, values[i]);
				}
				j++;
			}
			stmt.setString(j++, wrapper.currencyCode);
			stmt.setString(j++, wrapper.accountNo);
			stmt.executeUpdate();
		if(enableLeanAccount()) {
				TxnAccountWrapper oldWrap = null;
				try {
					createTxnAccountHelper();
					oldWrap = this.txnAccountHelper.LoadTxnAccountsWrapper(wrapper.currencyCode, wrapper.accountNo);
					if (oldWrap != null) {
						if(this.txnAccountHelper.isDataChangedInTxnAccounts(wrapper,oldWrap)) {
							this.txnAccountHelper.updateTxnAccount(wrapper, oldWrap);
						}
					} else {
						this.txnAccountHelper.createTxnAccount(wrapper);
					}
			} catch (FinderException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			}
		}
		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);// //-
				// F16
				// reengineering
				throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
	}

	public String findSCBAccountNo(String accountNo, String currencyCode) throws javax.ejb.FinderException {
		SQLExecutor con = null;
		String result = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {
			// modified by Dennis for srilanka GAP EFT
			accountNo = scb.util.Utility.leftPad(accountNo, 20, '0');
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_FOR_SCB_ACCOUNT, false, false);
			stmt.setString(1, accountNo);
			stmt.setString(2, currencyCode);
			rs = stmt.executeQuery();

			while (rs.next()) {

				result = rs.getString(1);

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return result;
	}

	// Author : V.Gokul
	// Date : 02-05-03
	public scb.general.wrapper.GenericInfoTypeWrapper[] modifyAccountInfoType(SubsidiaryAccountEntityKey key, scb.general.wrapper.GenericInfoTypeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;
		scb.general.wrapper.GenericInfoTypeWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACCINFO, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACCINFO, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACCINFO, false, false);

			Vector vector = new Vector();
			for (int i = 0; i < wrapper.length; i++) {
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					stmtInsert.setString(1, key.currencyCode);
					stmtInsert.setString(2, key.accountNo);
					stmtInsert.setString(3, wrapper[i].misCode);
					stmtInsert.setString(4, String.valueOf(wrapper[i].seqNo.trim()));
					stmtInsert.setString(5, wrapper[i].misValue);

					int rowsAffected = stmtInsert.executeUpdate();
					// if(rowsAffected != 1)
					// throw new CreateException();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					stmtUpdate.setString(1, wrapper[i].misValue);
					stmtUpdate.setString(2, key.currencyCode);
					stmtUpdate.setString(3, key.accountNo);
					stmtUpdate.setString(4, wrapper[i].misCode);
					stmtUpdate.setString(5, String.valueOf(wrapper[i].seqNo.trim()));
					stmtUpdate.executeUpdate();

					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, wrapper[i].misCode);
					stmtDelete.setString(4, String.valueOf(wrapper[i].seqNo.trim()));
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);

				}

			}

			if (vector.size() > 0) {
				newWrapper = new scb.general.wrapper.GenericInfoTypeWrapper[vector.size()];
				vector.copyInto(newWrapper);

			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return newWrapper;

	}
//changes end here
	//Start -SIMCO R3<<Locker Charges>>
	public void createAccountOfflineCharge(SubsidiaryAccountEntityKey key, AccountOfflineChargeWrapper[] wrapper) throws javax.ejb.CreateException {		
		SQLExecutor con = null;
		SQLStatementObject stmt = null;		

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACOFFCHRG, false, false);
			
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				stmt.setString(3, wrapper[i].code);
				stmt.setString(4, Utility.getString(wrapper[i].chargeGroupFlag));				
				stmt.setDate(5, wrapper[i].nextExecDate);				
				if(stmt.executeUpdate() <= 0) {
   					throw new CreateException();
   				}
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}
	
	public AccountOfflineChargeWrapper[] modifyAccountOfflineCharge(SubsidiaryAccountEntityKey key, AccountOfflineChargeWrapper[] wrapper) throws CreateException {

		SQLExecutor con = null;		
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;		
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACOFFCHRG, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACOFFCHRG, false, false);
			stmtDelete = con.getStatementObject(DELETE_ACOFFCHRG, false, false);								

			for (int i = 0; i < wrapper.length; i++) {
				//System.out.println("wrapper length in helper is " + wrapper.length);
				//System.out.println("Record status" + wrapper[i].recordStatus);
				//scb.util.LogWriter.getInstance().println("wrapper length in helper is " + wrapper.length + " Record status" + wrapper[i].recordStatus);
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {					
					stmtInsert.setString(1, key.currencyCode);					
					stmtInsert.setString(2, key.accountNo);					
					stmtInsert.setString(3, wrapper[i].code);
					stmtInsert.setString(4, Utility.getString(wrapper[i].chargeGroupFlag));					
					stmtInsert.setDate(5, wrapper[i].nextExecDate);					
					stmtInsert.executeUpdate();					
				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					//System.out.println("Record MODIFIED" + wrapper[i].recordStatus);
				//	scb.util.LogWriter.getInstance().println("Record MODIFIED" + wrapper[i].recordStatus);
					//code modified for Defect 3665 karthick & prakash
					stmtUpdate.setString(1, wrapper[i].code);
					stmtUpdate.setString(2, Utility.getString(wrapper[i].chargeGroupFlag));				
					stmtUpdate.setDate(3, wrapper[i].nextExecDate);
					stmtUpdate.setString(4, key.currencyCode);
					stmtUpdate.setString(5, key.accountNo);						
					stmtUpdate.setString(6, wrapper[i].code);
					stmtUpdate.setString(7, Utility.getString(wrapper[i].chargeGroupFlag));	
					stmtUpdate.executeUpdate();										
				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					//System.out.println("Record DELETED" + wrapper[i].recordStatus);
				//	scb.util.LogWriter.getInstance().println("Record DELETED" + wrapper[i].recordStatus);
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);						
					stmtDelete.setString(3, wrapper[i].code);
					stmtDelete.setString(4, Utility.getString(wrapper[i].chargeGroupFlag));									
					stmtDelete.executeUpdate();					
				}				
			}			
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}

		return wrapper;

	}
	
	public void removeAccountOfflineCharge(PrimaryKey argKey, AccountOfflineChargeWrapper [] wrapper) throws javax.ejb.RemoveException, CreateException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;		
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACOFFCHRG, false, false);
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				stmt.setString(3, wrapper[i].code);
				stmt.setString(4, Utility.getString(wrapper[i].chargeGroupFlag));
				stmt.executeUpdate();
			}			
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	
	public void updateAccountOfflineCharge(SubsidiaryAccountEntityKey key, AccountOfflineChargeWrapper[] wrapper) throws CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_ACOFFCHRG, false, false);			
			for (int i = 0; i < wrapper.length; i++) {				
				stmt.setString(1, wrapper[i].code);
				stmt.setString(2, Utility.getString(wrapper[i].chargeGroupFlag));				
				stmt.setDate(3, wrapper[i].nextExecDate);
				stmt.setString(4, key.currencyCode);
				stmt.setString(5, key.accountNo);
				stmt.setString(6, wrapper[i].code);
				stmt.setString(7, Utility.getString(wrapper[i].chargeGroupFlag));	
				stmt.executeUpdate();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	
	public AccountOfflineChargeWrapper[] fetchAccountOfflineCharge(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		AccountOfflineChargeWrapper[] resultWrapper = null;
		AccountOfflineChargeWrapper wrapper = null;
		Vector result = new Vector();
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACOFFCHRG, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACOFFCHRG, false, false);
			}
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();
			while (rs.next()) {
				wrapper = new AccountOfflineChargeWrapper();				
				wrapper.code = rs.getString(1);
				wrapper.chargeGroupFlag = Utility.getChar(rs.getString(2));				
				wrapper.nextExecDate = rs.getDate(3);				
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new AccountOfflineChargeWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultWrapper;

	}
	//End -SIMCO R3<<Locker Charges>>
	
	// Code added by Manikandan for E12 - Customer Link on 27-09-2007
	// public void createCustomerAccLink(SubsidiaryAccountEntityKey key,
	// CustomerLinkWrapper[] wrapper) throws javax.ejb.CreateException
	public void createCustomerAccLink(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper argWrapper) throws javax.ejb.CreateException {

		SubsidiaryAccountWrapper subsidiaryWrapper = argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		boolean loop = false;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_ACCLNKTYP, false, false);

			CustomerLinkWrapper[] wrapper = subsidiaryWrapper.customerLinkWrapper;
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, key.accountNo);
				stmt.setString(2, key.currencyCode);
				stmt.setString(3, wrapper[i].relationshipNo);
				stmt.setString(4, wrapper[i].relationshipTypeCode);
				// code added by chandana for IN-Day2 change
				stmt.setDate(5, wrapper[i].attachedDate);
				// end of code change
				stmt.executeUpdate();
				if (!loop) {
					loop = insertHistoryForCustomerAccLink(key, wrapper, 'Y', subsidiaryWrapper);
				}

			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

	}

	// Changes end here
	// Code added by Manikandan for E12 - Customer Link on 21-09-2007
	public CustomerLinkWrapper[] modifyCustomerAccLink(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper subWrapper) throws CreateException {

		SQLExecutor con = null;
		// CustomerLinkWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;
		CustomerLinkWrapper[] wrapper = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_ACCLNKTYP, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_ACCLNKTYP, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_ACCLNKTYP, false, false);
			wrapper = subWrapper.customerLinkWrapper;
			int result = 0;
			boolean loop1 = false;
			boolean loop2 = false;
			boolean loop3 = false;
			// Vector vector = new Vector();
			// vector.clear();

			for (int i = 0; i < wrapper.length; i++) {
				//System.out.println("wrapper length in helper is " + wrapper.length);
				//System.out.println("Record status" + wrapper[i].recordStatus);
				//scb.util.LogWriter.getInstance().println("wrapper length in helper is " + wrapper.length + "Record status" + wrapper[i].recordStatus);
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					// System.out.println("Record NEW"+wrapper[i].recordStatus);
					stmtInsert.setString(1, key.accountNo);
					// System.out.println("key.accountNo new "+key.accountNo);
					stmtInsert.setString(2, key.currencyCode);
					// System.out.println("key.currencyCode new"+
					// key.currencyCode);
					stmtInsert.setString(3, wrapper[i].relationshipNo);
					stmtInsert.setString(4, wrapper[i].relationshipTypeCode);
					//code added by chandana for IN-Day2 change
					stmtInsert.setDate(5, wrapper[i].attachedDate);
					// end of code change

					stmtInsert.executeUpdate();

					if (!loop1) {
						loop1 = insertHistoryForCustomerAccLink(key, wrapper, 'Y', subWrapper);

					}
					// vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					//System.out.println("Record MODIFIED" + wrapper[i].recordStatus);
					//scb.util.LogWriter.getInstance().println("Record MODIFIED" + wrapper[i].recordStatus);
					stmtUpdate.setString(1, wrapper[i].relationshipTypeCode);
					stmtUpdate.setString(2, key.currencyCode);
					stmtUpdate.setString(3, key.accountNo);
					stmtUpdate.setString(4, wrapper[i].relationshipNo);
					//code added by chandana for IN-Day2 change
					stmtUpdate.setDate(5, wrapper[i].attachedDate);
					// end of code change
					//changes Done By Sudha Nagaraj for R4 Development 25 july 2008
					//stmtUpdate.setString(5, wrapper[i].relationshipTypeCode);
					//System.out.println("key.accountNo MODIFIED " + key.accountNo);
					//scb.util.LogWriter.getInstance().println("key.accountNo MODIFIED " + key.accountNo + " key.currencyCode MODIFIED" + key.currencyCode);

					//System.out.println(" key.currencyCode MODIFIED" + key.currencyCode);
					stmtUpdate.executeUpdate();

					// updateHistoryForCustomerAccLink(key,wrapper,'N',subWrapper);

					if (!loop2) {
						//System.out.println("Inside updateHistoryForCustomerAccLink MODIFIED");
						//scb.util.LogWriter.getInstance().println("Inside updateHistoryForCustomerAccLink MODIFIED");
						loop2 = updateHistoryForCustomerAccLink(key, wrapper, 'N', subWrapper);

					}

					// vector.addElement(wrapper[i]);
				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					//System.out.println("Record DELETED" + wrapper[i].recordStatus);
					scb.util.LogWriter.getInstance().println("Record DELETED" + wrapper[i].recordStatus);
					stmtDelete.setString(1, key.currencyCode);
					stmtDelete.setString(2, key.accountNo);
					stmtDelete.setString(3, wrapper[i].relationshipNo);
					stmtDelete.setString(4, wrapper[i].relationshipTypeCode);
					//code commented by Anitha N as attached date is a nullable field

					/*//code added by chandana for IN-Day2 change
					stmtDelete.setDate(5, wrapper[i].attachedDate);
					// end of code change*/
					//System.out.println("key.accountNo DELETED " + key.accountNo);
					//System.out.println(" key.currencyCode DELETED" + key.currencyCode);
					//scb.util.LogWriter.getInstance().println("key.accountNo DELETED " + key.accountNo + " key.currencyCode DELETED" + key.currencyCode);
					stmtDelete.executeUpdate();

					if (!loop3) {
						//System.out.println("Inside updateHistoryForCustomerAccLink DELETED");
						//scb.util.LogWriter.getInstance().println("Inside updateHistoryForCustomerAccLink DELETED");
						loop3 = updateHistoryForCustomerAccLink(key, wrapper, 'N', subWrapper);

					}

					// vector.addElement(wrapper[i]);
				}
				// if (result == 0) {
				// throw new CreateException();
				// }
			}
			/*
			 * if(vector.size()>0) { newWrapper = new
			 * CustomerLinkWrapper[vector.size()]; vector.copyInto(newWrapper); }
			 */
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}

		return wrapper;

	}

	// Changes end here
	// Code added by Manikandan for E12 - Customer Link on 21-09-2007
	public void removeCustomerAccLink(PrimaryKey argKey, SubsidiaryAccountWrapper subWrapper) throws javax.ejb.RemoveException, CreateException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		CustomerLinkWrapper[] wrapper = subWrapper.customerLinkWrapper;
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_ACCLNKTYP, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}

	// Changes end here
	// Code added by Manikandan for E12 - Customer Link on 21-09-2007
	public void updateCustomerAccLink(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper subWrapper) throws CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(this.UPDATE_ACCLNKTYP, false, false);
			CustomerLinkWrapper[] wrapper = subWrapper.customerLinkWrapper;
			for (int i = 0; i < wrapper.length; i++) {
				stmt.setString(1, wrapper[i].relationshipTypeCode);
				stmt.setString(2, key.currencyCode);
				stmt.setString(3, key.accountNo);
				stmt.setString(4, wrapper[i].relationshipNo);
				//code added by chandana for IN-Day2 change
				stmt.setDate(5, wrapper[i].attachedDate);
				// end of code change
				//changes Done By Sudha Nagaraj for R4 Development 25 -July - 2008
				//stmt.setString(5, wrapper[i].relationshipTypeCode);
				// Changes done by Yuvarani for India ST
				/*
				 * int result = stmt.executeUpdate(); if (result == 0) { throw
				 * new CreateException(); }
				 */
				stmt.executeUpdate();// ends
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}

	// Changes end here
	// Code added by Manikandan for E12 - Customer Link on 21-09-2007
	public CustomerLinkWrapper[] fetchCustomerAccLink(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		CustomerLinkWrapper[] resultWrapper = null;
		CustomerLinkWrapper wrapper = null;
		Vector result = new Vector();
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCLNKTYP, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCLNKTYP, false, false);
			}
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();
			while (rs.next()) {
				wrapper = new CustomerLinkWrapper();
				wrapper.accountNo = rs.getString(1);
				wrapper.currencyCode = rs.getString(2);
				wrapper.relationshipNo = rs.getString(3);
				wrapper.relationshipTypeCode = rs.getString(4);
				// code added by chandana for IN-Day2 change
				wrapper.attachedDate = rs.getDate(5);
				// end of code change
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
			}

			if (result.size() > 0) {
				resultWrapper = new CustomerLinkWrapper[result.size()];
				result.copyInto(resultWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}

				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return resultWrapper;

	}

	// Added by murugan for CustomerCombine to INDIA E12
	public void moveRelationAccount(String survivingRelationNo, String dyingRelationNo) throws scb.exception.SCBApplicationException {

		SQLExecutor con = null;
		SQLStatementObject ps = null;
		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(UPDATE_MOVE_RELACC_HOME_SQL, false, false);
			ps.setString(1, survivingRelationNo);
			ps.setString(2, dyingRelationNo);
			ps.setString(3, survivingRelationNo);

			int rows = ps.executeUpdate();
			//System.out.println("SubsidiaryAccountHelper## moveRelationAccount ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo + "#" + rows);
			//scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper## moveRelationAccount ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo + "#" + rows);
			/*if (rows == 0) {
			 throw new CreateException();
			 }*/
			//ps.close();

		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}

	}

	//Added by murugan for CustomerCombine to INDIA E12
	public void migrateNominee(String survivingRelationNo, String dyingRelationNo) throws scb.exception.SCBApplicationException {

		SQLExecutor con = null;
		SQLStatementObject ps = null;
		try {
			//System.out.println("SubsidiaryAccountHelper## migrateNominee ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo + "#");
			//scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper## migrateNominee ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo + "#");
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(UPDATE_MOVE_MIGNOMINEE_HOME_SQL, false, false);
			ps.setString(1, survivingRelationNo);
			ps.setString(2, dyingRelationNo);

			int rows = ps.executeUpdate();
			//ps.close();

		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}

	}

	//Added by murugan for CustomerCombine to INDIA E12
	public void migrateCustomerCombine(String survivingRelationNo, String dyingRelationNo) throws scb.exception.SCBApplicationException {

		SQLExecutor con = null;
		SQLStatementObject select_PS = null;
		SQLStatementObject update_PS = null;
		SQLStatementObject delete_PS = null;
		SQLResultObject select_RS = null;
		String currencyCode = null;
		String accountNo = null;
		String reltypeCode = null;
		try {
			//System.out.println("SubsidiaryAccountHelper## migrateCustomerCombine ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo);
			//scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper## migrateCustomerCombine ## survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo);
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			update_PS = con.getStatementObject(UPDATE_ACCUSLNK_HOME_NEW, false, false);
			delete_PS = con.getStatementObject(DELETE_ACCUSLNK_HOME_NEW, false, false);
			delete_PS.setString(1, dyingRelationNo);
			delete_PS.setString(2, survivingRelationNo);
			delete_PS.executeUpdate();
			update_PS.setString(1, survivingRelationNo);
			update_PS.setString(2, dyingRelationNo);
			update_PS.executeUpdate();
			//select_RS.close();

		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if (select_RS != null) {
					select_RS.close();
				}
				if (select_PS != null) {
					select_PS.close();
				}
				if (update_PS != null) {
					update_PS.close();
				}
				if (delete_PS != null) {
					delete_PS.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}

	}

	//Added by murugan for CustomerCombine to India E12
	private void update(SQLExecutor con, SQLStatementObject update_PS, SQLStatementObject delete_PS, String survivingRelationNo, String dyingRelationNo, String currencyCode, String accountNo, String reltypeCode) throws scb.exception.SCBApplicationException {

		try {
			//System.out.println("SubsidiaryAccountHelper## migrateCustomerCombine ##update##survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo);
			//scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper## migrateCustomerCombine ##update##survivingRelationshipNo## dyingRelationshipNo##rows" + survivingRelationNo + "#" + dyingRelationNo);

			update_PS.setString(1, survivingRelationNo);
			update_PS.setString(2, dyingRelationNo);
			update_PS.setString(3, reltypeCode);
			update_PS.setString(4, accountNo);
			update_PS.setString(5, currencyCode);
			update_PS.executeUpdate();

		} catch (SQLExecuteException se) {
			//System.out.println("SQLState() " + se.getSQLState());
			scb.util.LogWriter.getInstance().println("SQLState() " + se.getSQLState());
			//Added And Commented As per IA_PSS_00341 on March 26, 2012
			//if (se.getSQLState().equalsIgnoreCase("23515") || se.getSQLState().equalsIgnoreCase("42891")) {
			if (se.getSQLState().equalsIgnoreCase("23515") || se.getSQLState().equalsIgnoreCase("42891") || se.getSQLState().equalsIgnoreCase("23505")) {
				delete_PS.setString(1, dyingRelationNo);
				delete_PS.setString(2, reltypeCode);
				delete_PS.setString(3, accountNo);
				delete_PS.setString(4, currencyCode);
				delete_PS.executeUpdate();

			} else {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
				throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
			}
		}

	}

	//End by murugan for CustomerCombine to INDIA E12

//	PT Changes done For INDIA PRODUCTION By Bala
	public void updateBatchforInterestMonthlyAccrual(Vector argVector) throws CreateException{

		SubsidiaryAccountWrapper wrapper = null;;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter out = new LogWriter("EOD","updateBatchforInterestAccrual","updateBatchforInterestAccrual");		
		
		try {
			//Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);




			stmt = con.getStatementObject("	UPDATE ACCOUNT SET CRINTACCRUEDAMT=?,CRINTFORACCRPERIOD=?,LASTCRINTRATE=?,CRLASTACCRUALDATE=?," +
					"LASTCRINTCOMPDATE=?,NEXTCRINTCOMPDATE=?,CRINTCOMPOUND=?,LASTDRINTCOMPDATE=?,NEXTDRINTCOMPDATE=?,DRINTCOMPOUND=?, "
					+ " POSCRINTACCRUEDAMT=?, NEGCRINTACCRUEDAMT=?, POSCRINTADJAMT=?, NEGCRINTADJAMT =?, POSCRMANUALADJAMT =?, NEGCRMANUALADJAMT =? "
					+ " WHERE CURRENCYCODE=? AND ACCOUNTNO=? ", false, false);
			
			if (argVector!=null && argVector.size()!=0){
				for(int i=0;i<argVector.size();i++){
					wrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);
					stmt.setBigDecimal(1, wrapper.creditInterestAccrued);
					stmt.setBigDecimal(2, wrapper.crIntAccrForAccrPeriod);
					stmt.setBigDecimal(3, wrapper.lastCrintRate);

					stmt.setDate(4, wrapper.crLastAccrualDate);

					stmt.setDate(5, wrapper.lastcrIntCompoundedDate);
					stmt.setDate(6, wrapper.crNextCompDate);
					stmt.setBigDecimal(7, wrapper.crIntToCompound);
					stmt.setDate(8, wrapper.lastdrIntCompoundedDate);
					stmt.setDate(9, wrapper.drNextCompDate);
					stmt.setBigDecimal(10, wrapper.drIntToCompound);
					
					stmt.setBigDecimal(11, wrapper.posCrIntAccuredAmt);
					stmt.setBigDecimal(12, wrapper.negCrIntAccuredAmt);
					stmt.setBigDecimal(13, wrapper.posCrIntAdjustedAmt);
					stmt.setBigDecimal(14, wrapper.negCrIntAdjustedAmt);
					// VH Negative interest Changes
					stmt.setBigDecimal(15, wrapper.posCrManualAdjustment);
					stmt.setBigDecimal(16, wrapper.negCrManualAdjustment);
					
					//stmt.setDate(17, eoddate);
					
					stmt.setString(17, wrapper.currencyCode);
					stmt.setString(18, wrapper.accountNo);
					stmt.addBatch();
				}
				 
				 int result[] = stmt.executeBatch();                 
				 
				/*if (result.length <= 0)
					throw new CreateException();*/
			}

		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				scb.util.LogWriter.getInstance().println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper.currencyCode +":"+wrapper.accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}

         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	// Method Added by Dhasaprakash D for E12 UK Deal no generation.
	public boolean isAccountAvailableByCurrencyAndNumber(String currencyCode, String accountNo) throws FinderException {
		SQLExecutor sqlCon = null;
		SQLStatementObject sqlStmt = null;
		SQLResultObject sqlRs = null;
		String SELECT_ACCOUNT = "EBACC09613SY";
		String SELECT_TACCOUNT = "EBACC09614SY";
		try{
			sqlCon = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			sqlStmt = sqlCon.getStatementObject(SELECT_ACCOUNT, false, false);
			sqlStmt.setString(1,currencyCode);
			sqlStmt.setString(2, accountNo);
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
			sqlRs.close();
			sqlStmt.close();
			sqlStmt = sqlCon.getStatementObject(SELECT_TACCOUNT, false, false);
			sqlStmt.setString(1,currencyCode);
			sqlStmt.setString(2, accountNo);
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
		} catch (SQLExecuteException e) {
			e.printStackTrace();
			throw new EJBException(e.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+e.getMessage());
		} catch (NamingException e) {
			e.printStackTrace();
			throw new EJBException("Error in isAccountAvailableByCurrencyAndNumber "+e.getMessage());
		}finally {
			try {
				if (sqlRs != null) {
					sqlRs.close();
				}
				if(sqlStmt != null){
					sqlStmt.close();
				}
				if (sqlCon != null) {
					sqlCon.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			}
		}
		return false;
	}
//	Added by Suresh.S for R3 UK Capability UKCOR19 starts
	public void createGLDataDetail(SubsidiaryAccountEntityKey key, CrossDataValidationWrapper wrapper) throws javax.ejb.CreateException {
		scb.util.LogWriter out = new LogWriter("EOD","createGLDataDetail","createGLDataDetail");
		
		SQLExecutor con = null;
		SQLStatementObject stmt = null;


		try {
			// if (out == null)
			// out = LogWriter.getInstance("TRelationshipHelper", "");
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_GLDATA, false, false);
				  if(wrapper.billsLiquidity==null){
					  wrapper.billsLiquidity="99";
				  }
				  stmt.setString(1, key.accountNo);
				  stmt.setString(2, "A");
				  stmt.setString(3,key.currencyCode);
				  stmt.setString(4, wrapper.crAccClsCode);
				  stmt.setString(5, wrapper.drAccClsCode);
				  stmt.setString(6, wrapper.unclAccClsCode);
				  stmt.setString(7, wrapper.gsamAccClsCode);
				  stmt.setString(8, wrapper.crProductCode);
				  stmt.setString(9, wrapper.drProductCode);
				  stmt.setString(10,wrapper.interestRtCls);
				  stmt.setString(11,wrapper.billsLiquidity);
				  stmt.setString(12,wrapper.stdCrProductCode);
				  stmt.setString(13,wrapper.stdDrProductCode);
				  stmt.setString(14,wrapper.psglBusinessUnit);
				  stmt.setString(15,wrapper.psglOperatingUnit);
				  stmt.setString(16,wrapper.investmentPurpose);

					int result = stmt.executeUpdate();
				if (result == 0) {					
					throw new CreateException();
				}

			stmt.close();
		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (IllegalArgumentException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new CreateException(EBBSConstants.ILLEGAL_ARGUMENT_EXCEPTION);
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if(con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
				throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
	}
	public void removeGLDataDetails(PrimaryKey argKey) throws RemoveException {
		scb.util.LogWriter out = new LogWriter("EOD","removeGLDataDetails","removeGLDataDetails");
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		 SQLExecutor  con = null;
		SQLStatementObject pstmt = null;
		try {
			con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			pstmt = con.getStatementObject(DELETE_GLDATA, false, false);
			pstmt.setString(1, key.accountNo);
			pstmt.setString(2, key.currencyCode);

			pstmt.executeUpdate();   
		}

		catch (javax.naming.NamingException e) {
			 scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16 reengineering
			throw new javax.ejb.RemoveException(scb.util.EBBSConstants.NAMING_EXCEPTION);
		}
		catch (SQLExecuteException e) {
			 scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16 reengineering
			throw new javax.ejb.RemoveException(e.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		}finally {
			try {
				if (pstmt != null) {
					pstmt.close();
				}
				if(con !=null) {
					con.destroy();
				}
			}
			catch (SQLExecuteException e) {
				 scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16 reengineering
				throw new javax.ejb.RemoveException(e.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}

		}
	}
	public CrossDataValidationWrapper fetchGLDataDetails(SubsidiaryAccountEntityKey argKey) throws javax.ejb.FinderException {

		CrossDataValidationWrapper crossDataValidationWrapper = null;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = null;
			/*if (argKey.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_GLDATA ,true,false);
			} else {
				stmt = con.getStatementObject(SELECT_GLDATA, false, false);
			}*/
			stmt = con.getStatementObject(SELECT_GLDATA, false, false);
			stmt.setString(1, argKey.accountNo);
			stmt.setString(2, argKey.currencyCode);
			rs = stmt.executeQuery();

			while (rs.next()) {
			  crossDataValidationWrapper = new CrossDataValidationWrapper();
			  crossDataValidationWrapper.crAccClsCode=rs.getString(1);
			  crossDataValidationWrapper.drAccClsCode=rs.getString(2);
			  crossDataValidationWrapper.unclAccClsCode=rs.getString(3);
			  crossDataValidationWrapper.gsamAccClsCode=rs.getString(4);
			  crossDataValidationWrapper.crProductCode=rs.getString(5);
			  crossDataValidationWrapper.drProductCode=rs.getString(6);
			  crossDataValidationWrapper.interestRtCls=rs.getString(7);
			  crossDataValidationWrapper.billsLiquidity=rs.getString(8);
			  crossDataValidationWrapper.stdCrProductCode=rs.getString(9);
			  crossDataValidationWrapper.stdDrProductCode=rs.getString(10);
			  crossDataValidationWrapper.psglBusinessUnit=rs.getString(11);
			  crossDataValidationWrapper.psglOperatingUnit=rs.getString(12);
			  crossDataValidationWrapper.investmentPurpose=rs.getString(13);
			  /*crossDataValidationWrapper.stdCrProductCodeDesc=rs.getString(14);
			  crossDataValidationWrapper.stdDrProductCodeDesc=rs.getString(15);
			  crossDataValidationWrapper.investmentPurposeDesc=rs.getString(16);
			  crossDataValidationWrapper.psglBusinessUnitDesc=rs.getString(17);
			  crossDataValidationWrapper.psglOperatingUnitDesc=rs.getString(18);
			  crossDataValidationWrapper.crAccClsCodeDesc=rs.getString(19);
			  crossDataValidationWrapper.drAccClsCodeDesc=rs.getString(20);
			  crossDataValidationWrapper.unclAccClsCodeDesc=rs.getString(21);
			  crossDataValidationWrapper.gsamAccClsCodeDesc=rs.getString(22);*/

			}
			rs.close();
			stmt.close();

		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new FinderException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if(con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
				throw new FinderException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
		return crossDataValidationWrapper;
	}


//	Ends
//	Added By Ramesh for UK - GLDeptID,PSGLOpunit and PSGLBusiness updation
	public void updateBatchforCrossData(Vector argVector) throws CreateException{

		SubsidiaryAccountWrapper subsidiaryAccountWrapper = null;
		CrossDataValidationWrapper wrapper =null;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLStatementObject accountStmt = null;
		scb.util.LogWriter out = new LogWriter("EOD","updateBatchforCrossData","updateBatchforCrossData");
		out.printDebugMode("===========Batch updateBatchforCrossData===");
		String STORE_ACCOUNT_CROSSDATA = "UPDATE GLDATA SET CRACCLS=? ,DRACCLS=?,UNCLACCLS=?,GASMACCLS=?,CRPRODUCTCODE =?,DRPRODUCTCODE= ?,INTRTCLS=?,BILLSLIQUIDITY=?,STDCRPRODUCTCODE=?,STDDRPRODUCTCODE =?  WHERE  CURRENCYCODE= ? AND REFERENCENO=? ";
		//changed by Anushree for SIMCO
		String UPDATE_BATCH_ACCOUNT ="UPDATE ACCOUNT SET   MAKERBRANCH = ?, MAKERDATE =?, MAKERID =?, MAKERIPADDRESS =?, MAKERTIME =?, CHECKERBRANCH =?, CHECKERDATE =?, CHECKERID =?, CHECKERIPADDRESS =?, CHECKERTIME =?,INTERESTCODE =? where CURRENCYCODE= ? AND ACCOUNTNO=? ";
		try {
			Date eoddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(STORE_ACCOUNT_CROSSDATA, false, false);
			accountStmt =con.getStatementObject(UPDATE_BATCH_ACCOUNT,false,false);			
			if (argVector!=null && argVector.size()!=0){
				for(int i=0;i<argVector.size();i++){
					subsidiaryAccountWrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);
					wrapper = subsidiaryAccountWrapper.crossDataValidationWrapper;					
					stmt.setString(1, wrapper.crAccClsCode);
					stmt.setString(2, wrapper.drAccClsCode);
					stmt.setString(3, wrapper.unclAccClsCode);
					stmt.setString(4, wrapper.gsamAccClsCode);
					stmt.setString(5, wrapper.crProductCode);
					stmt.setString(6, wrapper.drProductCode);
					stmt.setString(7, wrapper.interestRtCls);
					stmt.setString(8, wrapper.billsLiquidity);
					stmt.setString(9, wrapper.stdCrProductCode);
					stmt.setString(10, wrapper.stdDrProductCode);
					stmt.setString(11, subsidiaryAccountWrapper.currencyCode);
					stmt.setString(12, subsidiaryAccountWrapper.accountNo);
					stmt.addBatch();

					if(subsidiaryAccountWrapper.makerDetail != null) {
						accountStmt.setString(1, subsidiaryAccountWrapper.makerDetail.getUserBranch());
						accountStmt.setDate(2, subsidiaryAccountWrapper.makerDetail.getUserDate());
						accountStmt.setString(3, subsidiaryAccountWrapper.makerDetail.getUserID());
						accountStmt.setString(4, subsidiaryAccountWrapper.makerDetail.getUserIPAddress());
						accountStmt.setTime(5, subsidiaryAccountWrapper.makerDetail.getUserTime());
					} else {
						accountStmt.setString(1, null);
						accountStmt.setDate(2, null);
						accountStmt.setString(3, null);
						accountStmt.setString(4, null);
						accountStmt.setTime(5, null);
					}
					if(subsidiaryAccountWrapper.checkerDetail != null) {
						accountStmt.setString(6, subsidiaryAccountWrapper.checkerDetail.getUserBranch());
						//setting eoddate to identify events
						//accountStmt.setDate(7, eoddate);
						accountStmt.setDate(7, subsidiaryAccountWrapper.checkerDetail.getUserDate());
						accountStmt.setString(8, subsidiaryAccountWrapper.checkerDetail.getUserID());
						accountStmt.setString(9, subsidiaryAccountWrapper.checkerDetail.getUserIPAddress());
						accountStmt.setTime(10, subsidiaryAccountWrapper.checkerDetail.getUserTime());
					} else {
						accountStmt.setString(6, null);
						//accountStmt.setDate(7, eoddate);
						accountStmt.setDate(7, null);
						accountStmt.setString(8, null);
						accountStmt.setString(9, null);
						accountStmt.setTime(10, null);
					}
					//Added by Anushree for Simco
					if(subsidiaryAccountWrapper.interestCode != null){
						out.println("INTCODE : " + subsidiaryAccountWrapper.interestCode);
						accountStmt.setString(11,subsidiaryAccountWrapper.interestCode);
					}
					else{
						accountStmt.setString(11, null);
					}
					accountStmt.setString(12, subsidiaryAccountWrapper.currencyCode);
					accountStmt.setString(13, subsidiaryAccountWrapper.accountNo);
					accountStmt.addBatch();
				}

				 int result[] = stmt.executeBatch();
				 out.printDebugMode("no of records updated in GLDATA : " + result.length);
                 result = accountStmt.executeBatch();
                 out.println("no of records updated in Account : " + result.length);

			}

		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				scb.util.LogWriter.getInstance().println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +subsidiaryAccountWrapper.currencyCode +":"+subsidiaryAccountWrapper.accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}

         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
//  Start --- Source added by Prakash N for E12 Upgrade -  Business Event Changes
	 public Enumeration findByAccountCategoryAndMaster(String masterNumber,String accountCategory) throws javax.ejb.FinderException  {

		   Vector resultVector = new Vector();
		   SQLExecutor con = null;
		   SQLStatementObject stmt = null;
		   SQLResultObject rs = null;
		   String curr = null;
		   String acc = null;

		   try {

			   con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			   stmt = con.getStatementObject(FIND_BY_ACCOUNTCATEGORY_MASTER, false, false);

			   stmt.setString(1,masterNumber);
			   stmt.setString(2,accountCategory);
			   rs = stmt.executeQuery();

			   while(rs.next()){
				   curr = null;
				   acc = null;
				   curr = rs.getString(1);
				   acc = rs.getString(2);
				   resultVector.addElement(curr);
				   resultVector.addElement(acc);
			   }
		  }catch (NamingException ne) {
			   ne.printStackTrace();
			   throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		  } catch (SQLExecuteException sqle) {
			   sqle.printStackTrace();
			   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
 	      } finally  {
			   try  {
				   if (rs != null) {
						rs.close();
					}
				   if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}
			   } catch	(SQLExecuteException sqle) {
				   sqle.printStackTrace();
				   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			   }
		   }
		   return resultVector.elements();
	}

//  End --- Source added by Prakash N for E12 Upgrade -  Business Event Changes
	 
     //	 Added by Satya Manohar for Simco DAUE LIMIT attachment check 
	 public boolean checkDAUELmtAttachment(String masterNo,String limitNo,String accNo)throws javax.ejb.FinderException
	 {
		 scb.util.LogWriter out = LogWriter.getInstance("EOD","checkDAUELmtAttachment","checkDAUELmtAttachment");
		 SQLExecutor con = null;
		 SQLStatementObject stmt = null;
		   SQLResultObject rs = null;
		   boolean daueAccount = false;
		   String accountNumber =accNo;
		   String FIND_DAUE_LMT_ATTACHMENT = "select ACCOUNTNO from account where DAUELMTMASTNO=? and DAUELMTNO=?";
		   out.println("IN checkDAUELmtAttachment"+masterNo+"LMTNO"+limitNo+"ACCNO"+accNo);
		   try {
			   con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			   stmt = con.getStatementObject(FIND_DAUE_LMT_ATTACHMENT, false, false);
			   stmt.setString(1,masterNo);
			   stmt.setString(2,limitNo);
			   rs = stmt.executeQuery();
			   if(rs.next())
			   {
				   out.println("Accountno==========="+accNo+"AND result"+rs.getString(1));
				  String acct=rs.getString(1);
				   if(!(accountNumber.trim().equals(acct.trim()))){
					   daueAccount = true;
				   }
				   
			   }
		   }  catch (NamingException ne) {
			   ne.printStackTrace();
			   throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		  }
		   catch (SQLExecuteException sqle) {
			   sqle.printStackTrace();
			   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
 	      } finally  {
			   try  {
				   if (rs != null) {
						rs.close();
					}
				   if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}
			   } catch	(SQLExecuteException sqle) {
				   sqle.printStackTrace();
				   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			   }
 	      }
		   
		   return daueAccount;
	 
}
	//Source added by Manickaraj for SIMCO

	 public boolean getAccountStatus(String accNo)throws javax.ejb.FinderException
	 {
		 scb.util.LogWriter out = LogWriter.getInstance("EOD","getAccountStatus","getAccountStatus");
		 SQLExecutor con = null;
		 SQLStatementObject stmt = null;
		 SQLResultObject rs = null;
		 boolean accountStatus = false;
		 String FIND_ACCOUNT_STATUS = "SELECT ACCOUNTNO FROM ACCOUNT WHERE ACCOUNTNO=? and STATUSFLAG<>14";
		 
		 try {
			   con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			   stmt = con.getStatementObject(FIND_ACCOUNT_STATUS, false, false);
			   stmt.setString(1,accNo);
			   rs = stmt.executeQuery();
			   if(rs.next())
			   {
				  out.println("Accountno==========="+accNo+"AND Result"+rs.getString(1));
				  accountStatus = true;				   
			   }
		   } catch (NamingException ne) {
			   ne.printStackTrace();
			   throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		  } catch (SQLExecuteException sqle) {
			   sqle.printStackTrace();
			   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
 	      } finally  {
			   try  {
				   if (rs != null) {
						rs.close();
					}
				   if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}
			   } catch	(SQLExecuteException sqle) {
				   sqle.printStackTrace();
				   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			   }
 	      }		   
		   return accountStatus;	 
}	 
	 
//	  End --- Source added by Prakash N for E12 Upgrade -  Business Event Changes
	 
	 public void updateBatchRefEntriesMarker(SubsidiaryAccountWrapper[] subAccountWrapperArray ) throws javax.ejb.CreateException{
			

			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			//scb.util.LogWriter out = new LogWriter("EOD","updateBatchRefEntriesMarker","updateBatchRefEntriesMarker");
			//out.printDebugMode("===========Batch updateBatchRefEntriesMarker===");
			String UPDATE_REF_ENRTRY = "UPDATE  ACCOUNT SET REFENTRIESMARKER=? WHERE CURRENCYCODE=? AND ACCOUNTNO=?";
			
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_REF_ENRTRY, false, false);
					for(int i=0;i<subAccountWrapperArray.length;i++){
						stmt.setString(1, Utility.getString(subAccountWrapperArray[i].refEntriesMarker));
						stmt.setString(2, subAccountWrapperArray[i].currencyCode);
						stmt.setString(3, subAccountWrapperArray[i].accountNo);
						stmt.addBatch();
					}

					 int result[] = stmt.executeBatch();
					 //out.printDebugMode("no of records updated in updateBatchRefEntriesMarker : " + result.length);
	                

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					scb.util.LogWriter.getInstance().println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +subAccountWrapperArray[i].currencyCode +":"+subAccountWrapperArray[i].accountNo);
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		
		 
	 }
	 
	 // Source added by Maria Prakash to check the IntradayLimitMasteno and IntardayLimitNo already attached to any account.
	 	public void checkAllAccountBYIntradayLimit(String argIntradayLimitMasterNo, String argIntradayLimitNo, String argCurrencyCode , String argAccountNo) throws javax.ejb.FinderException {

			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			SQLResultObject rs = null;
			
			String FIND_BY_INTRADAY_LIMIT =null;
			if(argAccountNo!=null)
			{
				FIND_BY_INTRADAY_LIMIT="select currencycode,accountno from account where intradaylmtmastno=? and intradaylmtno =? and currencycode = ? and accountno <> ? and STATUSFLAG <> ?";
			}else
			{
				FIND_BY_INTRADAY_LIMIT="select currencycode,accountno from account where intradaylmtmastno=? and intradaylmtno =? and currencycode = ? and STATUSFLAG <> ?";
			}
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

				stmt = con.getStatementObject(FIND_BY_INTRADAY_LIMIT, false, false);
				stmt.setString(1, argIntradayLimitMasterNo);
				stmt.setString(2, argIntradayLimitNo);
				stmt.setString(3, argCurrencyCode);
				if(argAccountNo!=null)
				{
					stmt.setString(4, argAccountNo);
					stmt.setShort(5, EBBSConstants.CLOSED);
				}
				else
				{
					stmt.setShort(4, EBBSConstants.CLOSED);
				}
				
				rs = stmt.executeQuery();

				if(rs.next()) {
					scb.util.LogWriter.getInstance().println(" For the IntradayLimitMasterNo and IntradayLimitNo is attached to" +
							" accounts in Main Entity Account" + argIntradayLimitMasterNo +argIntradayLimitNo);
				}
				else
				{
					throw new ObjectNotFoundException();
				}
			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			} finally {
				try {
					if (rs != null) {
						rs.close();
					}
					if (stmt != null) {
						stmt.close();
					}

					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		}

	 	// Code ends
	//Added By Deepak(1362723) For UK DAY 2. 
	public boolean isIntRateClassCodeInAccount(String intRateClassCode)
	{
		
			SQLExecutor con = null;
			SQLStatementObject pstmt = null;
			SQLResultObject resultSet = null;
			boolean records_found = false;
			int count = 0;
			try {
				con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
				pstmt = con.getStatementObject(SELECT_INT_RATE_CLASS_COUNT_SQL, false, false); 
				pstmt.setString(1, intRateClassCode);
				resultSet = pstmt.executeQuery();
				
				if (resultSet.next()) {
					count = resultSet.getInt(1);
					if(count > 0){
						records_found = true;
					}
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
			} catch (NamingException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			} finally {
				  try {
					if (resultSet != null) {
						resultSet.close();
					}
					if (pstmt != null) {
						pstmt.close();
					}
					if (con != null) {
						con.destroy();
					}
				  } catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);

						
				  }
			}
			return records_found;
		}

	public boolean isBillsLiqInAccount(String billsLiq)
	{
		
			SQLExecutor con = null;
			SQLStatementObject pstmt = null;
			SQLResultObject resultSet = null;
			boolean records_found = false;
			int count = 0;
			try {
				con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
				pstmt = con.getStatementObject(SELECT_BILLS_LIQ_COUNT_SQL, false, false); 
				pstmt.setString(1, billsLiq);
				resultSet = pstmt.executeQuery();
				
				if (resultSet.next()) {
					count = resultSet.getInt(1);
					if(count > 0){
						records_found = true;
					}
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
			} catch (NamingException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			} finally {
				  try {
					if (resultSet != null) {
						resultSet.close();
					}
					if (pstmt != null) {
						pstmt.close();
					}
					if (con != null) {
						con.destroy();
					}
				  } catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);

						
				  }
			}
			return records_found;
		}
    
	public boolean isStdCrCodeInAccount(String stdCrCode)
	{
		
			SQLExecutor con = null;
			SQLStatementObject pstmt = null;
			SQLResultObject resultSet = null;
			boolean records_found = false;
			int count = 0;
			try {
				con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
				pstmt = con.getStatementObject(SELECT_STD_CR_COUNT_SQL, false, false); 
				pstmt.setString(1, stdCrCode);
				resultSet = pstmt.executeQuery();
				
				if (resultSet.next()) {
					count = resultSet.getInt(1);
					if(count > 0){
						records_found = true;
					}
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
			} catch (NamingException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			} finally {
				  try {
					if (resultSet != null) {
						resultSet.close();
					}
					if (pstmt != null) {
						pstmt.close();
					}
					if (con != null) {
						con.destroy();
					}
				  } catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);

						
				  }
			}
			return records_found;
		}

	public boolean isStdDrCodeInAccount(String stdDrCode)
	{
		
			SQLExecutor con = null;
			SQLStatementObject pstmt = null;
			SQLResultObject resultSet = null;
			boolean records_found = false;
			int count = 0;
			try {
				con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
				pstmt = con.getStatementObject(SELECT_STD_DR_COUNT_SQL, false, false); 
				pstmt.setString(1, stdDrCode);
				resultSet = pstmt.executeQuery();
				
				if (resultSet.next()) {
					count = resultSet.getInt(1);
					if(count > 0){
						records_found = true;
					}
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
			} catch (NamingException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			} finally {
				  try {
					if (resultSet != null) {
						resultSet.close();
					}
					if (pstmt != null) {
						pstmt.close();
					}
					if (con != null) {
						con.destroy();
					}
				  } catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);

						
				  }
			}
			return records_found;
		}

	public boolean isIntrestCodeInAccount(String intrestCode)
	{
		
			SQLExecutor con = null;
			SQLStatementObject pstmt = null;
			SQLResultObject resultSet = null;
			boolean records_found = false;
			int count = 0;
			try {
				con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
				pstmt = con.getStatementObject(SELECT_INT_CODE_COUNT_SQL, false, false); 
				pstmt.setString(1, intrestCode);
				resultSet = pstmt.executeQuery();
				
				if (resultSet.next()) {
					count = resultSet.getInt(1);
					if(count > 0){
						records_found = true;
					}
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
			} catch (NamingException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);
			} finally {
				  try {
					if (resultSet != null) {
						resultSet.close();
					}
					if (pstmt != null) {
						pstmt.close();
					}
					if (con != null) {
						con.destroy();
					}
				  } catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);

						
				  }
			}
			return records_found;
		}
    //end

	//Added by 1400117 ( Nischitha Hegde) for UK Day2 R2 
	public boolean isCreditProductCodeexistinAccount(String crproductcode) throws SCBApplicationException, scb.exception.SCBApplicationException{

		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
        boolean records_found = false;
        int count = 0;
		boolean isCreditProductCodeexistinAccount=false;

		try
		{     
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_CREDITPRODUCTCODE, false, false);
			ps.setString(1, crproductcode);
			rs=ps.executeQuery();
			if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                        
                isCreditProductCodeexistinAccount=true;
                }
    }
	
		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isCreditProductCodeexistinAccount;    
	}

	
	
	
	public boolean isDebitProductCodeexistinAccount(String drproductcode) throws SCBApplicationException{

		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
        boolean records_found = false;
        int count = 0;
		boolean isDebitProductCodeexistinAccount=false;

		try
		{     
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_DEBITPRODUCTCODE, false, false);
			ps.setString(1, drproductcode);
			rs=ps.executeQuery();
			if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                          
                isDebitProductCodeexistinAccount=true;
                }
    }
	
		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isDebitProductCodeexistinAccount;    
	}
	
	public boolean isBusinessUnitexistinAccount(String businessunit)throws SCBApplicationException{
	      // TODO Auto-generated method stub
	      SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
      
      boolean records_found = false;
      int count = 0;

	      boolean isBusinessUnitexistinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_BUSINESSUNIT, false, false);
	            ps.setString(1, businessunit);
	            rs=ps.executeQuery();
	           
            if (rs.next()) {
                        count = rs.getInt(1);
                        if(count > 0){
                      	  isBusinessUnitexistinAccount=true;
                        }
            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isBusinessUnitexistinAccount;
	
	}

public boolean isOperatingUnitexistinAccount(String operatingunit)throws SCBApplicationException{
	      // TODO Auto-generated method stub
	      SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
            boolean records_found = false;
            int count = 0;

	      boolean isOperatingUnitexistinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_OPERATINGUNIT, false, false);
	            ps.setString(1, operatingunit);
	            rs=ps.executeQuery();
	           
          if (rs.next()) {
                      count = rs.getInt(1);
                      if(count > 0){
                      	isOperatingUnitexistinAccount=true;
                      }
          }
	            
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	       return isOperatingUnitexistinAccount;
	
	}



public boolean isInvestmentPurposeexistinAccount(String investmentpurpose)throws SCBApplicationException{
	      // TODO Auto-generated method stub
	      SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
            boolean records_found = false;
            int count = 0;

	      boolean isInvestmentPurposeexistinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_INVESTMENTPURPOSE, false, false);
	            ps.setString(1, investmentpurpose);
	            rs=ps.executeQuery();
	            
        if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                  	  isInvestmentPurposeexistinAccount=true;
                    }
        }

	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isInvestmentPurposeexistinAccount;
	
	}
//end
//Added by Vikash Srivastava(1400112) for UK Day2
	
	
	public boolean isBranchCodeinAccount(String branchCode)throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;

		SQLStatementObject ps1= null;
		
		SQLResultObject rs = null;
		boolean isBranchCodeExist=false;
		int count = 0;
		
		try
		{	
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps1= con.getStatementObject(SELECT_BRANCHCODE_COUNT_SQL, false, false);// query need to b changed
			ps1.setString(1, branchCode);
			rs = ps1.executeQuery();
		
			if (rs.next()) {
	            count = rs.getInt(1);
	            if(count > 0){
	            	isBranchCodeExist = true;
	            }
	}

			
			ps1.close();
		
		}  catch (SQLExecuteException se) {
			 scb.util.LogWriter.getInstance().printErrorMessage(se);
			 throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			 scb.util.LogWriter.getInstance().printErrorMessage(ne);
			 throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
	        try {
	                  if (rs != null) {
	                              rs.close();
	                  }
	                  if (ps1 != null) {
	                              ps1.close();
	                  }
	                  if (con != null) {
	                              con.destroy();
	                  }
	        } catch (SQLExecuteException e) {
	                              scb.util.LogWriter.getInstance().printErrorMessage(e);

	                              
	        }
	}

		return isBranchCodeExist;
	}
	
	
	public boolean isSegmentCodeinAccount(String segmentCode)throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
		SQLStatementObject ps1= null;
		SQLResultObject rs = null;
		boolean isSegmentCodeExist=false;
		int count = 0;
		try
		{	
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps1= con.getStatementObject(SELECT_SEGMENTCODE_COUNT_SQL, false, false);// query need to b changed
			ps1.setString(1, segmentCode);
			rs = ps1.executeQuery();
		
			if (rs.next()) {
	            count = rs.getInt(1);
	            if(count > 0){
	            	isSegmentCodeExist = true;
	            }
	}

			
			ps1.close();
		
		}  catch (SQLExecuteException se) {
			 scb.util.LogWriter.getInstance().printErrorMessage(se);
			 throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			 scb.util.LogWriter.getInstance().printErrorMessage(ne);
			 throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
	        try {
	                  if (rs != null) {
	                              rs.close();
	                  }
	                  if (ps1 != null) {
	                              ps1.close();
	                  }
	                  if (con != null) {
	                              con.destroy();
	                  }
	        } catch (SQLExecuteException e) {
	                              scb.util.LogWriter.getInstance().printErrorMessage(e);

	                              
	        }
	}

		return isSegmentCodeExist;
	}

	
	public boolean isCurrencyLinkCodeinAccount(String currencyLinkCode)throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
		SQLStatementObject ps1= null;
		SQLResultObject rs = null;
		boolean iscurrencyLinkCodeExist=false;
		int count = 0;
		try
		{	
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps1= con.getStatementObject(SELECT_CURRENCYCODE_COUNT_SQL, false, false);// query need to b changed
			ps1.setString(1, currencyLinkCode);
			rs = ps1.executeQuery();
		
			if (rs.next()) {
	            count = rs.getInt(1);
	            if(count > 0){
	            	iscurrencyLinkCodeExist = true;
	            }
	}

			
			ps1.close();
		
		}  catch (SQLExecuteException se) {
			 scb.util.LogWriter.getInstance().printErrorMessage(se);
			 throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			 scb.util.LogWriter.getInstance().printErrorMessage(ne);
			 throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
	        try {
	                  if (rs != null) {
	                              rs.close();
	                  }
	                  if (ps1 != null) {
	                              ps1.close();
	                  }
	                  if (con != null) {
	                              con.destroy();
	                  }
	        } catch (SQLExecuteException e) {
	                              scb.util.LogWriter.getInstance().printErrorMessage(e);

	                              
	        }
	}

		return iscurrencyLinkCodeExist;
	}
	//end
	
	
	//Added by Prakash to check whether the Accountclassification code exist in Account,Master or Deal table or not||| 21-April-2011

	public boolean isAccountclassificationexistinAccount(String ACFcode) throws SCBApplicationException{

		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
        boolean records_found = false;
        int count = 0;
		boolean isAccountclassificationexistinAccount=false;

		try
		{     
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_ACCOUNTCLASSIFICATION_SQL, false, false);
			ps.setString(1, ACFcode);
			rs=ps.executeQuery();
			if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                         
                	isAccountclassificationexistinAccount=true;		 //records found 
                }
    }

		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isAccountclassificationexistinAccount;    
	}
	

	public boolean isCurrencyCodeexistinAccount(String currencycode) throws SCBApplicationException{

		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
        boolean records_found = false;
        int count = 0;
		boolean isCurrencyCodeexistinAccount=false;

		try
		{     
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_CURRENCYCODE_SQL, false, false);
			ps.setString(1, currencycode);
			rs=ps.executeQuery();
			if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                         
                isCurrencyCodeexistinAccount=true;		 //records found
                }
    }
	

		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isCurrencyCodeexistinAccount;    
	}


	

	public boolean isProductCodeexistinAccount(String productcode) throws SCBApplicationException{

		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
        boolean records_found = false;
        int count = 0;
		boolean isProductCodeexistinAccount=false;

		try
		{     
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_PRODUCTCODEACC_SQL, false, false);	//Query code needs to be change here
			ps.setString(1, productcode);
			rs=ps.executeQuery();
			if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                         
                	isProductCodeexistinAccount=true;		 //records found 
                }
    }

		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isProductCodeexistinAccount;    
	}


	
	//Added by 1400113(Sushil Kumar) for UK Day2 R2
	public boolean isGlDepartmentIDInAccount(String glDepartmentID) throws scb.exception.SCBApplicationException{
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
		boolean isGlDepartmentIDInAccount=false;

		try
		{
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			//SELECT COUNT(*) from Account WHERE GLDEPTID=?
			ps= con.getStatementObject(SELECT_GLDEPARTMENTID_SQL, false, false);
			ps.setString(1, glDepartmentID);
			rs=ps.executeQuery();
			int count = 0;
            if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                	isGlDepartmentIDInAccount = true;
                }
            }


		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isGlDepartmentIDInAccount;
	}

	
	public boolean isTaxCodeInAccount(String taxCategoryCode
 )throws scb.exception.SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
		boolean isTaxCodeInAccount=false;

		try
		{
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			//select COUNT(*) from ACCOUNT WHERE TAXCTGCODE=? AND CURRENCYCODE=?
			ps= con.getStatementObject(SELECT_TAXCODE_SQL, false, false);
			ps.setString(1, taxCategoryCode);
			
			rs=ps.executeQuery();
			int count = 0;
            if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                	isTaxCodeInAccount = true;
                }
            }


		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isTaxCodeInAccount;
	}

	
	public boolean isCrossDataValidationInAccount(String productCode,String customerType) throws scb.exception.SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
		SQLStatementObject ps= null;
		SQLResultObject rs = null;
		boolean isCrossDataValidationInAccount=false;

		try
		{
			con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			ps= con.getStatementObject(SELECT_CROSSDATAVALIDATION_SQL, false, false);
			ps.setString(1, productCode);
			ps.setString(2, customerType);
			rs=ps.executeQuery();
			int count = 0;
            if (rs.next()) {
                count = rs.getInt(1);
                if(count > 0){
                	isCrossDataValidationInAccount = true;
                }
            }


		}  catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		}catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
			throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
		}

		finally {
			try {
				if(ps!=null) {
					ps.close();
				}
				if(rs!=null) {
					rs.close();
				}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
			}

		}
		return isCrossDataValidationInAccount;
}
	//END by 1400113(Sushil Kumar)

	//Added by Mayank Sinha 1386551 for UK Day2 R2
	public boolean isPriorYearClrMapinAccount(String prioryrclrmap) throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
	      boolean isPriorYearClrMapinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_PRIORYEARMAP_SQL, false, false);
	            ps.setString(1, prioryrclrmap);
	            rs=ps.executeQuery();
	            int count=0;
	            if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                    	isPriorYearClrMapinAccount = true;
                    }

	            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isPriorYearClrMapinAccount;    

	}
	
	public boolean isTaxctgcodeinAccount(String taxctgcode) throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
	      boolean isTaxctgcodeinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_TAXCTGCODE_SQL, false, false);
	            ps.setString(1, taxctgcode);
	            rs=ps.executeQuery();
	            int count=0;
	            if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                        isTaxctgcodeinAccount = true;
                    }

	            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isTaxctgcodeinAccount;    

	}
	
	public boolean isTaxcodeinAccount(String taxcode) throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
	      boolean isTaxcodeinAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject("", false, false);
	            ps.setString(1, taxcode);
	            rs=ps.executeQuery();
	            int count=0;
	            if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                        isTaxcodeinAccount = true;
                    }

	            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isTaxcodeinAccount;    

	}
	public boolean isGLDeptMappinginAccount(String gldeptcode, String brn, String seg, String busunit, String operunit) throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
	      boolean isGLDeptMappinginAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_GLDEPTMAP_SQL, false, false);
	            ps.setString(1, operunit);
	            ps.setString(2, busunit);
	            ps.setString(3, gldeptcode);
	            ps.setString(4, seg);
	            ps.setString(5, brn);
	            rs=ps.executeQuery();
	            int count=0;
	            if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                    	isGLDeptMappinginAccount = true;
                    }
	            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isGLDeptMappinginAccount;    

	}
	
//Adde By Sushil
	
	public boolean isPALAccount(String accountNo) throws SCBApplicationException {
		// TODO Auto-generated method stub
		SQLExecutor  con= null;
	      SQLStatementObject ps= null;
	      SQLResultObject rs = null;
	      boolean isPALAccount=false;

	      try
	      {     
	            con= SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
	            ps= con.getStatementObject(SELECT_ISPALACCOUNT_SQL, false, false);
	            ps.setString(1, accountNo);
	            
	            rs=ps.executeQuery();
	            int count=0;
	            if (rs.next()) {
                    count = rs.getInt(1);
                    if(count > 0){
                    	isPALAccount = true;
                    }
	            }
	      }  catch (SQLExecuteException se) {
	             scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
	      }catch (NamingException ne) {
	             scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16 reengineering
	             throw new scb.exception.SCBApplicationException(EBBSConstants.NAMING_EXCEPTION);
	      }
	      
	      finally {
	                  try {
	                        if(ps!=null) {
								ps.close();
							}
	                        if(rs!=null) {
								rs.close();
							}
//changed by 1229831 ,Reason:sonar critical issue
if(con != null) { 
 con.destroy();
}
	                  } catch (SQLExecuteException se) {
	                         scb.util.LogWriter.getInstance().printErrorMessage(se);// //- F16 reengineering
	                  }

	            }
	return isPALAccount;    

	}
	public void updateBatchforAccountInfoType(Vector argVector) throws CreateException {

		SubsidiaryAccountWrapper wrapper = null;;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		LogWriter out = LogWriter.getInstance("SubsidiaryAccountHelper", "updateBatchforAccountType", "updateBatchforAccountType");
		SQLStatementObject accountStmt = null;

		try {
			Date eodddate=getEODDate();
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_ACCINFOTYPE, false, false);
			String UPDATE_ACCOUNT = "UPDATE ACCOUNT SET  MAKERBRANCH = ?, MAKERDATE =?, MAKERID =?, MAKERIPADDRESS =?, MAKERTIME =?, CHECKERBRANCH =?, CHECKERDATE =?, CHECKERID =?, CHECKERIPADDRESS =?, CHECKERTIME =? where CURRENCYCODE= ? AND ACCOUNTNO=? ";
			
			accountStmt  = con.getStatementObject(UPDATE_ACCOUNT, false, false);

			if (argVector != null && argVector.size() != 0) {
				for (int i = 0; i < argVector.size(); i++) {
					wrapper = (SubsidiaryAccountWrapper) argVector.elementAt(i);
					
					for(int j=0; j < wrapper.accountInfoTypeWrapper.length;j++){
						if( wrapper.accountInfoTypeWrapper[j].recordStatus == EBBSConstants.MODIFIED){
							stmt.setString(1, wrapper.accountInfoTypeWrapper[j].misCode);
							stmt.setString(2, wrapper.accountInfoTypeWrapper[j].misValue);
							stmt.setString(3, wrapper.accountNo);
							stmt.setString(4, wrapper.currencyCode);
							stmt.setString(5, wrapper.accountInfoTypeWrapper[j].seqNo);
							stmt.addBatch();
						}	
					}
					
					if (wrapper.makerDetail != null) {
						accountStmt.setString(1, wrapper.makerDetail.getUserBranch());
						accountStmt.setDate(2, wrapper.makerDetail.getUserDate());
						accountStmt.setString(3, wrapper.makerDetail.getUserID());
						accountStmt.setString(4, wrapper.makerDetail.getUserIPAddress());
						accountStmt.setTime(5, wrapper.makerDetail.getUserTime());
					} else {
						accountStmt.setString(1, null);
						accountStmt.setDate(2, null);
						accountStmt.setString(3, null);
						accountStmt.setString(4, null);
						accountStmt.setTime(5, null);
					}
					if (wrapper.checkerDetail != null) {
						accountStmt.setString(6, wrapper.checkerDetail.getUserBranch());
						//setting eoddate to identify events on incremental basis
						//accountStmt.setDate(7, eodddate);
						accountStmt.setDate(7, wrapper.checkerDetail.getUserDate());
						accountStmt.setString(8, wrapper.checkerDetail.getUserID());
						accountStmt.setString(9, wrapper.checkerDetail.getUserIPAddress());
						accountStmt.setTime(10, wrapper.checkerDetail.getUserTime());
					} else {
						accountStmt.setString(6, null);
						//accountStmt.setDate(7, eodddate);
						accountStmt.setDate(7, null);
						accountStmt.setString(8, null);
						accountStmt.setString(9, null);
						accountStmt.setTime(10, null);
					}

					accountStmt.setString(11, wrapper.currencyCode);
					accountStmt.setString(12, wrapper.accountNo);
					accountStmt.addBatch();
					accountStmt.clearParameters();
				}

				int result[] = stmt.executeBatch();
				int account_result1[] = accountStmt.executeBatch();

				stmt.clearBatch();
				accountStmt.clearBatch();
			}

		} catch (BatchUpdateException b) {
			out.printErrorMessage(b);
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				out.println("Problem in Batch number " + i + ":" + updateCounts[i] + " " + wrapper.currencyCode + ":" + wrapper.accountNo);
			}
			throw new CreateException(b.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + b.getMessage());

		} catch (NamingException ne) {
			out.printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			out.printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (accountStmt != null) {
					accountStmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				out.printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	// Added by Arun for max accounts of limits
	
	public Enumeration findAccountsByProductCode(String relationshipNo,String productCode) throws javax.ejb.FinderException
	{
	   Vector resultVector = new Vector();
	   SQLExecutor con = null;
	   SQLStatementObject stmt = null;
	   SQLResultObject rs = null;

	   try {

		   con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
		   stmt = con.getStatementObject(SELECT_FIND_PRODUCTCODE, false, false); 

		   stmt.setString(1,relationshipNo);
		   stmt.setString(2,productCode);
		   rs = stmt.executeQuery(); 

		   while(rs.next()){
			   resultVector.addElement(rs.getString(1).trim()+rs.getString(2).trim());
		   }
		   
		   scb.util.LogWriter.getInstance().println("Vector Size ::::: >>>>> "+ resultVector.size());
		   
	  }catch (NamingException ne) {
		   ne.printStackTrace();
		   throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

	  } catch (SQLExecuteException sqle) {
		   sqle.printStackTrace();
		   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
    } finally  {
		   try  {
			   if (rs != null) {
					rs.close();
				}
			   if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
		   } catch	(SQLExecuteException sqle) {
			   sqle.printStackTrace();
			   throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
		   }
	   }
	   return resultVector.elements();

	}
	//End by arun
	//added for 10000702_SG_TSD_Auto Account Creation.doc
	/**
	 * isAccountAvailable method returns true if account available, else return false
	 * @param masterNo
	 * @param currencyCode
	 * @param productCode
	 * @return
	 * @throws EJBException
	 */
	
	public boolean isAccountAvailable(String masterNo, String currencyCode, String productCode) throws EJBException {
		SQLExecutor sqlCon = null;
		SQLStatementObject sqlStmt = null;
		SQLResultObject sqlRs = null;
		String SELECT_ACCOUNT = "EBACC05553SY";
		try{
			sqlCon = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			sqlStmt = sqlCon.getStatementObject(SELECT_ACCOUNT, false, false);
			sqlStmt.setString(1,masterNo);
			sqlStmt.setString(2, currencyCode);
			sqlStmt.setString(3, productCode);
			//System.out.println(" =========> Is A/c available :: "+SELECT_ACCOUNT); 
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
		
		} catch (SQLExecuteException e) {
			e.printStackTrace();
			throw new EJBException(e.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+e.getMessage());
		} catch (NamingException e) {
			e.printStackTrace();
			throw new EJBException("Error in isAccountAvailable() method "+e.getMessage());
		}finally {
			try {
				if (sqlRs != null) {
					sqlRs.close();
				}
				if(sqlStmt != null){
					sqlStmt.close();
				}
				if (sqlCon != null) {
					sqlCon.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			}
		}
		return false;
	}
	//End of 10000702_SG_TSD_Auto Account Creation
	
	/*
	 * MCCS 20151230
	 * FS Document: RMS-MY-8310459-001-101_ALL_ISD_MCCS Debit Cardv1 3_MY
	 * TS Document : 8310459-001-101_MY_TSD_MCCS_V2 0
	 */
	public String findProductCodeByAccount(String accountNo, String currencyCode) throws javax.ejb.FinderException {

		SQLExecutor con = null;
		SubsidiaryAccountWrapper wrapper = null;
		SubsidiaryAccountEntityKey resultKey = null;
		String productCode = null;
		
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_PRODUCT_CODE, false, false);
			stmt.setString(1, currencyCode);
			stmt.setString(2, accountNo);
			rs = stmt.executeQuery();

			if (rs.next()) {
				
				productCode = rs.getString(1);
				
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}

		return productCode;

	}	
		
//Added by Meena(1584265) for Egold migration
	private void createTxnAccount(SubsidiaryAccountWrapper wrapper) throws javax.ejb.CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLStatementObject stmt1 = null;
		SQLResultObject rs = null;
		SQLResultObject rs1 = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if(wrapper.accountType == '\u0000') {
	//Loading AccountType from MAST
				stmt1 = con.getStatementObject(FIND_BY_PRIMARYKEY_FOR_ACCTTYPE, false, false);
				stmt1.setString(1, wrapper.masterNo);
				rs = stmt1.executeQuery();
				if (rs.next()) {
					wrapper.accountType = Utility.getChar(rs.getString(1));
				}
			}
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_TXNACCOUNTS, false, false);
			stmt.setString(1, wrapper.currencyCode);
			stmt.setString(2, wrapper.accountNo);
			stmt.setString(3, wrapper.productCode);
			stmt.setString(4, wrapper.masterNo);
			stmt.setString(5, wrapper.accountBranch);
			stmt.setString(6, wrapper.glDepartmentID);
			stmt.setString(7, Utility.getString(wrapper.accountCategory));
			stmt.setString(8, wrapper.daueLimitMasterNo);
			stmt.setString(9, wrapper.daueLimitNo);
			stmt.setString(10, Utility.getString(wrapper.bulkChargesFlag));
			stmt.setString(11, Utility.getString(wrapper.refEntriesMarker));
			stmt.setString(12, Utility.getString(wrapper.bulkingTranactionFlag));
			stmt.setString(13, Utility.getString(wrapper.provisionStatusFlag));
			stmt.setString(14, Utility.getString(wrapper.selfReconcileTypeFlag));
			stmt.setString(15, Utility.getString(wrapper.impairmentflag));
			stmt.setString(16, Utility.getString(wrapper.suspendProvision));
			stmt.setInt(17, wrapper.statusFlag);
			stmt.setString(18, wrapper.vatCtgCode);
			stmt.setString(19, Utility.getString(wrapper.accountCurrentStatus));
			stmt.setString(20, wrapper.accountClassCode);
			stmt.setString(21, wrapper.limitMasterNo);
			stmt.setString(22, wrapper.limitNo);
			stmt.setString(23, wrapper.mirrorTrnAccNo);
			stmt.setString(24, wrapper.mirrorTrnCurr);
			stmt.setString(25, wrapper.segmentCode);
			stmt.setString(26, Utility.getString(wrapper.accountType));
			stmt.setString(27, Utility.getString(wrapper.multipleLimits));
			stmt.setString(28, Utility.removeNonPrintableAndLinefeed(wrapper.accountTitle));
			stmt.setString(29, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
			stmt.setDate(30, wrapper.accountOpenDate);
			if (stmt.executeUpdate() != 1) {
				throw new CreateException();
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		}
		finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (stmt1 != null) {
					stmt1.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	private void updateTxnAccount(SubsidiaryAccountWrapper wrapper) throws CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLStatementObject stmt1 = null;
		SQLResultObject rs = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt1 = con.getStatementObject(FIND_BY_PRIMARYKEY_FOR_ACCTTYPE, false, false);
			stmt1.setString(1,wrapper.masterNo);
			rs = stmt1.executeQuery();
			if (rs.next()) {
				wrapper.accountType = Utility.getChar(rs.getString(1));
			}
			stmt = con.getStatementObject(UPDATE_TXNACCOUNTS, false, false);
			stmt.setString(1, wrapper.productCode);
			stmt.setString(2, wrapper.masterNo);
			stmt.setString(3, wrapper.accountBranch);
			stmt.setString(4, wrapper.glDepartmentID);
			stmt.setString(5, Utility.getString(wrapper.accountCategory));
			stmt.setString(6, wrapper.daueLimitMasterNo);
			stmt.setString(7, wrapper.daueLimitNo);
			stmt.setString(8, Utility.getString(wrapper.bulkChargesFlag));
			stmt.setString(9, Utility.getString(wrapper.refEntriesMarker));
			stmt.setString(10, Utility.getString(wrapper.bulkingTranactionFlag));
			stmt.setString(11, Utility.getString(wrapper.provisionStatusFlag));
			stmt.setString(12, Utility.getString(wrapper.selfReconcileTypeFlag));
			stmt.setString(13, Utility.getString(wrapper.impairmentflag));
			stmt.setString(14, Utility.getString(wrapper.suspendProvision));
			stmt.setInt(15, wrapper.statusFlag);
			stmt.setString(16, wrapper.vatCtgCode);
			stmt.setString(17, Utility.getString(wrapper.accountCurrentStatus));
			stmt.setString(18, wrapper.accountClassCode);
			stmt.setString(19, wrapper.limitMasterNo);
			stmt.setString(20, wrapper.limitNo);
			stmt.setString(21, wrapper.mirrorTrnAccNo);
			stmt.setString(22, wrapper.mirrorTrnCurr);
			stmt.setString(23, wrapper.segmentCode);
			stmt.setString(24, Utility.getString(wrapper.accountType));
			stmt.setString(25, Utility.getString(wrapper.multipleLimits));
			stmt.setString(26, Utility.removeNonPrintableAndLinefeed(wrapper.accountTitle));
			stmt.setString(27, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
			stmt.setDate(28, wrapper.accountOpenDate);
			stmt.setString(29, wrapper.currencyCode);
			stmt.setString(30, wrapper.accountNo);
			if (stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (stmt1 != null) {
					stmt1.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	private void removeTxnAccount(SubsidiaryAccountEntityKey argKey) throws javax.ejb.RemoveException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		try {			
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_TXNACCOUNT, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.executeUpdate();
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	private scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper LoadTxnAccounts(String argCurrencyCode,String argAccountNo) throws javax.ejb.FinderException, SQLExecuteException {
		SQLExecutor con = null;
		SubsidiaryAccountWrapper subsidiaryAccountWrapper = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(SELECT_TXNACCOUNT, false, false);
			stmt.setString(1, argCurrencyCode);
			stmt.setString(2, argAccountNo);
			rs = stmt.executeQuery();
			if (rs.next()) {
				int i = 1;
				subsidiaryAccountWrapper = new SubsidiaryAccountWrapper();
				subsidiaryAccountWrapper.currencyCode = rs.getString(i++);
				subsidiaryAccountWrapper.accountNo = rs.getString(i++);
				subsidiaryAccountWrapper.productCode = rs.getString(i++);
				subsidiaryAccountWrapper.masterNo = rs.getString(i++);
				subsidiaryAccountWrapper.accountBranch = rs.getString(i++);
				subsidiaryAccountWrapper.glDepartmentID = rs.getString(i++);
				subsidiaryAccountWrapper.accountCategory = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.daueLimitMasterNo = rs.getString(i++);
				subsidiaryAccountWrapper.daueLimitNo = rs.getString(i++);
				subsidiaryAccountWrapper.bulkChargesFlag = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.refEntriesMarker = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.bulkingTranactionFlag = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.provisionStatusFlag = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.selfReconcileTypeFlag = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.impairmentflag = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.suspendProvision = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.statusFlag = rs.getShort(i++);
				subsidiaryAccountWrapper.vatCtgCode = rs.getString(i++);
				subsidiaryAccountWrapper.accountCurrentStatus = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.accountClassCode = rs.getString(i++);
				subsidiaryAccountWrapper.limitMasterNo = rs.getString(i++);
				subsidiaryAccountWrapper.limitNo = rs.getString(i++);
				subsidiaryAccountWrapper.mirrorTrnAccNo = rs.getString(i++);
				subsidiaryAccountWrapper.mirrorTrnCurr = rs.getString(i++);
				subsidiaryAccountWrapper.segmentCode = rs.getString(i++);
				subsidiaryAccountWrapper.accountType = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.multipleLimits = Utility.getChar(rs.getString(i++));
				subsidiaryAccountWrapper.accountTitle = rs.getString(i++);
				subsidiaryAccountWrapper.shortName = rs.getString(i++);
				subsidiaryAccountWrapper.accountOpenDate = rs.getDate(i++);
			} 
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			
			if (rs != null) {
				rs.close();
			}
			if (stmt != null) {
				stmt.close();
			}
			// end
			if (con != null) {
				con.destroy();
			}
			}
				return subsidiaryAccountWrapper;
			
	}
//Yaaser lean acc implementation
	private boolean enableLeanAccount() {
		boolean returnValue = false;
        AbstractWrapper[] abstractWrapper1 = null;
        try {
			abstractWrapper1 = BusinessProcessParamCache.getInstance().getProcessParameters("TXNPOSTSETUPS");
		} catch (SCBApplicationException e) {
			}
        TxnPostingSetupBusinessParamWrapper txnPostingSetupBusinessParamWrapper = null;
        if (abstractWrapper1 != null && abstractWrapper1.length > 0) {
               txnPostingSetupBusinessParamWrapper = (TxnPostingSetupBusinessParamWrapper) abstractWrapper1[0];
        }
		if (txnPostingSetupBusinessParamWrapper != null && txnPostingSetupBusinessParamWrapper.useLeanAccountTable.equals("Y")) {
			returnValue = true;
		}
		scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## enableLeanAccount() ## returnValue :"+returnValue);
		return returnValue;
	}
	//Yaaser lean acc implementation
	private boolean isDataChangedInTxnAccounts(SubsidiaryAccountWrapper newWRap , SubsidiaryAccountWrapper oldWrap) {
		//boolean returnValue = false;
		if(newWRap!=null && oldWrap !=null) {
			if((newWRap.productCode!=null && oldWrap.productCode ==null) || (newWRap.productCode==null && oldWrap.productCode !=null) || (newWRap.productCode!=null && oldWrap.productCode !=null && !newWRap.productCode.equalsIgnoreCase(oldWrap.productCode))) {
				return true;
			}
			if((newWRap.masterNo!=null && oldWrap.masterNo ==null) || (newWRap.masterNo==null && oldWrap.masterNo !=null) || (newWRap.masterNo!=null && oldWrap.masterNo !=null && !newWRap.masterNo.equalsIgnoreCase(oldWrap.masterNo))) {
				return true;
			}
			if((newWRap.accountBranch!=null && oldWrap.accountBranch ==null) || (newWRap.accountBranch==null && oldWrap.accountBranch !=null) || (newWRap.accountBranch!=null && oldWrap.accountBranch !=null && !newWRap.accountBranch.equalsIgnoreCase(oldWrap.accountBranch))) {
				return true;
			}
			if((newWRap.glDepartmentID!=null && oldWrap.glDepartmentID ==null) || (newWRap.glDepartmentID==null && oldWrap.glDepartmentID !=null) || (newWRap.glDepartmentID!=null && oldWrap.glDepartmentID !=null && !newWRap.glDepartmentID.equalsIgnoreCase(oldWrap.glDepartmentID))) {
				return true;
			}
			if((newWRap.daueLimitMasterNo!=null && oldWrap.daueLimitMasterNo ==null) || (newWRap.daueLimitMasterNo==null && oldWrap.daueLimitMasterNo !=null) || (newWRap.daueLimitMasterNo!=null && oldWrap.daueLimitMasterNo !=null && !newWRap.daueLimitMasterNo.equalsIgnoreCase(oldWrap.daueLimitMasterNo))) {
				return true;
			}
			if((newWRap.daueLimitNo!=null && oldWrap.daueLimitNo ==null) || (newWRap.daueLimitNo==null && oldWrap.daueLimitNo !=null) || (newWRap.daueLimitNo!=null && oldWrap.daueLimitNo !=null && !newWRap.daueLimitNo.equalsIgnoreCase(oldWrap.daueLimitNo))) {
				return true;
			}
			if((newWRap.vatCtgCode!=null && oldWrap.vatCtgCode ==null) || (newWRap.vatCtgCode==null && oldWrap.vatCtgCode !=null) || (newWRap.vatCtgCode!=null && oldWrap.vatCtgCode !=null && !newWRap.vatCtgCode.equalsIgnoreCase(oldWrap.vatCtgCode))) {
				return true;
			}
			if((newWRap.accountClassCode!=null && oldWrap.accountClassCode ==null) || (newWRap.accountClassCode==null && oldWrap.accountClassCode !=null) || (newWRap.accountClassCode!=null && oldWrap.accountClassCode !=null && !newWRap.accountClassCode.equalsIgnoreCase(oldWrap.accountClassCode))) {
				return true;
			}
			if((newWRap.limitMasterNo!=null && oldWrap.limitMasterNo ==null) || (newWRap.limitMasterNo==null && oldWrap.limitMasterNo !=null) || (newWRap.limitMasterNo!=null && oldWrap.limitMasterNo !=null && !newWRap.limitMasterNo.equalsIgnoreCase(oldWrap.limitMasterNo))) {
				return true;
			}
			if((newWRap.limitNo!=null && oldWrap.limitNo ==null) || (newWRap.limitNo==null && oldWrap.limitNo !=null) || (newWRap.limitNo!=null && oldWrap.limitNo !=null && !newWRap.limitNo.equalsIgnoreCase(oldWrap.limitNo))) {
				return true;
			}
			if((newWRap.mirrorTrnAccNo!=null && oldWrap.mirrorTrnAccNo ==null) || (newWRap.mirrorTrnAccNo==null && oldWrap.mirrorTrnAccNo !=null) || (newWRap.mirrorTrnAccNo!=null && oldWrap.mirrorTrnAccNo !=null && !newWRap.mirrorTrnAccNo.equalsIgnoreCase(oldWrap.mirrorTrnAccNo))) {
				return true;
			}
			if((newWRap.mirrorTrnCurr!=null && oldWrap.mirrorTrnCurr ==null) || (newWRap.mirrorTrnCurr==null && oldWrap.mirrorTrnCurr !=null) || (newWRap.mirrorTrnCurr!=null && oldWrap.mirrorTrnCurr !=null && !newWRap.mirrorTrnCurr.equalsIgnoreCase(oldWrap.mirrorTrnCurr))) {
				return true;
			}
			if((newWRap.segmentCode!=null && oldWrap.segmentCode ==null) || (newWRap.segmentCode==null && oldWrap.segmentCode !=null) || (newWRap.segmentCode!=null && oldWrap.segmentCode !=null && !newWRap.segmentCode.equalsIgnoreCase(oldWrap.segmentCode))) {
				return true;
			}
			if((newWRap.accountTitle!=null && oldWrap.accountTitle ==null) || (newWRap.accountTitle==null && oldWrap.accountTitle !=null) || (newWRap.accountTitle!=null && oldWrap.accountTitle !=null && !newWRap.accountTitle.equalsIgnoreCase(oldWrap.accountTitle))) {
				return true;
			}
			if((newWRap.shortName!=null && oldWrap.shortName ==null) || (newWRap.shortName==null && oldWrap.shortName !=null) || (newWRap.shortName!=null && oldWrap.shortName !=null && !newWRap.shortName.equalsIgnoreCase(oldWrap.shortName))) {
				return true;
			}
			if((newWRap.accountCategory!= '\u0000' && oldWrap.accountCategory == '\u0000') || (newWRap.accountCategory == '\u0000' && oldWrap.accountCategory != '\u0000') || (newWRap.accountCategory != '\u0000' && oldWrap.accountCategory != '\u0000' && newWRap.accountCategory != oldWrap.accountCategory)) {
				return true;
			}
			if((newWRap.bulkChargesFlag!= '\u0000' && oldWrap.bulkChargesFlag == '\u0000') || (newWRap.bulkChargesFlag == '\u0000' && oldWrap.bulkChargesFlag != '\u0000') || (newWRap.bulkChargesFlag != '\u0000' && oldWrap.bulkChargesFlag != '\u0000' && newWRap.bulkChargesFlag != oldWrap.bulkChargesFlag)) {
				return true;
			}
			if((newWRap.refEntriesMarker!= '\u0000' && oldWrap.refEntriesMarker == '\u0000') || (newWRap.refEntriesMarker == '\u0000' && oldWrap.refEntriesMarker != '\u0000') || (newWRap.refEntriesMarker != '\u0000' && oldWrap.refEntriesMarker != '\u0000' && newWRap.refEntriesMarker != oldWrap.refEntriesMarker)) {
				return true;
			}
			if((newWRap.bulkingTranactionFlag!= '\u0000' && oldWrap.bulkingTranactionFlag == '\u0000') || (newWRap.bulkingTranactionFlag == '\u0000' && oldWrap.bulkingTranactionFlag != '\u0000') || (newWRap.bulkingTranactionFlag != '\u0000' && oldWrap.bulkingTranactionFlag != '\u0000' && newWRap.bulkingTranactionFlag != oldWrap.bulkingTranactionFlag)) {
				return true;
			}
			if((newWRap.provisionStatusFlag!= '\u0000' && oldWrap.provisionStatusFlag == '\u0000') || (newWRap.provisionStatusFlag == '\u0000' && oldWrap.provisionStatusFlag != '\u0000') || (newWRap.provisionStatusFlag != '\u0000' && oldWrap.provisionStatusFlag != '\u0000' && newWRap.provisionStatusFlag != oldWrap.provisionStatusFlag)) {
				return true;
			}
			if((newWRap.selfReconcileTypeFlag!= '\u0000' && oldWrap.selfReconcileTypeFlag == '\u0000') || (newWRap.selfReconcileTypeFlag == '\u0000' && oldWrap.selfReconcileTypeFlag != '\u0000') || (newWRap.selfReconcileTypeFlag != '\u0000' && oldWrap.selfReconcileTypeFlag != '\u0000' && newWRap.selfReconcileTypeFlag != oldWrap.selfReconcileTypeFlag)) {
				return true;
			}
			if((newWRap.impairmentflag!= '\u0000' && oldWrap.impairmentflag == '\u0000') || (newWRap.impairmentflag == '\u0000' && oldWrap.impairmentflag != '\u0000') || (newWRap.impairmentflag != '\u0000' && oldWrap.impairmentflag != '\u0000' && newWRap.impairmentflag != oldWrap.impairmentflag)) {
				return true;
			}
			if((newWRap.suspendProvision!= '\u0000' && oldWrap.suspendProvision == '\u0000') || (newWRap.suspendProvision == '\u0000' && oldWrap.suspendProvision != '\u0000') || (newWRap.suspendProvision != '\u0000' && oldWrap.suspendProvision != '\u0000' && newWRap.suspendProvision != oldWrap.suspendProvision)) {
				return true;
			}
			if((newWRap.accountCurrentStatus!= '\u0000' && oldWrap.accountCurrentStatus == '\u0000') || (newWRap.accountCurrentStatus == '\u0000' && oldWrap.accountCurrentStatus != '\u0000') || (newWRap.accountCurrentStatus != '\u0000' && oldWrap.accountCurrentStatus != '\u0000' && newWRap.accountCurrentStatus != oldWrap.accountCurrentStatus)) {
				return true;
			}
			if((newWRap.multipleLimits!= '\u0000' && oldWrap.multipleLimits == '\u0000') || (newWRap.multipleLimits == '\u0000' && oldWrap.multipleLimits != '\u0000') || (newWRap.multipleLimits != '\u0000' && oldWrap.multipleLimits != '\u0000' && newWRap.multipleLimits != oldWrap.multipleLimits)) {
				return true;
			}
			if(newWRap.statusFlag != oldWrap.statusFlag) {
				return true;
			}
			//Changes done to  overcome AppScanissue, Malicious trigger
//				if(!(newWRap.accountOpenDate.equals(oldWrap.accountOpenDate))){
			if(!(DateUtility.compare(newWRap.accountOpenDate, oldWrap.accountOpenDate)==0)){
			
				return true;
			}
		}
		return false;
	}
	/*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
	 public void createAccSciFatca(SubsidiaryAccountEntityKey key, scb.ebbs.accounts.wrapper.SubsidiaryAccountSCIFATCAWrapper wrapper)
				throws  javax.ejb.CreateException {

		 SQLExecutor con = null;
		 SQLStatementObject ps = null;
				
				try {
					con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);		
					ps = con.getStatementObject(INSERT_ACCSCIFATCA, false, false);
					if(wrapper!=null && wrapper.fatcaDocType!=null){
						
						ps.setString(1, key.accountNo);
						ps.setString(2, key.currencyCode);
						ps.setString(3, wrapper.fatcaDocType);
						ps.setString(4, wrapper.fatcaStatus);
						ps.setString(5, wrapper.recalStatus);
						ps.setString(6, Utility.getString(wrapper.approvedExcepFlag));
						ps.setString(7, wrapper.comments);
						/* ** Project ID : 14000404 &   Project Name : E10.20 RM -US FATCA  
						****  Date : 29-Sep-2014  &  Changes Done By : Yuvaraj(1339598)   **** */
						if (wrapper.checkerDetail == null) {
							wrapper.checkerDetail = new UserDetail();
						}
						ps.setString(8, wrapper.checkerDetail.getUserBranch());
						ps.setDate(9, wrapper.checkerDetail.getUserDate());
						ps.setString(10, wrapper.checkerDetail.getUserID());
						ps.setString(11, wrapper.checkerDetail.getUserIPAddress());
						ps.setTime(12, wrapper.checkerDetail.getUserTime());
						
						ps.setString(13, wrapper.makerDetail.getUserBranch());
						ps.setDate(14, wrapper.makerDetail.getUserDate());
						ps.setString(15, wrapper.makerDetail.getUserID());
						ps.setString(16, wrapper.makerDetail.getUserIPAddress());
						ps.setTime(17, wrapper.makerDetail.getUserTime());

						
						if (ps.executeUpdate() == 0) {
							throw new CreateException("Unable to create Child.");
						}
					}


				} catch (NamingException ne) {
				ne.printStackTrace();
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION); 
			
				} catch (SQLExecuteException se) {
					se.printStackTrace();
					throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
				} finally {
					try {
						if(ps != null) {
							ps.close();
						}
					
						if (con != null) {
							con.destroy();
						}
						
						
					} catch (SQLExecuteException se) {
						throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
					}

				}

			}
	 
	 /*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
	 public scb.ebbs.accounts.wrapper.SubsidiaryAccountSCIFATCAWrapper modifyAccSciFatca(
				SubsidiaryAccountEntityKey key,SubsidiaryAccountSCIFATCAWrapper wrapper)		
				throws CreateException {
		        SQLExecutor con = null;				
				SQLStatementObject psInsert = null;
				SQLStatementObject psUpdate = null;
				SQLStatementObject psDelete = null;
				Vector vec = new Vector();
				
				try {
					con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);				
					
					psInsert = con.getStatementObject(INSERT_ACCSCIFATCA,false,false);
					psUpdate = con.getStatementObject(UPDATE_ACCSCIFATCA,false,false);
					psDelete = con.getStatementObject(MODIFY_DELETE_ACCSCIFATCA,false,false);
					
					
				//	System.out.println("MODIFY_DELETE_ACCSCIFATCA- MODIFY METHOD "+MODIFY_DELETE_ACCSCIFATCA);					
					psDelete.setString(1, key.accountNo);
					psDelete.setString(2, key.currencyCode);
					
					psDelete.executeUpdate();
					
					if(wrapper!=null && wrapper.fatcaDocType!=null){
					
					//System.out.println("INSERT_ACCSCIFATCA "+INSERT_ACCSCIFATCA);
					psInsert.setString(1, key.accountNo);
					psInsert.setString(2, key.currencyCode);
					psInsert.setString(3, wrapper.fatcaDocType);
					psInsert.setString(4, wrapper.fatcaStatus);
					psInsert.setString(5, wrapper.recalStatus);
					psInsert.setString(6, Utility.getString(wrapper.approvedExcepFlag));
					psInsert.setString(7, wrapper.comments);
					/* ** Project ID : 14000404 &   Project Name : E10.20 RM -US FATCA  
					****  Date : 29-Sep-2014  &  Changes Done By : Yuvaraj(1339598)   **** */
					psInsert.setString(8, wrapper.checkerDetail.getUserBranch());
					psInsert.setDate(9, wrapper.checkerDetail.getUserDate());
					psInsert.setString(10, wrapper.checkerDetail.getUserID());
					psInsert.setString(11, wrapper.checkerDetail.getUserIPAddress());
					psInsert.setTime(12, wrapper.checkerDetail.getUserTime());
					psInsert.setString(13, wrapper.makerDetail.getUserBranch());
					psInsert.setDate(14, wrapper.makerDetail.getUserDate());
					psInsert.setString(15, wrapper.makerDetail.getUserID());
					psInsert.setString(16, wrapper.makerDetail.getUserIPAddress());
					psInsert.setTime(17, wrapper.makerDetail.getUserTime());
					
					psInsert.executeUpdate();				
					}
					
					return wrapper;

					} catch (NamingException ne) {
				ne.printStackTrace();
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION); 
				
			} catch (SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage()); 
				
			} catch (Exception e) {
				e.printStackTrace();
				throw new CreateException(); 
				
			} 
			
			finally {
				try{
					if(psInsert != null) {
						psInsert.close();
					}
					if(psUpdate != null) {
						psUpdate.close();
					}
					if(psDelete != null) {
						psDelete.close();
					}	
					if (con != null) {
						con.destroy();
					}

		} catch	(SQLExecuteException sqle) {
					sqle.printStackTrace();
					throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
					
				}
				 


				}
			}
	 /*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
	 private void updateAccSciFatca(SubsidiaryAccountEntityKey key, scb.ebbs.accounts.wrapper.SubsidiaryAccountSCIFATCAWrapper wrapper)
				throws CreateException {

		 SQLExecutor con = null;
		    SQLStatementObject ps = null;

				try {
					con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
					ps = con.getStatementObject(UPDATE_ACCSCIFATCA,false,false);
						ps.setString(1, wrapper.fatcaDocType);
						ps.setString(2, wrapper.fatcaStatus);
						ps.setString(3, wrapper.recalStatus);
						ps.setString(4, Utility.getString(wrapper.approvedExcepFlag));
						ps.setString(5,  wrapper.comments);
				
						if (wrapper.checkerDetail == null) {
							wrapper.checkerDetail = new UserDetail();
						}
						ps.setString(6, wrapper.checkerDetail.getUserBranch());
						ps.setDate(7, wrapper.checkerDetail.getUserDate());
						ps.setString(8, wrapper.checkerDetail.getUserID());
						ps.setString(9, wrapper.checkerDetail.getUserIPAddress());
						ps.setTime(10, wrapper.checkerDetail.getUserTime());
						
						ps.setString(11, wrapper.makerDetail.getUserBranch());
						ps.setDate(12, wrapper.makerDetail.getUserDate());
						ps.setString(13, wrapper.makerDetail.getUserID());
						ps.setString(14, wrapper.makerDetail.getUserIPAddress());
						ps.setTime(15, wrapper.makerDetail.getUserTime());
						ps.setString(16, key.accountNo);
						ps.setString(17, key.currencyCode);
						
						ps.executeUpdate(); 				
							
					}catch (NamingException ne) {
						ne.printStackTrace();
						throw new CreateException(EBBSConstants.NAMING_EXCEPTION); 
				
					}catch (SQLExecuteException sqle) {
						sqle.printStackTrace();
						throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage()); 
				
					}

					finally {
					try{
					if(ps != null) {
						ps.close();
					}
					if (con != null) {
						con.destroy();
					}
						} catch (SQLExecuteException sqle) {
					sqle.printStackTrace();
					throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());			
					}

					}

		}
	 /*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */ 
	 public void removeAccSciFatca(PrimaryKey argKey) throws javax.ejb.RemoveException {

		 SQLExecutor con = null;
		 SQLStatementObject ps = null;
		 SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				ps = con.getStatementObject(DELETE_ACCSCIFATCA,false,false);

				ps.setString(1, key.accountNo);
				ps.setString(2, key.currencyCode);
				ps.executeUpdate();

			} 

			catch (NamingException ne) {
			ne.printStackTrace();
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION); 
			
		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage()); 
			
		}
			finally {
				try{
					
				if(ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
				}catch	(SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
				
			}		

			}

		}
	 /*Changes Done By : Janani for SCI Fatca Project Name :eBBS Harmonization    **** */
	 public scb.ebbs.accounts.wrapper.SubsidiaryAccountSCIFATCAWrapper fetchAccSciFatca(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {
			
		   SQLExecutor con = null;
		    SQLStatementObject stmt = null;
			SQLResultObject rs = null;
			Vector result =new Vector();
			SubsidiaryAccountSCIFATCAWrapper wrapper =null;
			LogWriter out = null;

			if(out==null){
				out = LogWriter.getInstance("Subsidiary Account",  "Subsidiary Account");			
			}

			out.println("inside the subsidiaryHelper fetchAccSciFatca()");
			

			try {

				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
						
				if(key.fetchForUpdate)
				{				
					stmt = con.getStatementObject(SELECT_ACCSCIFATCA,true,false);
					
				}
				else
				{				
					 stmt = con.getStatementObject(SELECT_ACCSCIFATCA,false,false);					
				}
				
				//out.println("fetchAccSciFatca"+SELECT_ACCSCIFATCA);
				stmt.setString(1, key.accountNo);
				stmt.setString(2, key.currencyCode);
				//out.println("fetchAccSciFatca"+key.accountNo);
				//out.println("fetchAccSciFatca"+key.currencyCode);

				rs = stmt.executeQuery();				
								
				if(rs.next())
				{												
					wrapper = new SubsidiaryAccountSCIFATCAWrapper();			
					wrapper.fatcaDocType=rs.getString(1);
					wrapper.fatcaStatus = rs.getString(2);
					wrapper.recalStatus=rs.getString(3);
					wrapper.approvedExcepFlag=Utility.getChar(rs.getString(4));
					wrapper.comments=rs.getString(5);	
					/* ** Project ID : 14000404 &   Project Name : E10.20 RM -US FATCA  
					****  Date : 29-Sep-2014  &  Changes Done By : Yuvaraj(1339598)   **** */
					wrapper.checkerDetail = new UserDetail();
					wrapper.checkerDetail.setUserBranch(rs.getString(6));
					wrapper.checkerDetail.setUserDate(rs.getDate(7));
					wrapper.checkerDetail.setUserID(rs.getString(8));
					wrapper.checkerDetail.setUserIPAddress(rs.getString(9));
					wrapper.checkerDetail.setUserTime(rs.getTime(10));
					wrapper.makerDetail = new UserDetail();
					wrapper.makerDetail.setUserBranch(rs.getString(11));
					wrapper.makerDetail.setUserDate(rs.getDate(12));
					wrapper.makerDetail.setUserID(rs.getString(13));
					wrapper.makerDetail.setUserIPAddress(rs.getString(14));
					wrapper.makerDetail.setUserTime(rs.getTime(15));

				}else{
					out.println("SubsidiaryAccountSCIFATCAWrapper empty");
					return new SubsidiaryAccountSCIFATCAWrapper();
				}			
			} catch (NamingException ne) {
				ne.printStackTrace();
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION); 
				
			} catch (SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
				
			} 	
			catch(Exception e)
			{	
			e.printStackTrace();			
			}
			finally {
				try {
					if(stmt != null) {
						stmt.close();
					}
					if(rs!=null) {
						rs.close();
					}
					if (con != null) {
						con.destroy();
					}
					
				} catch	(SQLExecuteException sqle) {
					sqle.printStackTrace();
					throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());			
				}		
				 
			}		 
			
			return wrapper;	
			
		}
		
	// Added for VH E10-US Migration
	public Enumeration findAccountNoByInfoType(String argCurrencyCode,String argAccountNo) throws javax.ejb.FinderException  {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		String accountNo = null ;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();

			try {
		
//				System.out.println(" Inside Subsidiary Helper "+argCurrencyCode+" "+argAccountNo);
    //scb.util.LogWriter.getInstance("SOP","CLNUP").println(" Inside Subsidiary Helper "+argCurrencyCode+" "+argAccountNo);
				
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(FIND_ACCOUNTNO_ACCINFO, false, false);
				
				stmt = con.getStatementObject();
				stmt.setString(1, argCurrencyCode);
				stmt.setString(2, argAccountNo);
				rs = stmt.executeQuery();
		
				while(rs.next()) {
					resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
					resultVector.addElement(resultKey);
				}
				
				if(resultVector.size()==0) {
					throw new FinderException();
				}
				
			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if(stmt != null) {
						stmt.close();
					}
					if(rs != null) {
						rs.close();
					}
					if(con != null){
						con.destroy();
					}
		
				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
					throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

				}
			}
//			System.out.println("Before returning from Helper ");
  // scb.util.LogWriter.getInstance("SOP","CLNUP").println("Before returning from Helper ");
			return resultVector.elements();
		}
	//ends
	public void customTxnAccountStoreObject(AbstractWrapper argWrapper) throws CreateException {
		SubsidiaryAccountWrapper wrapper = (SubsidiaryAccountWrapper) argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		boolean executeQueryRequired = false;
		try {
		con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
		StringBuffer sql = new StringBuffer("UPDATE TXNACCOUNTS SET ");
		Object[] values = new Object[wrapper.getHash().size()];
		java.util.Iterator it = wrapper.getHash().keySet().iterator();
		int i = 0;
		while (it.hasNext()) {
			Object column = it.next();
			if(column.toString() == "REFENTRIESMARKER" || column.toString() == "SHORTNAME" || column.toString() == "STATUSFLAG" || column.toString() == "ACCTCURRENTSTATUS" ) {
			executeQueryRequired = true;
			sql.append(column);
			sql.append("=?,");
			values[i++] = wrapper.getHash().get(column);
			}
		}

		sql.deleteCharAt(sql.length() - 1);
		sql.append(" WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?");
		stmt = con.getStatementObject(sql.toString(), false, false);
		int j = 1;
		if(executeQueryRequired) {
		for (i = 0; i < values.length; i++) {
			if(values[i]!= null) {
			if (values[i] instanceof Character && values[i] != null) {
				stmt.setObject(i + 1, values[i].toString());
			} else {
				stmt.setObject(i + 1, values[i]);
			}
			j++;
			}
		}
		stmt.setString(j++, wrapper.currencyCode);
		stmt.setString(j++, wrapper.accountNo);
		stmt.executeUpdate();
		}
		} catch (SQLExecuteException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
		} catch (NamingException e) {
			scb.util.LogWriter.getInstance().printErrorMessage(e);// //- F16
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				scb.util.LogWriter.getInstance().printErrorMessage(e);// //-
				throw new CreateException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
			}
		}
	}
	public void updateBatchOfTxnAccountsforInterestAccrual(Vector argVector) throws CreateException{
		SubsidiaryAccountWrapper wrapper = null;;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter out = new LogWriter("EOD","updateBatchOfTxnAccountsforInterestAccrual","updateBatchOfTxnAccountsforInterestAccrual");		
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			String query = "UPDATE TXNACCOUNTS SET DAUELMTMASTNO = ?,DAUELMTNO= ? WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?";
			stmt = con.getStatementObject(query, false, false);			
			if (argVector!=null && argVector.size()!=0){
				for(int i=0;i<argVector.size();i++){
					wrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);
					stmt.setString(1, wrapper.daueLimitMasterNo);
					stmt.setString(2, wrapper.daueLimitNo);
					stmt.setString(3, wrapper.currencyCode);
					stmt.setString(4, wrapper.accountNo);
					//ends here
					stmt.addBatch();
				}
				 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
				 int result[] = stmt.executeBatch();
				/*if (result.length <= 0)
					throw new CreateException();*/
			}
		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper.currencyCode +":"+wrapper.accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}
         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	
	public void updateMasterTxnAccountsForInterestAccural(SubsidiaryAccountWrapper wrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter.getInstance().println("===========updateMasterTxnAccountsForInterestAccural===");
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			String query = "UPDATE TXNACCOUNTS SET DAUELMTMASTNO = ?,DAUELMTNO= ? WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?";
			stmt = con.getStatementObject(query, false, false);
			stmt.setString(1, wrapper.daueLimitMasterNo);
			stmt.setString(2, wrapper.daueLimitNo);
			stmt.setString(3, wrapper.currencyCode);
			stmt.setString(4, wrapper.accountNo);
			//ends here
		

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	public void updateMasterTxnAccountsForInterestCapitalisation(SubsidiaryAccountWrapper wrapper) throws CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			String query = "UPDATE TXNACCOUNTS SET SEGMENTCODE = ? ,DAUELMTMASTNO = ?,DAUELMTNO= ? WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?";
			stmt = con.getStatementObject(query, false, false);
			stmt.setString(1, wrapper.segmentCode);
			stmt.setString(2, wrapper.daueLimitMasterNo);
			stmt.setString(3, wrapper.daueLimitNo);
			stmt.setString(4, wrapper.currencyCode);
			stmt.setString(5, wrapper.accountNo);
			scb.util.LogWriter.getInstance().printDebugMode("updateMasterTxnAccountsForInterestCapitalisation COMPLETED");
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	public void updateBatchTxnAccountsforInterestApplication(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{
		SubsidiaryAccountWrapper[] wrapper =(SubsidiaryAccountWrapper[])argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter.getInstance().printDebugMode("===========Batch updateBatchTxnAccountsforInterestApplication===");
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			String query = "UPDATE TXNACCOUNTS SET SEGMENTCODE = ? ,DAUELMTMASTNO = ?,DAUELMTNO= ? WHERE CURRENCYCODE = ? AND ACCOUNTNO = ?";
			stmt = con.getStatementObject(query, false, false);
			if (wrapper.length!=0){
				for(int i=0;i<wrapper.length;i++){
					stmt.setString(1, wrapper[i].segmentCode);
					stmt.setString(2, wrapper[i].daueLimitMasterNo);
					stmt.setString(3, wrapper[i].daueLimitNo);
					stmt.setString(4, wrapper[i].currencyCode);
					stmt.setString(5, wrapper[i].accountNo);
					//ends here
					stmt.addBatch();
				}
				 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
				 int result[] = stmt.executeBatch();
				 scb.util.LogWriter.getInstance().println("no of records updated in account for Cap : " + result.length);
			}
		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].currencyCode +":"+wrapper[i].accountNo);
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}
         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}
	
	//Added by Habib
	public boolean findByAccountNoAndMasterNo(String accountNo,String masterNo) throws FinderException {
		
		SQLExecutor sqlCon = null;
		SQLStatementObject sqlStmt = null;
		SQLResultObject sqlRs = null;
		
		String SQL_ACCOUNTFETCH = "EBACC09328SY";
		String SQL_ACCOUNTFETCH_TEMP = "EBACC09329SY";
        String SQL_ACCOUNTFETCH_CLOSED = "EBACC09330SY";
		

		try{
			sqlCon = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			sqlStmt = sqlCon.getStatementObject(SQL_ACCOUNTFETCH, false, false);
			sqlStmt.setString(1, accountNo);
			sqlStmt.setString(2, masterNo);
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
			sqlRs.close();
			sqlStmt.close();
			sqlStmt = sqlCon.getStatementObject(SQL_ACCOUNTFETCH_TEMP, false, false);
			sqlStmt.setString(1,accountNo);
			sqlStmt.setString(2, masterNo);
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
			sqlRs.close();
			sqlStmt.close();
			sqlStmt = sqlCon.getStatementObject(SQL_ACCOUNTFETCH_CLOSED, false, false);
			sqlStmt.setString(1,accountNo);
			sqlStmt.setString(2, masterNo);
			sqlRs = sqlStmt.executeQuery();
			if(sqlRs.next()){
				if(sqlRs.getInt(1)>0) {
					return true;
				}
			}
		} catch (SQLExecuteException e) {
			e.printStackTrace();
			throw new EJBException(e.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+e.getMessage());
		} catch (NamingException e) {
			e.printStackTrace();
			throw new EJBException("Error in findByAccountNoAndMasterNo "+e.getMessage());
		}finally {
			try {
				if (sqlRs != null) {
					sqlRs.close();
				}
				if(sqlStmt != null){
					sqlStmt.close();
				}
				if (sqlCon != null) {
					sqlCon.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			}
		}
		return false;
    }
	// Added by 1591174 for BH-BenefitPay
	public Enumeration findByIbanNumber(String argIbanNo) throws javax.ejb.FinderException  {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		String ibanNo = null ;
		SubsidiaryAccountEntityKey resultKey = null;
		Vector resultVector = new Vector();
		try {
			if (SystemProperties.getInstance().getServerVersion() != null && (EBBSConstants.JBOSS_SERVER.equals(SystemProperties.getInstance().getServerVersion()))){
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);					
	    	} else {
	    		con = SQLExecutor.getInstance(true, EBBSConstants.EBBS_APPLICATION);		    		
	    	} 			
			stmt = con.getStatementObject(FIND_BY_IBANNO, false, false);
			stmt.setString(1, argIbanNo);
			stmt.setShort(2, EBBSConstants.CLOSED);
			rs = stmt.executeQuery();
			
			while(rs.next()) {
				resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
				resultVector.addElement(resultKey);
			}
			
			if(resultVector.size()==0) {
				throw new FinderException();
			}
					
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			
		} finally {
			try {
				if(rs != null) {
					rs.close();
				}
				if(stmt != null) {
					stmt.close();
				}
				if(con != null){
					con.destroy();
				}
				
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				
			}
		}
		return resultVector.elements();
	}
	//ends
	 private boolean isTxnAccoutSynchOnChange() {
             boolean returnValue = false;
        AbstractWrapper[] abstractWrapper1 = null;
        try {
                    abstractWrapper1 = BusinessProcessParamCache.getInstance().getProcessParameters("TXNPOSTSETUPS");
             } catch (SCBApplicationException e) {
                    }
        TxnPostingSetupBusinessParamWrapper txnPostingSetupBusinessParamWrapper = null;
        if (abstractWrapper1 != null && abstractWrapper1.length > 0) {
               txnPostingSetupBusinessParamWrapper = (TxnPostingSetupBusinessParamWrapper) abstractWrapper1[0];
        }
             if (txnPostingSetupBusinessParamWrapper != null && txnPostingSetupBusinessParamWrapper. syncTxnAccountOnChangeOnly.equals("Y")) {
                    returnValue = true;
             }
 			scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## isTxnAccoutSynchOnChange() ## returnValue :"+returnValue);
             return returnValue;
       }
	private Date getEODDate() {
		Date eodDate = null;
		try {
			eodDate = StaticDataCacheDAO.getInstance().getEodDate(); 
		} catch (SCBApplicationException e) {
			// TODO Auto-generated catch block
		}
		return eodDate;
	}
	    public void updateIntEligibilityFlag (String accountNo,String currencyCode,char intEligibilityFlag) throws SCBApplicationException{
				scb.util.LogWriter out=LogWriter.getInstance();
			    //System.out.println("Inside querysessionbeeeen");
				SQLExecutor con = null;
				SQLStatementObject psci= null;
				SQLResultObject rsci = null;
		
				try {	
					
				String UPDATE_INTELIGIBILITY="EBACC06990SY";

					   	con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
						psci = con.getStatementObject(UPDATE_INTELIGIBILITY, false, false);
						psci.setString(1,Utility.getString(intEligibilityFlag));
						psci.setString(2,accountNo);
						psci.setString(3,currencyCode);
						out.println("UPDATE_INTELIGIBILITY-->"+UPDATE_INTELIGIBILITY);
						psci.executeUpdate();			 				 
								
				}catch (NamingException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}catch (IllegalArgumentException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (Exception e) {
					System.out.println("Inside Exception");		
					e.printStackTrace();
					throw new SCBApplicationException("SYS", "111", "Contact System Administrator");
				} 
					finally {
						try {	
					    if (psci != null) {
							psci.close();
						}
						if (rsci != null) {
							rsci.close();
						}
						if (con != null) {
							con.destroy();
				        }
					} catch (Exception sqe) {
						sqe.printStackTrace();
					}	
				}
				
			}
		public String getArmcode (String accountNo,String currencyCode) throws SCBApplicationException{
		scb.util.LogWriter out=LogWriter.getInstance();
	    out.println("Inside querysessionbeeeen");
		SQLExecutor con = null;
		SQLStatementObject psci= null;
		SQLResultObject rsci = null;
		String armCode=null;
 		try {	
 			String GET_ARMCODE="EBACC06991SY";
	 	    con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			psci = con.getStatementObject(GET_ARMCODE, false, false);
			psci.setString(1,accountNo);
			psci.setString(2,currencyCode);
			out.println("GET_ARMCODE-->"+GET_ARMCODE);
			rsci= psci.executeQuery();	
			if(rsci.next()){				
				armCode= rsci.getString(1)!= null?rsci.getString(1):null;						
			}
			out.println("armCode-->"+armCode);			
		}catch (NamingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			System.out.println("Inside Exception");		
			e.printStackTrace();
			throw new SCBApplicationException("SYS", "111", "Contact System Administrator");
		} finally {
				try {	
			    if (psci != null) {
					psci.close();
				}
				if (rsci != null) {
					rsci.close();
				}
				if (con != null) {
					con.destroy();
		        }
			} catch (Exception sqe) {
				sqe.printStackTrace();
			}	
		}
		return armCode;
	}
	
	//	Added by Lijo for Binding - Account opening restriction
	public Enumeration findAccountsByPrimaryRelationship(String relationshipNo) throws javax.ejb.FinderException
	{
		Vector resultVector = new Vector();
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(FIND_ALL_MASTERNO_BY_RELATIONSHIP, false, false);

			stmt.setString(1, relationshipNo);
			rs = stmt.executeQuery();

			while (rs.next()) {
				System.out.println("testing in helper::" + rs.getString(1) + "::" + rs.getString(2));
				resultVector.addElement(new SubsidiaryAccountEntityKey(rs.getString(1).trim(), rs.getString(2).trim()));
			}

			if (resultVector.size() == 0)
				throw new ObjectNotFoundException();

			scb.util.LogWriter.getInstance().println("Vector Size ::::: >>>>> " + resultVector.size());

		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			try {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		return resultVector.elements();

	}
public Enumeration findAccountsByPrimaryRelationship(String relNo,boolean result) throws javax.ejb.FinderException {

	SQLExecutor con = null;
	SQLStatementObject pstmt = null;
	SQLResultObject rs = null;
	Vector v = new Vector();
	Vector resultVector = new Vector();

	try
	{
		con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);

		if(result)
			pstmt = con.getStatementObject(FIND_ALL_MASTERNO_BY_PRIMARY_RELATIONSHIP  + EBBSConstants.FOR_UPDATE);
		else
			pstmt = con.getStatementObject(FIND_ALL_MASTERNO_BY_PRIMARY_RELATIONSHIP);

		pstmt.setString(1,relNo);
		rs = pstmt.executeQuery();

		while(rs.next())
			resultVector.addElement(new SubsidiaryAccountEntityKey(rs.getString(1),rs.getString(2)));

		if(resultVector.size() == 0)
			throw new ObjectNotFoundException();
	}
	catch (SQLExecuteException se) 
	{
		se.printStackTrace();
		throw new FinderException(se.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+se.getMessage());

	} 
	catch (NamingException ne)
	{
		ne.printStackTrace();
		throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

	}
	finally 
	{
		try 
		{

			if(rs != null)
				rs.close();	
			if(pstmt != null)
				pstmt.close();			


			//releaseConnection(con);//E11.12 Sonar fix
			////scb.ebbs.util.SonarLog.println("CloseResource");
			if(con != null)   
			{
				con.destroy();
			}


		} catch	(SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

		}

	}

	return resultVector.elements();	


}

//Added by 1632540 for OBOR-11621
	public int checkAccountInfoByInfoCode(String accountNo,String currencyCode) throws javax.ejb.FinderException
	{
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		int count = 0;
		try {
			con = SQLExecutor.getInstance(true,EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(COUNT_ACCINFO_BY_INFORMATIONCODES,false,false);
	
			stmt.setString(1,accountNo);
			stmt.setString(2,currencyCode);
			rs = stmt.executeQuery();
	
			if (rs.next()) {
				count = rs.getInt(1);
			}
	
		} catch (SQLExecuteException e) {
			logWriter.printErrorMessage(e);
			//throw new SCBApplicationException("SYS", "1000", "Contact System Administrator");
		} catch (NamingException e) {
			//e.printStackTrace();
			logWriter.printErrorMessage(e);
			//throw new SCBApplicationException("SYS", "1000", "Contact System Administrator");
		} finally  {
			try  {
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if(con != null)   
				{
					con.destroy();
				}
			} catch (SQLExecuteException e) {
				logWriter.printErrorMessage(e);
				//throw new SCBApplicationException("SYS", "1000", "Contact System Administrator");
			}
		}
		return count;
	
	}
	// CN FZA Account status change
	public boolean updateAllAccountsStatusByAccountNo(Object argObj) throws  FinderException, CreateException {
		
		LogWriter out = new LogWriter("SubsidiaryAccountHelper", "SubsidiaryAccountHelper", "updateAllAccountsStatusByAccountNo", "", true);
		SQLExecutor con = null;
 		SQLStatementObject stmt = null;
 		String acctNewStatus = null;
		String accountNo = null;
		String acctOldStatusActive = null;
		String acctOldStatusOpen = null;
		Date eodDate = null;
		out.println("updateAllAccountsStatusByAccountNo--::::::");		
		try {
			Object[] obj = (Object[]) argObj;
		
			con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			
			acctNewStatus = (String) obj[0];
			eodDate = (Date)  obj[1]; 
			accountNo = (String) obj[2];
			acctOldStatusActive = (String) obj[3];
			acctOldStatusOpen = (String) obj[4];
			
			
			if(acctNewStatus.equals("A")) {
				stmt = con.getStatementObject(ACCTCURRENTSTATUS_A,false, false);
			} else {
				stmt = con.getStatementObject(ACCTCURRENTSTATUS_D,false, false);
			}
					
			stmt.setString(1, acctNewStatus);
			stmt.setDate(2, eodDate);
			stmt.setString(3, accountNo);
			stmt.setString(4, acctOldStatusActive);
			
			if(acctNewStatus.equals("D")) {
				stmt.setString(5, acctOldStatusOpen);
			}

			int result = stmt.executeUpdate();
			out.println("result::::::"+result);
			
			return true;
		
		} catch (SQLExecuteException e) {
			logWriter.printErrorMessage(e);
		}catch (NamingException ne) {
			ne.printStackTrace();
		}  finally {
			try {
				if (stmt != null)
	 				stmt.close();
	 			if (con != null)
	 				con.destroy();
			}
			catch (SQLExecuteException e) {
				logWriter.printErrorMessage(e);
			}
		out.println("last value----");
		return false;
		}
	}
		//Added by 1653576 for KEYSTONEHK-51238
		public boolean getGBA (String currencyCode,String accountNo) throws SCBApplicationException{
			scb.util.LogWriter out=LogWriter.getInstance();
		    out.println("Inside querysessionbeeeen");
		    out.println("Accountno: "+accountNo);
		    out.println("currencyCode: "+accountNo);
			SQLExecutor con = null;
			SQLStatementObject psci= null;
			SQLResultObject rsci = null;
			boolean gba=false;
	 		try {	
	 			String FIND_GBA1="SELECT * FROM wmcacbnd where currencycode=? and accountno=?";
		 	    con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				psci = con.getStatementObject(FIND_GBA1, false, false);
				psci.setString(1,currencyCode);
				psci.setString(2,accountNo);
				out.println("GET_GBA-->"+FIND_GBA1);
				rsci= psci.executeQuery();	
				if(rsci.next()){				
					gba= true;				
				}
				out.println("gba Value-->"+gba);			
			}catch (NamingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}catch (IllegalArgumentException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				System.out.println("Inside Exception");		
				e.printStackTrace();
				throw new SCBApplicationException("SYS", "111", "Contact System Administrator");
			} finally {
					try {	
				    if (psci != null) {
						psci.close();
					}
					if (rsci != null) {
						rsci.close();
					}
					if (con != null) {
						con.destroy();
			        }
				} catch (Exception sqe) {
					sqe.printStackTrace();
				}	
			}
			return gba;
		}
		//Changes done
		public Enumeration findByMasterNoWithOffset(String argMasterNo, int offset, int limit,boolean forUpdate) throws javax.ejb.FinderException {

			SQLExecutor con = null;
			SubsidiaryAccountWrapper wrapper = null;
			SubsidiaryAccountEntityKey resultKey = null;
			Vector resultVector = new Vector();
			SQLStatementObject stmt = null;
			SQLResultObject rs = null;

			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				if (forUpdate) {
					stmt = con.getStatementObject(FIND_BY_MASTERNO_PAGINATION, true, false);
				} else {
					stmt = con.getStatementObject(FIND_BY_MASTERNO_PAGINATION, false, false);
				}

				stmt.setString(1, argMasterNo);
				stmt.setLong(2, offset);
				stmt.setLong(3, limit);
				rs = stmt.executeQuery();

				while (rs.next()) {
					resultKey = new SubsidiaryAccountEntityKey(rs.getString(1), rs.getString(2));
					resultVector.addElement(resultKey);
				}

				if (resultVector.size() == 0) {
					throw new ObjectNotFoundException();
				}

			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (rs != null) {
						rs.close();
					}

					if (stmt != null) {
						stmt.close();
					}

					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
					throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

				}

			}

			return resultVector.elements();

		}
		
		
		
		public void insertAccountStagingforInterestApplication(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter.getInstance().println("===========Batch insertAccountStagingforInterestApplication===");
			try {
				//CURRENCYCODE,ACCOUNTNO,EXECDATE,PROCESSSTATUS,PROCESSTYPE,CRNEXTINTERESTPAYMENTDATE,
				//CRLASTINTERESTPAYMENTDATE,CRINTCAPDATE,CRINTCAPAMOUNT,CRINTBEARINGFLAG,DRINTBEARINGFLAG,
				//REASONCAP,PCRINTACCRUEDAMT,PCRINTADJAMT,PCRMANUALADJAMT,DRNEXTINTERESTPAYMENTDATE,
				//DRLASTINTERESTPAYMENTDATE,DRINTCAPDATE,DRINTCAPAMOUNT,
				//INDTLTDATE,ADVINTINDFLAG,HOLDCRCAP,POSTCRINTEREST,POSTDRINTEREST,POSTPRPPA
				
				//?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(ACCOUNT_INTEREST_STAGING_CAPITALISATION, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
						stmt.setString(1, wrapper[i].getCurrencyCode());
						stmt.setString(2, wrapper[i].getAccountNumber().trim());
						stmt.setDate(3, wrapper[i].getExecutionDate());
						stmt.setString(4, "I");
						stmt.setString(5, wrapper[i].getProcessType());
						stmt.setDate(6, wrapper[i].getCrNextInterestPaymentDate());
						stmt.setDate(7, wrapper[i].getCrLastInterestPaymentDate());
						stmt.setDate(8, wrapper[i].getCrIntCapDate());
						stmt.setBigDecimal(9, wrapper[i].getCrIntCapAmount());
						stmt.setString(10, Utility.getString(wrapper[i].getCrIntBearingFlag()));
						stmt.setString(11, Utility.getString(wrapper[i].getDrIntBearingFlag()));
						stmt.setString(12,wrapper[i].getReasonCap());
						stmt.setBigDecimal(13,wrapper[i].getPcrintAccruedamt());
						stmt.setBigDecimal(14,wrapper[i].getPcrintAdjamt());
						stmt.setBigDecimal(15,wrapper[i].getPcrmanualAdjamt());
						stmt.setDate(16, wrapper[i].getDrNextInterestPaymentDate());
						stmt.setDate(17, wrapper[i].getDrLastInterestPaymentDate());
						stmt.setDate(18, wrapper[i].getDrIntCapDate());
						stmt.setBigDecimal(19, wrapper[i].getDrIntCapAmount());
						stmt.setDate(20, wrapper[i].getIntdtltDate());
						stmt.setString(21, String.valueOf(Utility.getString( wrapper[i].getAdvIntIndFlag()).charAt(0)));
						stmt.setString(22, wrapper[i].getHoldCrCap());
						stmt.setString(23, wrapper[i].getPostCrInterest());
						stmt.setString(24, wrapper[i].getPostDrInterest());
						stmt.setString(25, wrapper[i].getPostPRPPA());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		}
		
		public void insertAccountStagingforInterestAccrual(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter.getInstance().println("===========Batch insertAccountStagingforInterestAccrual===");
			try {
				//INSERT INTO ACCINTPROCSTG (CURRENCYCODE,ACCOUNTNO,EXECDATE,PROCESSSTATUS,
				//PROCESSTYPE,CREDITINTERESTACCRUED,NEGCRINTACCUREDAMT,POSCRINTACCUREDAMT,DEBITINTERESTACCRUED,LASTCRINTRATE,
				//LASTDRINTRATE,LASTEXSINTRATE,CRLASTACCRUALDATE,DRLASTACCRUALDATE,CRNEXTINTERESTPAYMENTDATE,DRNEXTINTERESTPAYMENTDATE,
				//LASTCRINTCOMPOUNDEDDATE,LASTDRINTCOMPOUNDEDDATE,CRNEXTCOMPDATE,DRNEXTCOMPDATE,CRINTTOCOMPOUND,DRINTTOCOMPOUND,NEGCRINTFLAG) 
				//VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
				
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(ACCOUNT_INTEREST_STAGING_ACCRUAL, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
				
						stmt.setString(1, wrapper[i].getCurrencyCode());
						stmt.setString(2, wrapper[i].getAccountNumber().trim());
						stmt.setDate(3, wrapper[i].getExecutionDate());
						stmt.setString(4, "I");
						stmt.setString(5, wrapper[i].getProcessType());
						scb.util.LogWriter.getInstance().println("helper"+ wrapper[i].getCreditInterestAccrued() +"#" + wrapper[i].getNegCrIntAccuredAmt() + "#" + wrapper[i].getPosCrIntAccuredAmt());
						stmt.setBigDecimal(6, wrapper[i].getCreditInterestAccrued());
						stmt.setBigDecimal(7, wrapper[i].getNegCrIntAccuredAmt());
						stmt.setBigDecimal(8, wrapper[i].getPosCrIntAccuredAmt());
						stmt.setBigDecimal(9, wrapper[i].getDebitInterestAccrued());
						stmt.setBigDecimal(10, wrapper[i].getLastCrintRate());
						stmt.setBigDecimal(11, wrapper[i].getLastDrintRate());
						stmt.setBigDecimal(12,wrapper[i].getLastExsintRate());
						scb.util.LogWriter.getInstance().println("helper"+ wrapper[i].getCrLastAccrualDate() +"#" + wrapper[i].getDrLastAccrualDate() + "#" + wrapper[i].getCrNextInterestPaymentDate());
						stmt.setDate(13,wrapper[i].getCrLastAccrualDate());
						stmt.setDate(14,wrapper[i].getDrLastAccrualDate());
						stmt.setDate(15,wrapper[i].getCrNextInterestPaymentDate());
						stmt.setDate(16, wrapper[i].getDrNextInterestPaymentDate());
						stmt.setDate(17, wrapper[i].getLastcrIntCompoundedDate());
						stmt.setDate(18, wrapper[i].getLastdrIntCompoundedDate());
						stmt.setDate(19, wrapper[i].getCrNextCompDate());
						stmt.setDate(20, wrapper[i].getDrNextCompDate());
						stmt.setBigDecimal(21, wrapper[i].getCrIntToCompound());
						stmt.setBigDecimal(22,wrapper[i].getDrIntToCompound());
						stmt.setString(23,wrapper[i].getNegCrIntFlag());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		}
		
		
		
		public void updateAccountforCapitalisation(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

		AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		scb.util.LogWriter.getInstance().println("===========Batch updateAccountforCapitalisation===");
		//CRNEXTINTPAYDATE = ? ,DRNEXTINTPAYDATE = ? , CRLASTINTPAYDATE=? , DRLASTINTPAYDATE=? ,CRINTACCRUEDAMT = ?,CRINTADJAMT= ?,CRMANUALADJAMT= ?
		//,POSCRINTACCRUEDAMT= ?,POSCRINTADJAMT= ?,NEGCRINTACCRUEDAMT= ?,NEGCRINTADJAMT= ?,POSCRMANUALADJAMT= ?,NEGCRMANUALADJAMT = ?,
		//PCRINTACCRUEDAMT= ?, PCRINTADJAMT= ?,PCRMANUALADJAMT= ?,DRINTACCRUEDAMT= ?,DRINTADJAMT= ?,DRMANUALADJAMT=?,CRINTCOMPOUND=?,DRINTCOMPOUND=?
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_ACCOUNT_INTEREST_CAPITALISATION, false, false);
			if (wrapper.length!=0){
				for(int i=0;i<wrapper.length;i++){
					scb.util.LogWriter.getInstance().println("wrapper[i].getAccountNumber()"+ wrapper[i].getAccountNumber() + "wrapper[i].getCurrencyCode()"+ wrapper[i].getCurrencyCode());
					stmt.setDate(1, wrapper[i].getCrNextInterestPaymentDate());
					stmt.setDate(2, wrapper[i].getDrNextInterestPaymentDate());
					stmt.setDate(3, wrapper[i].getCrLastInterestPaymentDate());
					stmt.setDate(4, wrapper[i].getDrLastInterestPaymentDate());
					stmt.setBigDecimal(5, wrapper[i].getCreditInterestAccrued());
					stmt.setBigDecimal(6, wrapper[i].getCreditInterestAdjustment());
					stmt.setBigDecimal(7, wrapper[i].getCreditManualAdjustment());
					stmt.setBigDecimal(8, wrapper[i].getPosCrIntAccuredAmt());
					stmt.setBigDecimal(9, wrapper[i].getPosCrIntAdjustedAmt());
					stmt.setBigDecimal(10,wrapper[i].getNegCrIntAccuredAmt() );
					stmt.setBigDecimal(11, wrapper[i].getNegCrIntAdjustedAmt());
					stmt.setBigDecimal(12,wrapper[i].getPosCrManualAdjustment());
					stmt.setBigDecimal(13,wrapper[i].getNegCrManualAdjustment());
					stmt.setBigDecimal(14,wrapper[i].getPcrintAccruedamt());
					stmt.setBigDecimal(15,wrapper[i].getPcrintAdjamt());
					stmt.setBigDecimal(16, wrapper[i].getPcrmanualAdjamt());
					stmt.setBigDecimal(17, wrapper[i].getDebitInterestAccrued());
					stmt.setBigDecimal(18, wrapper[i].getDebitInterestAdjustment());
					stmt.setBigDecimal(19, wrapper[i].getDebitManualAdjustment());
					if (wrapper[i].getCrIntToCompound()!=null){
						stmt.setBigDecimal(20, wrapper[i].getCrIntToCompound());
					}else{
						stmt.setBigDecimal(20, null);	
					}
					
					stmt.setBigDecimal(21, null);
					stmt.setString(22, wrapper[i].getCurrencyCode());
					stmt.setString(23, wrapper[i].getAccountNumber().trim());
					stmt.addBatch();
				}
				 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
				 int result[] = stmt.executeBatch();
			}

		}catch (BatchUpdateException b) {
			scb.util.LogWriter.getInstance().printErrorMessage(b);
			scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
			int[] updateCounts = b.getUpdateCounts();
			for (int i = 0; i < updateCounts.length; i++) {
				logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
			}
			SQLException ex = b.getNextException();
			while (ex != null) {
				scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
				ex = ex.getNextException();
			}

         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		}
		
		
		public void updateAccountforAccrual(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter.getInstance().println("===========Batch updateAccountforCapitalisation===");
			
			//"UPDATE ACCOUNT SET CRINTACCRUEDAMT=?,NEGCRINTACCRUEDAMT=?,POSCRINTACCRUEDAMT=?,DRINTACCRUEDAMT=?,"+
			//" LASTCRINTRATE=?,LASTDRINTRATE=?,LASTEXSINTRATE=?, CRLASTACCRUALDATE =? , DRLASTACCRUALDATE= ?, "+
			//" CRNEXTINTPAYDATE=?,DRNEXTINTPAYDATE=?,LASTCRINTCOMPDATE=?,LASTDRINTCOMPDATE=?, "+
			//" NEXTCRINTCOMPDATE=? , NEXTDRINTCOMPDATE=?,CRINTCOMPOUND=?,DRINTCOMPOUND=? "+
			
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_ACCOUNT_INTEREST_ACCRUAL, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
						scb.util.LogWriter.getInstance().println("wrapper[i].getAccountNumber()"+ wrapper[i].getAccountNumber() + "wrapper[i].getCurrencyCode()"+ wrapper[i].getCurrencyCode());
						stmt.setBigDecimal(1, wrapper[i].getCreditInterestAccrued());
						stmt.setBigDecimal(2, wrapper[i].getNegCrIntAccuredAmt());
						stmt.setBigDecimal(3, wrapper[i].getPosCrIntAccuredAmt());
						stmt.setBigDecimal(4, wrapper[i].getDebitInterestAccrued());
						stmt.setBigDecimal(5, wrapper[i].getLastCrintRate());
						stmt.setBigDecimal(6, wrapper[i].getLastDrintRate());
						stmt.setBigDecimal(7, wrapper[i].getLastExsintRate());
						stmt.setDate(8, wrapper[i].getCrLastAccrualDate());
						stmt.setDate(9, wrapper[i].getDrLastAccrualDate());
						stmt.setDate(10,wrapper[i].getCrNextInterestPaymentDate() );
						stmt.setDate(11, wrapper[i].getDrNextInterestPaymentDate());
						stmt.setDate(12,wrapper[i].getLastcrIntCompoundedDate());
						stmt.setDate(13,wrapper[i].getLastdrIntCompoundedDate());
						stmt.setDate(14,wrapper[i].getCrNextCompDate());
						stmt.setDate(15,wrapper[i].getDrNextCompDate());
						stmt.setBigDecimal(16, wrapper[i].getCrIntToCompound());
						stmt.setBigDecimal(17, wrapper[i].getDrIntToCompound());
						stmt.setString(18, wrapper[i].getCurrencyCode());
						stmt.setString(19, wrapper[i].getAccountNumber().trim());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
			}
		
		
		public void updateAccountforAccrualOnHolidays(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter.getInstance().println("===========Batch updateAccountforCapitalisation===");
			
			//"UPDATE ACCOUNT SET CRINTACCRUEDAMT=?,NEGCRINTACCRUEDAMT=?,POSCRINTACCRUEDAMT=?,DRINTACCRUEDAMT=?,"+
			//" LASTCRINTRATE=?,LASTDRINTRATE=?,LASTEXSINTRATE=?, CRLASTACCRUALDATE =? , DRLASTACCRUALDATE= ?, "+
			//" CRNEXTINTPAYDATE=?,DRNEXTINTPAYDATE=?,LASTCRINTCOMPDATE=?,LASTDRINTCOMPDATE=?, "+
			//" NEXTCRINTCOMPDATE=? , NEXTDRINTCOMPDATE=?,CRINTCOMPOUND=?,DRINTCOMPOUND=? "+
			
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_ACCOUNT_INTEREST_ACCRUAL_HOLIDAYS, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
						scb.util.LogWriter.getInstance().println("wrapper[i].getAccountNumber()"+ wrapper[i].getAccountNumber() + "wrapper[i].getCurrencyCode()"+ wrapper[i].getCurrencyCode());
						stmt.setBigDecimal(1, wrapper[i].getCreditInterestAccrued());
						stmt.setBigDecimal(2, wrapper[i].getNegCrIntAccuredAmt());
						stmt.setBigDecimal(3, wrapper[i].getPosCrIntAccuredAmt());
						stmt.setBigDecimal(4, wrapper[i].getDebitInterestAccrued());
						stmt.setBigDecimal(5, wrapper[i].getLastCrintRate());
						stmt.setBigDecimal(6, wrapper[i].getLastDrintRate());
						stmt.setBigDecimal(7, wrapper[i].getLastExsintRate());
						stmt.setDate(8, wrapper[i].getCrLastAccrualDate());
						stmt.setDate(9, wrapper[i].getDrLastAccrualDate());
						stmt.setDate(10,wrapper[i].getLastcrIntCompoundedDate());
						stmt.setDate(11,wrapper[i].getLastdrIntCompoundedDate());
						stmt.setDate(12,wrapper[i].getCrNextCompDate());
						stmt.setDate(13,wrapper[i].getDrNextCompDate());
						stmt.setBigDecimal(14, wrapper[i].getCrIntToCompound());
						stmt.setBigDecimal(15, wrapper[i].getDrIntToCompound());
						stmt.setString(16, wrapper[i].getCurrencyCode());
						stmt.setString(17, wrapper[i].getAccountNumber().trim());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
			}
		
		
		public void updateProcessStatusInStaging(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter.getInstance().println("===========Batch updateProcessStatusInStaging===");
			try {
				//UPDATE ACCINTPROCSTG SET PROCESSSTATUS = ? WHERE CURRENCYCODE=? AND ACCOUNTNO=? AND EXECDATE=? AND PROCESSTYPE=?
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_STAGING_STATUS, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
						scb.util.LogWriter.getInstance().println("wrapper[i].getAccountNumber()"+ wrapper[i].getAccountNumber() + "wrapper[i].getCurrencyCode()"+ wrapper[i].getCurrencyCode());
						stmt.setString(1, wrapper[i].getProcessStatus());
						stmt.setString(2, wrapper[i].getCurrencyCode());
						stmt.setString(3, wrapper[i].getAccountNumber().trim());
						stmt.setDate(4, wrapper[i].getExecutionDate());
						stmt.setString(5, wrapper[i].getProcessType());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
			}
		
		
		public void deleteProcessStatusInStaging(scb.wrapper.AbstractWrapper[] argWrapper) throws CreateException{

			AccountInterestStagingProcessWrapper[] wrapper =(AccountInterestStagingProcessWrapper[])argWrapper;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			logWriter.println("===========Batch deleteProcessStatusInStaging===");
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(DELETE_STAGING_STATUS, false, false);
				if (wrapper.length!=0){
					for(int i=0;i<wrapper.length;i++){
						scb.util.LogWriter.getInstance().println("wrapper[i].getAccountNumber()"+ wrapper[i].getAccountNumber() + "wrapper[i].getCurrencyCode()"+ wrapper[i].getCurrencyCode());
						stmt.setString(1, wrapper[i].getCurrencyCode());
						stmt.setString(2, wrapper[i].getAccountNumber().trim());
						stmt.setDate(3, wrapper[i].getExecutionDate());
						stmt.setString(4, wrapper[i].getProcessType());
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				}

			}catch (BatchUpdateException b) {
				logWriter.printErrorMessage(b);
				logWriter.println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper[i].getCurrencyCode() +":"+wrapper[i].getAccountNumber());
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					logWriter.println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				logWriter.printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
			}
		
		public void updateAutoCloseFlag(Vector argVector) throws CreateException{

			SubsidiaryAccountWrapper subsidiaryAccountWrapper = null;;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter out = new LogWriter("EOD","updateAutoCloseFlag","updateAutoCloseFlag");		
			try {
				
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_AUTO_CLOSE, false, false);			
				if (argVector!=null && argVector.size()!=0){
					for(int i=0;i<argVector.size();i++){
						subsidiaryAccountWrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);					
						
						stmt.setString(1, Utility.getString(subsidiaryAccountWrapper.autoClose));
						
						if(subsidiaryAccountWrapper.makerDetail != null) {
							stmt.setString(2, subsidiaryAccountWrapper.makerDetail.getUserBranch());
							stmt.setDate(3, subsidiaryAccountWrapper.makerDetail.getUserDate());
							stmt.setString(4, subsidiaryAccountWrapper.makerDetail.getUserID());
							stmt.setString(5, subsidiaryAccountWrapper.makerDetail.getUserIPAddress());
							stmt.setTime(6, subsidiaryAccountWrapper.makerDetail.getUserTime());
						}
						if(subsidiaryAccountWrapper.checkerDetail != null) {
							stmt.setString(7, subsidiaryAccountWrapper.makerDetail.getUserBranch());
							stmt.setDate(8, subsidiaryAccountWrapper.makerDetail.getUserDate());
							stmt.setString(9, subsidiaryAccountWrapper.makerDetail.getUserID());
							stmt.setString(10, subsidiaryAccountWrapper.makerDetail.getUserIPAddress());
							stmt.setTime(11, subsidiaryAccountWrapper.makerDetail.getUserTime());
						}
						
						stmt.setString(12, subsidiaryAccountWrapper.currencyCode);
						stmt.setString(13, subsidiaryAccountWrapper.accountNo);
						
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
				
					 if(enableLeanAccount()) {
						 createTxnAccountHelper();
						 this.txnAccountHelper.updateBatchOfTxnAccountsforInterestAccrual(argVector);
					 }
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +subsidiaryAccountWrapper.currencyCode +":"+subsidiaryAccountWrapper.accountNo);
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}

	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());


			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		}
		
		public void createSCAcct(SubsidiaryAccountWrapper wrapper) throws javax.ejb.CreateException {

			if (logWriter == null) {
				logWriter = new LogWriter("ONLINE", "SubsidiaryAccountHelper", "SubsidiaryAccountHelper", "", true);
			}
			logWriter.println("Inside  createSCAcct of  SubsidiaryAccountHelper");
			SQLExecutor con = null;
			SQLStatementObject stmt=null;
			try
			{
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(INSERT_SECCASHACCT, false, false);
				
				stmt.setString(1, wrapper.currencyCode);
				stmt.setString(2, wrapper.accountNo);
				stmt.setString(3, wrapper.scAcctNo);
				stmt.setString(4, wrapper.scAcctType);
				stmt.setString(5, wrapper.scaCustCategory);
				stmt.setString(6, wrapper.scaCustType);
				if (stmt.executeUpdate() != 1){
					throw new CreateException();
				}
			}
			catch (NamingException ne)
			{
				ne.printStackTrace();
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
			}
			catch (SQLExecuteException sqle)
			{
				sqle.printStackTrace();
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
			finally
			{
				try
				{
					if(stmt != null) {
						stmt.close();
						con.destroy();
					}
				}
				catch (SQLExecuteException sqle)
				{
					sqle.printStackTrace();
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}

			}
		}
		
		public scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper fetchSCAcct(SubsidiaryAccountEntityKey key,SubsidiaryAccountWrapper wrapper) throws javax.ejb.FinderException {

			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			SQLResultObject rs = null;
			if (logWriter == null) {
				logWriter = new LogWriter("ONLINE", "SubsidiaryAccountHelper", "SubsidiaryAccountHelper", "", true);
			}
			logWriter.println("Inside  fetchSCAcct of SubsidiaryAccountHelper");
			try
			{
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				if (key.fetchForUpdate) {
					stmt = con.getStatementObject(SELECT_SECCASHACCT, true, false);
				} else {
					stmt = con.getStatementObject(SELECT_SECCASHACCT, false, false);
				}

				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);

				rs = stmt.executeQuery();
				if (rs.next())
				{
					wrapper.currencyCode = rs.getString(1);
					wrapper.accountNo = rs.getString(2);
					wrapper.scAcctNo = rs.getString(3);
					wrapper.scAcctType = rs.getString(4);
					wrapper.scaCustCategory = rs.getString(5);
					wrapper.scaCustType = rs.getString(6);

				}

			}
			catch (NamingException ne)
			{
				ne.printStackTrace();
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
			}
			catch (SQLExecuteException sqle)
			{
				sqle.printStackTrace();
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
			finally
			{
				try
				{
					if(stmt != null) {
						stmt.close();
					}						
					if(rs != null){
						rs.close();
						con.destroy();
					}
				}
				catch (SQLExecuteException sqle)
				{
					sqle.printStackTrace();
					throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}

			return wrapper;
		}

		public void removeSCAcct(scb.wrapper.PrimaryKey argKey) throws javax.ejb.RemoveException {
			if (logWriter == null) {
				logWriter = new LogWriter("ONLINE", "SubsidiaryAccountHelper", "SubsidiaryAccountHelper", "", true);
			}
			logWriter.println("Inside  removeSCAcct of SubsidiaryAccountHelper");
			SQLExecutor con = null;
			SQLStatementObject stmt=null;
			SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;


			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(DELETE_SECCASHACCT, false, false);
				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				logWriter.println(" Assinged  removeSCAcct SubsidiaryAccountHelper");

				stmt.executeUpdate();

			} catch (NamingException ne) {
				ne.printStackTrace();
				throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);
			} catch (SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			} finally {
				try {
					if(stmt != null) {
						stmt.close();
						con.destroy();
					}
				} catch	(SQLExecuteException sqle) {
					sqle.printStackTrace();
					throw new RemoveException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

				}
			}
		}
		
		public void updateBatchforExcessCharge(Vector argVector) throws CreateException{

			SubsidiaryAccountWrapper wrapper = null;;
			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			scb.util.LogWriter out = new LogWriter("EOD","updateBatchforExcessCharge","updateBatchforExcessCharge");		
			try {
				//Date eoddate=getEODDate();
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(UPDATE_ACCOUNT_EXCESSACCURAL, false, false);			
				if (argVector!=null && argVector.size()!=0){
					for(int i=0;i<argVector.size();i++){
						wrapper =(SubsidiaryAccountWrapper) argVector.elementAt(i);	
						stmt.setDate(1, wrapper.exLastChrgPayDate);
						stmt.setBigDecimal(2, wrapper.exChrgAccruedAmount);
						stmt.setString(3, wrapper.currencyCode);
						stmt.setString(4, wrapper.accountNo);
						stmt.addBatch();
					}
					 scb.util.LogWriter.getInstance().printDebugMode(" Entity : before executing batch");
					 int result[] = stmt.executeBatch();
					
				}

			}catch (BatchUpdateException b) {
				scb.util.LogWriter.getInstance().printErrorMessage(b);
				scb.util.LogWriter.getInstance().println(b.getSQLState() + b.getMessage() + b.getErrorCode());
				int[] updateCounts = b.getUpdateCounts();
				for (int i = 0; i < updateCounts.length; i++) {
					logWriter.println("Problem in Batch number " + i + ":"+ updateCounts[i] + " " +wrapper.currencyCode +":"+wrapper.accountNo);
				}
				SQLException ex = b.getNextException();
				while (ex != null) {
					scb.util.LogWriter.getInstance().println(ex.getSQLState() + ex.getMessage() + ex.getErrorCode());
					ex = ex.getNextException();
				}
				if(ex != null) {
	         	throw new CreateException(ex.getSQLState() + scb.util.EBBSConstants.MESSAGE_DELIMITER + ex.getMessage());
				}

			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
				}
			}
		}
	
		
		public void insertIntoSAccount(SubsidiaryAccountEntityKey key,SubsidiaryAccountWrapper wrapper) throws javax.ejb.CreateException {

			SQLExecutor con = null;
			SQLStatementObject stmt = null;
			
			try {
				Date eoddate=getEODDate();
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(INSERT_SACCOUNT, false, false);

				stmt.setString(1, key.currencyCode);
				stmt.setString(2, key.accountNo);
				stmt.setString(3, wrapper.productCode);
				stmt.setString(4, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
				stmt.setString(5, wrapper.accountTitle);
				stmt.setString(6, wrapper.segmentCode);
				stmt.setString(7, wrapper.accountBranch);
				stmt.setDate(8, wrapper.accountOpenDate);
				stmt.setString(9, wrapper.accountClassCode);
				stmt.setString(10,Utility.getString(wrapper.conSolStmtFlag));
				stmt.setString(11, wrapper.accountClosureReason);
				stmt.setDate(12, wrapper.accountCloseDate);
				stmt.setString(13, Utility.getString(wrapper.accountCurrentStatus));
				stmt.setDate(14, wrapper.accountReOpenDate);
				stmt.setString(15, wrapper.accountReOpenReason);
				stmt.setDate(16, wrapper.transToDormantDate);
				stmt.setDate(17, wrapper.transToUnclaimDate);
				stmt.setDate(18, wrapper.reactiveDate);
				stmt.setString(19, wrapper.masterNo);
				if(wrapper.accountCategory=='\u0000'){
					wrapper.accountCategory='N';
				} 
				stmt.setString(20, Utility.getString(wrapper.accountCategory));
				
				stmt.setString(21, wrapper.glDepartmentID);
				stmt.setString(22, Utility.getString(wrapper.autoClose));
				stmt.setString(23, Utility.getString(wrapper.cacsIndicator));
				stmt.setString(24, wrapper.referralID);
				stmt.setString(25, wrapper.closingID);
				if(wrapper.IBAN == null){
					try{
						
						NumberGeneratorFactory numberGeneratorFactoryInstance=NumberGeneratorFactory.getInstance();
						if(numberGeneratorFactoryInstance!=null){
							numberGeneratorFactoryInstance.setNumberGeneratorFactoryBPP(BusinessProcessConstants.IBAN_PROCESSID);
							wrapper.IBAN=numberGeneratorFactoryInstance.getNumberGeneratorInstance().generateNumber(wrapper);
							scb.util.LogWriter.getInstance("SOP","CLNUP").println("IBAN for this account in SubAccHelper is..."+wrapper.IBAN);
							stmt.setString(26, wrapper.IBAN);
						}
					}
					catch (Exception ex) {
						ex.printStackTrace();
						try {
							stmt.setString(26, wrapper.IBAN);
						} catch (scb.exception.SCBApplicationException e1) {
							e1.printStackTrace();
						}
					}
				}
				else{
					stmt.setString(26, wrapper.IBAN);
				}
				stmt.setString(27, wrapper.deptCode);
				stmt.setString(28, wrapper.accountTitle2);
				stmt.setString(29, wrapper.sourcingID);
				stmt.setString(30, Utility.getString(wrapper.crIntIndicatorFlag));
				stmt.setString(31, Utility.getString(wrapper.isIncludedInInterestPooling));
				stmt.setString(32, Utility.getString(wrapper.interestInSuspenceFlag));
				if (wrapper.interestCode != null) {
					stmt.setString(33, wrapper.interestCode);
				} else {
					stmt.setString(33, "9999");
				}
				stmt.setString(34, Utility.getString(wrapper.bulkChargesFlag));
				stmt.setString(35, Utility.getString(wrapper.advIntIndicator));
				stmt.setString(36, Utility.getString(wrapper.supressInterestStmtFlag));
				stmt.setString(37, wrapper.creditInterestPrdCode);
				stmt.setString(38, Utility.getString(wrapper.suppressAdviceFlag));
				stmt.setString(39, Utility.getString(wrapper.ignoreChargeAdvice));
				stmt.setString(40, wrapper.limitNo);
				stmt.setString(41, wrapper.limitMasterNo);
				stmt.setString(42, wrapper.makerDetail.getUserBranch());
				stmt.setDate(43, wrapper.makerDetail.getUserDate());
				stmt.setString(44, wrapper.makerDetail.getUserID());
				stmt.setString(45, wrapper.makerDetail.getUserIPAddress());
				stmt.setTime(46, wrapper.makerDetail.getUserTime());
				stmt.setString(47, wrapper.checkerDetail.getUserBranch());
				stmt.setDate(48, wrapper.checkerDetail.getUserDate());
				stmt.setString(49, wrapper.checkerDetail.getUserID());
				stmt.setString(50, wrapper.checkerDetail.getUserIPAddress());
				stmt.setTime(51, wrapper.checkerDetail.getUserTime());
				if (stmt.executeUpdate() != 1) {
					throw new CreateException();
				}
			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

			finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

				}

			}

		}
		public void updateIntoSAccount(SubsidiaryAccountWrapper wrapper) throws CreateException {
			
			SQLExecutor con = null;
			SQLStatementObject stmt = null;

			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
				stmt = con.getStatementObject(STORE_SACCOUNT, false, false);

				stmt.setString(1, wrapper.masterNo);
				stmt.setString(2, Utility.removeNonPrintableAndLinefeed(wrapper.shortName));
				stmt.setString(3, wrapper.productCode);
				stmt.setString(4, wrapper.segmentCode);
				stmt.setString(5, wrapper.accountTitle);
				stmt.setString(6, wrapper.accountBranch);
				stmt.setDate(7, wrapper.accountOpenDate);
				stmt.setString(8, wrapper.accountClassCode);
				stmt.setString(9, Utility.getString(wrapper.conSolStmtFlag));
				stmt.setString(10, wrapper.accountClosureReason);
				stmt.setDate(11, wrapper.accountCloseDate);
				stmt.setString(12,  Utility.getString(wrapper.accountCurrentStatus));
				stmt.setDate(13, wrapper.accountReOpenDate);
				stmt.setString(14, wrapper.accountReOpenReason);
				stmt.setDate(15, wrapper.transToDormantDate);
				stmt.setDate(16, wrapper.transToUnclaimDate);
				stmt.setDate(17, wrapper.reactiveDate);
				stmt.setString(18,  Utility.getString(wrapper.accountCategory));
				stmt.setString(19, wrapper.glDepartmentID);
				stmt.setString(20, Utility.getString(wrapper.autoClose));
				stmt.setString(21, Utility.getString(wrapper.cacsIndicator));
				stmt.setString(22, wrapper.referralID);
				stmt.setString(23, wrapper.closingID);
				stmt.setString(24, wrapper.IBAN);
				stmt.setString(25, wrapper.deptCode);
				stmt.setString(26, wrapper.accountTitle2);
				stmt.setString(27, wrapper.sourcingID);
				stmt.setString(28, Utility.getString(wrapper.crIntIndicatorFlag));
				stmt.setString(29, Utility.getString(wrapper.isIncludedInInterestPooling));
				stmt.setString(30, Utility.getString(wrapper.interestInSuspenceFlag));
				stmt.setString(31, wrapper.interestCode);
				stmt.setString(32, Utility.getString(wrapper.bulkChargesFlag));
				stmt.setString(33, Utility.getString(wrapper.advIntIndicator));
				stmt.setString(34, Utility.getString(wrapper.supressInterestStmtFlag));
				stmt.setString(35, wrapper.creditInterestPrdCode);
				stmt.setString(36, Utility.getString(wrapper.suppressAdviceFlag));
				stmt.setString(37, Utility.getString(wrapper.ignoreChargeAdvice));
				stmt.setString(38, wrapper.limitNo);
				stmt.setString(39, wrapper.limitMasterNo);
				stmt.setString(40, wrapper.makerDetail.getUserBranch());
				stmt.setDate(41, wrapper.makerDetail.getUserDate());
				stmt.setString(42, wrapper.makerDetail.getUserID());
				stmt.setString(43, wrapper.makerDetail.getUserIPAddress());
				stmt.setTime(44, wrapper.makerDetail.getUserTime());
				stmt.setString(45, wrapper.checkerDetail.getUserBranch());
				stmt.setDate(46, wrapper.checkerDetail.getUserDate());
				stmt.setString(47, wrapper.checkerDetail.getUserID());
				stmt.setString(48, wrapper.checkerDetail.getUserIPAddress());
				stmt.setTime(49, wrapper.checkerDetail.getUserTime());
				
				stmt.setString(50, wrapper.currencyCode);
				stmt.setString(51, wrapper.accountNo);

				if (stmt.executeUpdate() <= 0) {
					throw new CreateException();
				}

			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
				// reengineering
				throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			} finally {
				try {
					if (stmt != null) {
						stmt.close();
					}
					if (con != null) {
						con.destroy();
					}

				} catch (SQLExecuteException sqle) {
					scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
					throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

				}

			}

		}

	/**
	 * createLinkAccountInformations method comment
	 *
	 * @author Mohd Kamran
	 * @Creation date (28/04/2005 5:38:35 PM)
	 * @Purpose Inserts LinkAccountInformtation Details into LINKACINFO table
	 * @param key
	 *            scb.ebbs.accounts.ejb.SubsidiaryAccountEntityKey
	 * @param wrapper[]
	 *            scb.ebbs.accounts.wrapper.LinkAccountInformationWrapper
	 * @exception scb.exception.javax.ejb.CreateException
	 *                The exception description.
	 */

	public void createLinkAccountInformations(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper subsidiaryAccountWrapper) throws javax.ejb.CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## createLinkAccountInformations() ## inside");

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(INSERT_LINKACINFO, false, false);

			LinkAccountInformationWrapper[] wrapper = subsidiaryAccountWrapper.linkAccountInformationWrapper;

			for (int i = 0; i < wrapper.length; i++) {
				scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## createLinkAccountInformations() ## inside loop #" + wrapper[i].seqNo);
				stmt.setString(1, Utility.leftPad(String.valueOf(wrapper[i].seqNo), 4, '0'));
				stmt.setString(2, key.currencyCode);
				stmt.setString(3, key.accountNo.trim());
				stmt.setString(4, wrapper[i].beneType);
				stmt.setString(5, wrapper[i].entityName);
				stmt.setString(6, wrapper[i].street);
				stmt.setString(7, wrapper[i].postalCode);
				stmt.setString(8, wrapper[i].city);
				stmt.setString(9, wrapper[i].country);
				stmt.setString(10, wrapper[i].salutation);
				stmt.setString(11, wrapper[i].givenName);
				stmt.setString(12, wrapper[i].lastName);
				stmt.setString(13, wrapper[i].address);
				stmt.setString(14, wrapper[i].germanTaxId);
				stmt.setString(15, wrapper[i].businessId);
				if (wrapper[i].makerDetail == null) {
					wrapper[i].makerDetail = new UserDetail();
				}
				stmt.setString(16, wrapper[i].makerDetail.getUserBranch());
				stmt.setDate(17, wrapper[i].makerDetail.getUserDate());
				stmt.setString(18, wrapper[i].makerDetail.getUserID());
				stmt.setString(19, wrapper[i].makerDetail.getUserIPAddress());
				stmt.setTime(20, wrapper[i].makerDetail.getUserTime());
				if (wrapper[i].checkerDetail == null) {
					wrapper[i].checkerDetail = new UserDetail();
				}
				stmt.setString(21, wrapper[i].checkerDetail.getUserBranch());
				stmt.setDate(22, wrapper[i].checkerDetail.getUserDate());
				stmt.setString(23, wrapper[i].checkerDetail.getUserID());
				stmt.setString(24, wrapper[i].checkerDetail.getUserIPAddress());
				stmt.setTime(25, wrapper[i].checkerDetail.getUserTime());
				stmt.setShort(26, subsidiaryAccountWrapper.statusFlag);

				if (stmt.executeUpdate() <= 0) {
					throw new CreateException();
				}
				scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## createLinkAccountInformations() ## inserted");
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}
		}
	}

	public LinkAccountInformationWrapper[] fetchLinkAccountInformations(SubsidiaryAccountEntityKey key) throws javax.ejb.FinderException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		LinkAccountInformationWrapper[] resultWrapper = null;
		LinkAccountInformationWrapper wrapper = null;
		Vector result = new Vector();

		try {
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## fetchLinkAccountInformations() ## started");

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);

			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_LINKACINFO, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_LINKACINFO, false, false);
			}

			stmt.setString(1, key.accountNo.trim());
			stmt.setString(2, key.currencyCode);
			stmt.setShort(3, EBBSConstants.MARKED_DELETE);

			rs = stmt.executeQuery();

			while (rs.next()) {
				scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## fetchLinkAccountInformations() ## fetched");
				wrapper = new LinkAccountInformationWrapper();
				wrapper.seqNo = Integer.parseInt(rs.getString(1).trim());
				wrapper.linkCurrencyCode = rs.getString(2);
				wrapper.linkAccountNumber = rs.getString(3) != null ? rs.getString(3).trim() : rs.getString(3);
				wrapper.beneType = rs.getString(4);
				wrapper.entityName = rs.getString(5);
				wrapper.street = rs.getString(6);
				wrapper.postalCode = rs.getString(7);
				wrapper.city = rs.getString(8);
				wrapper.country = rs.getString(9);
				wrapper.salutation = rs.getString(10);
				wrapper.givenName = rs.getString(11);
				wrapper.lastName = rs.getString(12);
				wrapper.address = rs.getString(13);
				wrapper.germanTaxId = rs.getString(14);
				wrapper.businessId = rs.getString(15);
				wrapper.makerDetail = new UserDetail();
				wrapper.makerDetail.setUserBranch(rs.getString(16));
				wrapper.makerDetail.setUserDate(rs.getDate(17));
				wrapper.makerDetail.setUserID(rs.getString(18));
				wrapper.makerDetail.setUserIPAddress(rs.getString(19));
				wrapper.makerDetail.setUserTime(rs.getTime(20));
				wrapper.checkerDetail = new UserDetail();
				wrapper.checkerDetail.setUserBranch(rs.getString(21));
				wrapper.checkerDetail.setUserDate(rs.getDate(22));
				wrapper.checkerDetail.setUserID(rs.getString(23));
				wrapper.checkerDetail.setUserIPAddress(rs.getString(24));
				wrapper.checkerDetail.setUserTime(rs.getTime(25));
				wrapper.statusFlag = rs.getShort(26);
				wrapper.recordStatus = EBBSConstants.NO_CHANGE;
				result.addElement(wrapper);
				if (wrapper!=null && wrapper.linkAccountNumber != null) {
					scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## fetchLinkAccountInformations() ## linkAccountNumber " + wrapper.linkAccountNumber + "#" + wrapper.seqNo);
				}
			}

			if (result.size() > 0) {
				resultWrapper = new LinkAccountInformationWrapper[result.size()];
				result.copyInto(resultWrapper);
			}
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## fetchLinkAccountInformations() ## result added");
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				// changes done by venkat for India eBBS on 06/08/2007 to close
				// resultset prior to preparedstatement
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				// end
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
		scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## fetchLinkAccountInformations() ## returned");

		return resultWrapper;
	}

	public void updateLinkAccountInformations(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper subsidiaryAccountWrapper) throws CreateException {

		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		try {
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## updateLinkAccountInformations() ## inside");

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(this.UPDATE_LINKACINFO, false, false);

			LinkAccountInformationWrapper[] wrapper = subsidiaryAccountWrapper.linkAccountInformationWrapper;

			for (int i = 0; i < wrapper.length; i++) {
				scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## updateLinkAccountInformations() ## inside loop # "+ wrapper[i].seqNo );

				stmt.setString(1, wrapper[i].beneType);
				stmt.setString(2, wrapper[i].entityName);
				stmt.setString(3, wrapper[i].street);
				stmt.setString(4, wrapper[i].postalCode);
				stmt.setString(5, wrapper[i].city);
				stmt.setString(6, wrapper[i].country);
				stmt.setString(7, wrapper[i].salutation);
				stmt.setString(8, wrapper[i].givenName);
				stmt.setString(9, wrapper[i].lastName);
				stmt.setString(10, wrapper[i].address);
				stmt.setString(11, wrapper[i].germanTaxId);
				stmt.setString(12, wrapper[i].businessId);
				if (wrapper[i].makerDetail == null) {
					wrapper[i].makerDetail = new UserDetail();
				}
				stmt.setString(13, wrapper[i].makerDetail.getUserBranch());
				stmt.setDate(14, wrapper[i].makerDetail.getUserDate());
				stmt.setString(15, wrapper[i].makerDetail.getUserID());
				stmt.setString(16, wrapper[i].makerDetail.getUserIPAddress());
				stmt.setTime(17, wrapper[i].makerDetail.getUserTime());
				if (wrapper[i].checkerDetail == null) {
					wrapper[i].checkerDetail = new UserDetail();
				}
				stmt.setString(18, wrapper[i].checkerDetail.getUserBranch());
				stmt.setDate(19, wrapper[i].checkerDetail.getUserDate());
				stmt.setString(20, wrapper[i].checkerDetail.getUserID());
				stmt.setString(21, wrapper[i].checkerDetail.getUserIPAddress());
				stmt.setTime(22, wrapper[i].checkerDetail.getUserTime());
				stmt.setShort(23, subsidiaryAccountWrapper.statusFlag);
				stmt.setString(24, key.currencyCode);
				stmt.setString(25, key.accountNo.trim());
				stmt.setString(26,  Utility.leftPad(String.valueOf(wrapper[i].seqNo), 4, '0'));
				stmt.executeUpdate();
				scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## updateLinkAccountInformations() ## updated");
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}
	}

	public LinkAccountInformationWrapper[] modifyLinkAccountInformations(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper subsidiaryAccountWrapper) throws CreateException {

		SQLExecutor con = null;
		LinkAccountInformationWrapper[] newWrapper = null;
		SQLStatementObject stmtInsert = null;
		SQLStatementObject stmtUpdate = null;
		SQLStatementObject stmtDelete = null;

		try {

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmtInsert = con.getStatementObject(INSERT_LINKACINFO, false, false);
			stmtUpdate = con.getStatementObject(UPDATE_LINKACINFO, false, false);
			stmtDelete = con.getStatementObject(MODIFY_DELETE_LINKACINFO, false, false);

			Vector vector = new Vector();
			LinkAccountInformationWrapper[] wrapper = subsidiaryAccountWrapper.linkAccountInformationWrapper;

			for (int i = 0; i < wrapper.length; i++) {
			    logWriter.println(
				    "Key Currency Code/Key Account No/Wrapper Currency Code/Wrapper Account No: "
					    + key.currencyCode + "/" + key.accountNo + "/" + wrapper[i].linkCurrencyCode
					    + "/" + wrapper[i].linkAccountNumber + "/" + wrapper[i].linkAccountNumber +"/"+wrapper[i].seqNo);
				if (wrapper[i].recordStatus == EBBSConstants.NEW) {
					scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## modifyLinkAccountInformations() ## inside New");
					stmtInsert.setString(1,  Utility.leftPad(String.valueOf(wrapper[i].seqNo), 4, '0'));
					stmtInsert.setString(2, key.currencyCode);
					stmtInsert.setString(3, key.accountNo.trim());
					stmtInsert.setString(4, wrapper[i].beneType);
					stmtInsert.setString(5, wrapper[i].entityName);
					stmtInsert.setString(6, wrapper[i].street);
					stmtInsert.setString(7, wrapper[i].postalCode);
					stmtInsert.setString(8, wrapper[i].city);
					stmtInsert.setString(9, wrapper[i].country);
					stmtInsert.setString(10, wrapper[i].salutation);
					stmtInsert.setString(11, wrapper[i].givenName);
					stmtInsert.setString(12, wrapper[i].lastName);
					stmtInsert.setString(13, wrapper[i].address);
					stmtInsert.setString(14, wrapper[i].germanTaxId);
					stmtInsert.setString(15, wrapper[i].businessId);
					if (wrapper[i].makerDetail == null) {
						wrapper[i].makerDetail = new UserDetail();
					}
					stmtInsert.setString(16, wrapper[i].makerDetail.getUserBranch());
					stmtInsert.setDate(17, wrapper[i].makerDetail.getUserDate());
					stmtInsert.setString(18, wrapper[i].makerDetail.getUserID());
					stmtInsert.setString(19, wrapper[i].makerDetail.getUserIPAddress());
					stmtInsert.setTime(20, wrapper[i].makerDetail.getUserTime());
					if (wrapper[i].checkerDetail == null) {
						wrapper[i].checkerDetail = new UserDetail();
					}
					stmtInsert.setString(21, wrapper[i].checkerDetail.getUserBranch());
					stmtInsert.setDate(22, wrapper[i].checkerDetail.getUserDate());
					stmtInsert.setString(23, wrapper[i].checkerDetail.getUserID());
					stmtInsert.setString(24, wrapper[i].checkerDetail.getUserIPAddress());
					stmtInsert.setTime(25, wrapper[i].checkerDetail.getUserTime());
					stmtInsert.setShort(26, subsidiaryAccountWrapper.statusFlag);
					stmtInsert.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.MODIFIED) {
					scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## modifyLinkAccountInformations() ## inside");
					stmtUpdate.setString(1, wrapper[i].beneType);
					stmtUpdate.setString(2, wrapper[i].entityName);
					stmtUpdate.setString(3, wrapper[i].street);
					stmtUpdate.setString(4, wrapper[i].postalCode);
					stmtUpdate.setString(5, wrapper[i].city);
					stmtUpdate.setString(6, wrapper[i].country);
					stmtUpdate.setString(7, wrapper[i].salutation);
					stmtUpdate.setString(8, wrapper[i].givenName);
					stmtUpdate.setString(9, wrapper[i].lastName);
					stmtUpdate.setString(10, wrapper[i].address);
					stmtUpdate.setString(11, wrapper[i].germanTaxId);
					stmtUpdate.setString(12, wrapper[i].businessId);
					if (wrapper[i].makerDetail == null) {
						wrapper[i].makerDetail = new UserDetail();
					}
					stmtUpdate.setString(13, wrapper[i].makerDetail.getUserBranch());
					stmtUpdate.setDate(14, wrapper[i].makerDetail.getUserDate());
					stmtUpdate.setString(15, wrapper[i].makerDetail.getUserID());
					stmtUpdate.setString(16, wrapper[i].makerDetail.getUserIPAddress());
					stmtUpdate.setTime(17, wrapper[i].makerDetail.getUserTime());
					if (wrapper[i].checkerDetail == null) {
						wrapper[i].checkerDetail = new UserDetail();
					}
					stmtUpdate.setString(18, wrapper[i].checkerDetail.getUserBranch());
					stmtUpdate.setDate(19, wrapper[i].checkerDetail.getUserDate());
					stmtUpdate.setString(20, wrapper[i].checkerDetail.getUserID());
					stmtUpdate.setString(21, wrapper[i].checkerDetail.getUserIPAddress());
					stmtUpdate.setTime(22, wrapper[i].checkerDetail.getUserTime());
					stmtUpdate.setShort(23, subsidiaryAccountWrapper.statusFlag);
					stmtUpdate.setString(24, key.currencyCode);
					stmtUpdate.setString(25, key.accountNo.trim());
					stmtUpdate.setString(26,  Utility.leftPad(String.valueOf(wrapper[i].seqNo), 4, '0'));
					stmtUpdate.executeUpdate();
					vector.addElement(wrapper[i]);

				} else if (wrapper[i].recordStatus == EBBSConstants.DELETED) {
					scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## modifyLinkAccountInformations() ## insideDelete");
					stmtDelete.setShort(1, EBBSConstants.MARKED_DELETE);
					stmtDelete.setString(2, key.currencyCode);
					stmtDelete.setString(3, key.accountNo.trim());
					stmtDelete.setString(4,  Utility.leftPad(String.valueOf(wrapper[i].seqNo), 4, '0'));
					stmtDelete.executeUpdate();

				} else {
					vector.addElement(wrapper[i]);
				}
			}

			if (vector.size() > 0) {
				newWrapper = new LinkAccountInformationWrapper[vector.size()];
				vector.copyInto(newWrapper);
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {

				if (stmtInsert != null) {
					stmtInsert.close();
				}
				if (stmtUpdate != null) {
					stmtUpdate.close();
				}
				if (stmtDelete != null) {
					stmtDelete.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			}
		}

		return newWrapper;
	}

	public void removeLinkAccountInformations(PrimaryKey argKey) throws javax.ejb.RemoveException {

		SQLExecutor con = null;
		SubsidiaryAccountEntityKey key = (SubsidiaryAccountEntityKey) argKey;
		SQLStatementObject stmt = null;

		try {
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## removeLinkAccountInformations() ## inside");

			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(DELETE_LINKACINFO, false, false);
			stmt.setShort(1, EBBSConstants.MARKED_DELETE);
			stmt.setString(2, key.currencyCode);
			stmt.setString(3, key.accountNo.trim());
			stmt.executeUpdate();
			scb.util.LogWriter.getInstance().println("SubsidiaryAccountHelper ## removeLinkAccountInformations() ## removed");

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);// //- F16
			// reengineering
			throw new RemoveException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
			// F16
			// reengineering
			throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);// //-
				// F16
				// reengineering
				throw new RemoveException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}
		}
	}

		private scb.ebbs.accounts.wrapper.SubsidiaryAccountWrapper loadDataForSAccounts(String argCurrencyCode,String argAccountNo) throws javax.ejb.FinderException, SQLExecuteException {
			SQLExecutor con = null;
			SubsidiaryAccountWrapper subsidiaryAccountWrapper = null;
			SQLStatementObject stmt = null;
			SQLResultObject rs = null;
			try {
				con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
					stmt = con.getStatementObject(SELECT_SACCOUNT, false, false);
				stmt.setString(1, argCurrencyCode);
				stmt.setString(2, argAccountNo);
				rs = stmt.executeQuery();
				if (rs.next()) {
					int i = 1;
					subsidiaryAccountWrapper = new SubsidiaryAccountWrapper();
					subsidiaryAccountWrapper.currencyCode = rs.getString(i++);
					subsidiaryAccountWrapper.accountNo = rs.getString(i++);
					subsidiaryAccountWrapper.masterNo = rs.getString(i++);
					subsidiaryAccountWrapper.shortName = rs.getString(i++);
					subsidiaryAccountWrapper.productCode = rs.getString(i++);
					subsidiaryAccountWrapper.segmentCode = rs.getString(i++);
					subsidiaryAccountWrapper.accountTitle = rs.getString(i++);
					subsidiaryAccountWrapper.accountBranch = rs.getString(i++);
					subsidiaryAccountWrapper.accountOpenDate = rs.getDate(i++);
					subsidiaryAccountWrapper.accountClassCode = rs.getString(i++);
					subsidiaryAccountWrapper.conSolStmtFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.accountClosureReason = rs.getString(i++);
					subsidiaryAccountWrapper.accountCloseDate = rs.getDate(i++);
					subsidiaryAccountWrapper.accountCurrentStatus = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.accountReOpenDate = rs.getDate(i++);
					subsidiaryAccountWrapper.accountReOpenReason = rs.getString(i++);
					subsidiaryAccountWrapper.transToDormantDate = rs.getDate(i++);
					subsidiaryAccountWrapper.transToUnclaimDate = rs.getDate(i++);
					subsidiaryAccountWrapper.reactiveDate = rs.getDate(i++);
					subsidiaryAccountWrapper.accountCategory = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.glDepartmentID = rs.getString(i++);
					subsidiaryAccountWrapper.autoClose = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.cacsIndicator = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.referralID = rs.getString(i++);
					subsidiaryAccountWrapper.closingID = rs.getString(i++);
					subsidiaryAccountWrapper.IBAN = rs.getString(i++);
					subsidiaryAccountWrapper.deptCode = rs.getString(i++);
					subsidiaryAccountWrapper.accountTitle2 = rs.getString(i++);
					subsidiaryAccountWrapper.sourcingID = rs.getString(i++);
					subsidiaryAccountWrapper.crIntIndicatorFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.isIncludedInInterestPooling = Utility.getChar(rs.getString(i++)); 
					subsidiaryAccountWrapper.interestInSuspenceFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.interestCode = rs.getString(i++);
					subsidiaryAccountWrapper.bulkChargesFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.advIntIndicator = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.supressStatementFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.creditInterestPrdCode = rs.getString(i++);
					subsidiaryAccountWrapper.suppressAdviceFlag = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.ignoreChargeAdvice = Utility.getChar(rs.getString(i++));
					subsidiaryAccountWrapper.limitNo = rs.getString(i++);
					subsidiaryAccountWrapper.limitMasterNo = rs.getString(i++);
					
				} 
			} catch (NamingException ne) {
				scb.util.LogWriter.getInstance().printErrorMessage(ne);
				throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
			} finally {
				
				if (rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
				}
					return subsidiaryAccountWrapper;
				
		}
		
		private boolean isFieldModified(SubsidiaryAccountWrapper newWRap, SubsidiaryAccountWrapper oldWrap) {
			boolean returnValue = false;
			if(newWRap!=null && oldWrap !=null) {

				if((newWRap.productCode!=null && oldWrap.productCode ==null) || (newWRap.productCode==null && oldWrap.productCode !=null) || (newWRap.productCode!=null && oldWrap.productCode !=null && !newWRap.productCode.equalsIgnoreCase(oldWrap.productCode))) {
					return true;
				}
				if((newWRap.masterNo!=null && oldWrap.masterNo ==null) || (newWRap.masterNo==null && oldWrap.masterNo !=null) || (newWRap.masterNo!=null && oldWrap.masterNo !=null && !newWRap.masterNo.equalsIgnoreCase(oldWrap.masterNo))) {
					return true;
				}
				if((newWRap.shortName!=null && oldWrap.shortName ==null) || (newWRap.shortName==null && oldWrap.shortName !=null) || (newWRap.shortName!=null && oldWrap.shortName !=null && !newWRap.shortName.equalsIgnoreCase(oldWrap.shortName))) {
					return true;
				}
				if((newWRap.accountTitle!=null && oldWrap.accountTitle ==null) || (newWRap.accountTitle==null && oldWrap.accountTitle !=null) || (newWRap.accountTitle!=null && oldWrap.accountTitle !=null && !newWRap.accountTitle.equalsIgnoreCase(oldWrap.accountTitle))) {
					return true;
				}
				if((newWRap.segmentCode!=null && oldWrap.segmentCode ==null) || (newWRap.segmentCode==null && oldWrap.segmentCode !=null) || (newWRap.segmentCode!=null && oldWrap.segmentCode !=null && !newWRap.segmentCode.equalsIgnoreCase(oldWrap.segmentCode))) {
					return true;
				}
				if((newWRap.accountBranch!=null && oldWrap.accountBranch ==null) || (newWRap.accountBranch==null && oldWrap.accountBranch !=null) || (newWRap.accountBranch!=null && oldWrap.accountBranch !=null && !newWRap.accountBranch.equalsIgnoreCase(oldWrap.accountBranch))) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.accountOpenDate, oldWrap.accountOpenDate)==0)){
					return true;
				}
				if((newWRap.accountClassCode!=null && oldWrap.accountClassCode ==null) || (newWRap.accountClassCode==null && oldWrap.accountClassCode !=null) || (newWRap.accountClassCode!=null && oldWrap.accountClassCode !=null && !newWRap.accountClassCode.equalsIgnoreCase(oldWrap.accountClassCode))) {
					return true;
				}
				if((newWRap.conSolStmtFlag!= '\u0000' && oldWrap.conSolStmtFlag == '\u0000') || (newWRap.conSolStmtFlag == '\u0000' && oldWrap.conSolStmtFlag != '\u0000') || (newWRap.conSolStmtFlag != '\u0000' && oldWrap.conSolStmtFlag != '\u0000' && newWRap.conSolStmtFlag != oldWrap.conSolStmtFlag)) {
					return true;
				}
				if((newWRap.accountClosureReason!=null && oldWrap.accountClosureReason ==null) || (newWRap.accountClosureReason==null && oldWrap.accountClosureReason !=null) || (newWRap.accountClosureReason!=null && oldWrap.accountClosureReason !=null && !newWRap.accountClosureReason.equalsIgnoreCase(oldWrap.accountClosureReason))) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.accountCloseDate, oldWrap.accountCloseDate)==0)){
					return true;
				}
				if((newWRap.accountCurrentStatus!= '\u0000' && oldWrap.accountCurrentStatus == '\u0000') || (newWRap.accountCurrentStatus == '\u0000' && oldWrap.accountCurrentStatus != '\u0000') || (newWRap.accountCurrentStatus != '\u0000' && oldWrap.accountCurrentStatus != '\u0000' && newWRap.accountCurrentStatus != oldWrap.accountCurrentStatus)) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.accountReOpenDate, oldWrap.accountReOpenDate)==0)){
					return true;
				}
				if((newWRap.accountReOpenReason!=null && oldWrap.accountReOpenReason ==null) || (newWRap.accountReOpenReason==null && oldWrap.accountReOpenReason !=null) || (newWRap.accountReOpenReason!=null && oldWrap.accountReOpenReason !=null && !newWRap.accountReOpenReason.equalsIgnoreCase(oldWrap.accountReOpenReason))) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.transToDormantDate, oldWrap.transToDormantDate)==0)){
					return true;
				}
				if((newWRap.glDepartmentID!=null && oldWrap.glDepartmentID ==null) || (newWRap.glDepartmentID==null && oldWrap.glDepartmentID !=null) || (newWRap.glDepartmentID!=null && oldWrap.glDepartmentID !=null && !newWRap.glDepartmentID.equalsIgnoreCase(oldWrap.glDepartmentID))) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.transToUnclaimDate, oldWrap.transToUnclaimDate)==0)){
					return true;
				}
				if((newWRap.referralID!=null && oldWrap.referralID ==null) || (newWRap.referralID==null && oldWrap.referralID !=null) || (newWRap.referralID!=null && oldWrap.referralID !=null && !newWRap.referralID.equalsIgnoreCase(oldWrap.referralID))) {
					return true;
				}
				if(!(DateUtility.compare(newWRap.reactiveDate, oldWrap.reactiveDate)==0)){
					return true;
				}
				if((newWRap.accountCategory!= '\u0000' && oldWrap.accountCategory == '\u0000') || (newWRap.accountCategory == '\u0000' && oldWrap.accountCategory != '\u0000') || (newWRap.accountCategory != '\u0000' && oldWrap.accountCategory != '\u0000' && newWRap.accountCategory != oldWrap.accountCategory)) {
					return true;
				}

				if((newWRap.autoClose!= '\u0000' && oldWrap.autoClose == '\u0000') || (newWRap.autoClose == '\u0000' && oldWrap.autoClose != '\u0000') || (newWRap.autoClose != '\u0000' && oldWrap.autoClose != '\u0000' && newWRap.autoClose != oldWrap.autoClose)) {
					return true;
				}
				if((newWRap.cacsIndicator!= '\u0000' && oldWrap.cacsIndicator == '\u0000') || (newWRap.cacsIndicator == '\u0000' && oldWrap.cacsIndicator != '\u0000') || (newWRap.cacsIndicator != '\u0000' && oldWrap.cacsIndicator != '\u0000' && newWRap.cacsIndicator != oldWrap.cacsIndicator)) {
					return true;
				}

				if((newWRap.closingID!=null && oldWrap.closingID ==null) || (newWRap.closingID==null && oldWrap.closingID !=null) || (newWRap.closingID!=null && oldWrap.closingID !=null && !newWRap.closingID.equalsIgnoreCase(oldWrap.closingID))) {
					return true;
				}
				if((newWRap.IBAN!=null && oldWrap.IBAN ==null) || (newWRap.IBAN==null && oldWrap.IBAN !=null) || (newWRap.IBAN!=null && oldWrap.IBAN !=null && !newWRap.IBAN.equalsIgnoreCase(oldWrap.IBAN))) {
					return true;
				}
				if((newWRap.deptCode!=null && oldWrap.deptCode ==null) || (newWRap.deptCode==null && oldWrap.deptCode !=null) || (newWRap.deptCode!=null && oldWrap.deptCode !=null && !newWRap.deptCode.equalsIgnoreCase(oldWrap.deptCode))) {
					return true;
				}
				if((newWRap.accountTitle2!=null && oldWrap.accountTitle2 ==null) || (newWRap.accountTitle2==null && oldWrap.accountTitle2 !=null) || (newWRap.accountTitle2!=null && oldWrap.accountTitle2 !=null && !newWRap.accountTitle2.equalsIgnoreCase(oldWrap.accountTitle2))) {
					return true;
				}
				if((newWRap.sourcingID!=null && oldWrap.sourcingID ==null) || (newWRap.sourcingID==null && oldWrap.sourcingID !=null) || (newWRap.sourcingID!=null && oldWrap.sourcingID !=null && !newWRap.sourcingID.equalsIgnoreCase(oldWrap.sourcingID))) {
					return true;
				}
				if((newWRap.crIntIndicatorFlag!= '\u0000' && oldWrap.crIntIndicatorFlag == '\u0000') || (newWRap.crIntIndicatorFlag == '\u0000' && oldWrap.crIntIndicatorFlag != '\u0000') || (newWRap.crIntIndicatorFlag != '\u0000' && oldWrap.crIntIndicatorFlag != '\u0000' && newWRap.crIntIndicatorFlag != oldWrap.crIntIndicatorFlag)) {
					return true;
				}
				if((newWRap.isIncludedInInterestPooling!= '\u0000' && oldWrap.isIncludedInInterestPooling == '\u0000') || (newWRap.isIncludedInInterestPooling == '\u0000' && oldWrap.isIncludedInInterestPooling != '\u0000') || (newWRap.isIncludedInInterestPooling != '\u0000' && oldWrap.isIncludedInInterestPooling != '\u0000' && newWRap.isIncludedInInterestPooling != oldWrap.isIncludedInInterestPooling)) {
					return true;
				}
				if((newWRap.interestInSuspenceFlag!= '\u0000' && oldWrap.interestInSuspenceFlag == '\u0000') || (newWRap.interestInSuspenceFlag == '\u0000' && oldWrap.interestInSuspenceFlag != '\u0000') || (newWRap.interestInSuspenceFlag != '\u0000' && oldWrap.interestInSuspenceFlag != '\u0000' && newWRap.interestInSuspenceFlag != oldWrap.interestInSuspenceFlag)) {
					return true;
				}
				if((newWRap.interestCode!=null && oldWrap.interestCode ==null) || (newWRap.interestCode==null && oldWrap.interestCode !=null) || (newWRap.interestCode!=null && oldWrap.interestCode !=null && !newWRap.interestCode.equalsIgnoreCase(oldWrap.interestCode))) {
					return true;
				}
				if((newWRap.bulkChargesFlag!= '\u0000' && oldWrap.bulkChargesFlag == '\u0000') || (newWRap.bulkChargesFlag == '\u0000' && oldWrap.bulkChargesFlag != '\u0000') || (newWRap.bulkChargesFlag != '\u0000' && oldWrap.bulkChargesFlag != '\u0000' && newWRap.bulkChargesFlag != oldWrap.bulkChargesFlag)) {
					return true;
				}
				if((newWRap.advIntIndicator!= '\u0000' && oldWrap.advIntIndicator == '\u0000') || (newWRap.advIntIndicator == '\u0000' && oldWrap.advIntIndicator != '\u0000') || (newWRap.advIntIndicator != '\u0000' && oldWrap.advIntIndicator != '\u0000' && newWRap.advIntIndicator != oldWrap.advIntIndicator)) {
					return true;
				}
				if((newWRap.supressStatementFlag!= '\u0000' && oldWrap.supressStatementFlag == '\u0000') || (newWRap.supressStatementFlag == '\u0000' && oldWrap.supressStatementFlag != '\u0000') || (newWRap.supressStatementFlag != '\u0000' && oldWrap.supressStatementFlag != '\u0000' && newWRap.supressStatementFlag != oldWrap.supressStatementFlag)) {
					return true;
				}
				if((newWRap.creditInterestPrdCode!=null && oldWrap.creditInterestPrdCode ==null) || (newWRap.creditInterestPrdCode==null && oldWrap.creditInterestPrdCode !=null) || (newWRap.creditInterestPrdCode!=null && oldWrap.creditInterestPrdCode !=null && !newWRap.creditInterestPrdCode.equalsIgnoreCase(oldWrap.creditInterestPrdCode))) {
					return true;
				}
				if((newWRap.suppressAdviceFlag!= '\u0000' && oldWrap.suppressAdviceFlag == '\u0000') || (newWRap.suppressAdviceFlag == '\u0000' && oldWrap.suppressAdviceFlag != '\u0000') || (newWRap.suppressAdviceFlag != '\u0000' && oldWrap.suppressAdviceFlag != '\u0000' && newWRap.suppressAdviceFlag != oldWrap.suppressAdviceFlag)) {
					return true;
				}
				if((newWRap.ignoreChargeAdvice!= '\u0000' && oldWrap.ignoreChargeAdvice == '\u0000') || (newWRap.ignoreChargeAdvice == '\u0000' && oldWrap.ignoreChargeAdvice != '\u0000') || (newWRap.ignoreChargeAdvice != '\u0000' && oldWrap.ignoreChargeAdvice != '\u0000' && newWRap.ignoreChargeAdvice != oldWrap.ignoreChargeAdvice)) {
					return true;
				}
				if((newWRap.limitNo!=null && oldWrap.limitNo ==null) || (newWRap.limitNo==null && oldWrap.limitNo !=null) || (newWRap.limitNo!=null && oldWrap.limitNo !=null && !newWRap.limitNo.equalsIgnoreCase(oldWrap.limitNo))) {
					return true;
				}
				if((newWRap.limitMasterNo!=null && oldWrap.limitMasterNo ==null) || (newWRap.limitMasterNo==null && oldWrap.limitMasterNo !=null) || (newWRap.limitMasterNo!=null && oldWrap.limitMasterNo !=null && !newWRap.limitMasterNo.equalsIgnoreCase(oldWrap.limitMasterNo))) {
					return true;
				}

			}
			return false;
		}

	private boolean isFieldModifiedUsingReflection(SubsidiaryAccountWrapper newWRap, SubsidiaryAccountWrapper oldWrap) {

		if (newWRap == null || oldWrap == null) {
			return false;
		}

		try {
			// Retrieve the staticFieldList from SubsidiaryAccountWrapper
			Field staticFieldListField = SubsidiaryAccountWrapper.class.getDeclaredField("staticFieldList");
			staticFieldListField.setAccessible(true);


			// Get the staticFieldList
			String[] staticFieldList = (String[]) staticFieldListField.get(null);

			// Get all declared fields of the SubsidiaryAccountWrapper class
			Field[] fields = SubsidiaryAccountWrapper.class.getDeclaredFields();

			for (Field field : fields) {
				// Check if the field is part of the staticFieldList
				if (Array.binarySearch(staticFieldList,field.getName()) < 0) {
					continue;
				}
					field.setAccessible(true);

					// Get the values of the field for both objects
					Object newValue = field.get(newWRap);
					Object oldValue = field.get(oldWrap);

					// Compare the values
					if (!Objects.equals(newValue, oldValue)) {
						return true; // Field is modified
					}
				}
			} catch (NoSuchFieldException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

//	return false; // No fields in the staticFieldList are modified
	}
		
		//added for 1572177 for EDF
		private boolean enableSAccount() {
			boolean returnValue = false;
	        AbstractWrapper[] abstractWrapper1 = null;
	        try {
				abstractWrapper1 = BusinessProcessParamCache.getInstance().getProcessParameters("SACCOUNT");
			} catch (SCBApplicationException e) {
				}
	        SAccountBusinessParamWrapper sAccountBusinessParamWrapper = null;
	        if (abstractWrapper1 != null && abstractWrapper1.length > 0) {
	        	sAccountBusinessParamWrapper = (SAccountBusinessParamWrapper) abstractWrapper1[0];
	        }
			if (sAccountBusinessParamWrapper != null && sAccountBusinessParamWrapper.isSAccountEnabbled.equals("Y")) {
				returnValue = true;
			}
			scb.util.LogWriter.getInstance().println(" SubsidiaryAccountHelper ## createBPPSAccount() ## returnValue :"+returnValue);
			return returnValue;
		}
			private boolean isExcessChargesApplicable()
			{
				try {
					BusinessProcessParamCache businessProcessParamCache = BusinessProcessParamCache.getInstance();
					AbstractWrapper[] bPPValues = null;
					bPPValues = businessProcessParamCache.getProcessParameters(BusinessProcessConstants.CHARGE_PARAM);
					if (bPPValues != null && bPPValues.length > 0 && bPPValues[0] != null) {
						ChargeBusinessParamWrapper chargeBusinessParamWrapper = (ChargeBusinessParamWrapper) bPPValues[0];
						return chargeBusinessParamWrapper != null && "Y".equalsIgnoreCase(chargeBusinessParamWrapper.calculateExcessCharges) ? true : false;
					}
				} catch (SCBApplicationException e) {
					scb.util.LogWriter.getInstance().printErrorMessage(e);
				}
				return false;
			}

			public boolean isRPRCodeInAccount(String rprCode) throws FinderException
			{
				SQLExecutor con = null;
				SQLStatementObject pstmt = null;
				SQLResultObject resultSet = null;
				boolean records_found = false;
				int count = 0;
				try {
					con = SQLExecutor.getInstance(false, scb.util.EBBSConstants.EBBS_APPLICATION);
					pstmt = con.getStatementObject(SELECT_RPR_CODE_COUNT_SQL, false, false); 
					pstmt.setString(1, rprCode);
					resultSet = pstmt.executeQuery();

					if (resultSet.next()) {
						count = resultSet.getInt(1);
						if(count > 0){
							records_found = true;
						}
					}
				} catch (SQLExecuteException e) {
					scb.util.LogWriter.getInstance().printErrorMessage(e);
					throw new FinderException(e.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + e.getMessage());
				}
				catch (NamingException e) {
					scb.util.LogWriter.getInstance().printErrorMessage(e);
					throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
				} finally {
					try {
						if (resultSet != null) {
							resultSet.close();
						}
						if (pstmt != null) {
							pstmt.close();
						}
						if (con != null) {
							con.destroy();
						}
					} catch (SQLExecuteException e) {
						scb.util.LogWriter.getInstance().printErrorMessage(e);
					}
				}
				return records_found;
			}
	public boolean checkValidRprCode(String rprCode ) {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;

		if (rprCode == null || rprCode.trim().length() == 0 ) {
			return false;
		}

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(CHECK_VALIDRPRCODE, false, false);
			stmt.setString(1, rprCode);




			rs = stmt.executeQuery();

			if (rs.next()) {
				int count = rs.getInt("rprcode");
				return count > 0;
			}
		} catch (NamingException e) {
			throw new RuntimeException(e);
		} catch (SQLExecuteException e) {
			throw new RuntimeException(e);
		} finally {
			if (rs != null) {
				try {
					rs.close();
				} catch (Exception e) {

				}
			}
			if (stmt != null) {
				try {
					stmt.close();
				} catch (Exception e) {

				}
			}

		}
		return false;
	}


	public RPRSAUploadDetailWrapper getRPRSAUploadDetailWrapper(String accountNo) throws FinderException, SQLExecuteException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		RPRSAUploadDetailWrapper rprsaUploadDetailWrapper = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(SELECT_EXISTING_RECORDS, false, false);
			stmt.setString(1, accountNo);

			rs = stmt.executeQuery();
			if (rs.next()) {

				rprsaUploadDetailWrapper = new RPRSAUploadDetailWrapper();
				rprsaUploadDetailWrapper.setAccountNo( rs.getString(1));
				rprsaUploadDetailWrapper.setRprCode( rs.getString(2));
				rprsaUploadDetailWrapper.setEffectiveDate( rs.getDate(3));


			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {

			if (rs != null) {
				rs.close();
			}
			if (stmt != null) {
				stmt.close();
			}
			if (con != null) {
				con.destroy();
			}
		}
		return rprsaUploadDetailWrapper;
	}

	public void updateRPRSAUploadWrapper(RPRSAUploadDetailWrapper rprsaUploadDetailWrapper) throws CreateException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(UPDATE_RPRSAUPLOADP, false, false);

			stmt.setString(1, rprsaUploadDetailWrapper.getAccountNo());
			stmt.setString(2, rprsaUploadDetailWrapper.getRprCode());
			stmt.setString(3,rprsaUploadDetailWrapper.getOldRprCode());
			stmt.setDate(4,  rprsaUploadDetailWrapper.getOldEffectiveDate());

			stmt.setString(5, rprsaUploadDetailWrapper.getCurrencyCode());
			stmt.setString(6, rprsaUploadDetailWrapper.getMakerDetails().getUserBranch());
			stmt.setDate(7, rprsaUploadDetailWrapper.getMakerDetails().getUserDate());
			stmt.setString(8, rprsaUploadDetailWrapper.getMakerDetails().getUserID());
			stmt.setString(9, rprsaUploadDetailWrapper.getMakerDetails().getUserIPAddress());
			stmt.setTime(10,rprsaUploadDetailWrapper.getMakerDetails().getUserTime());

			stmt.setString(11, rprsaUploadDetailWrapper.getCheckerDetails().getUserBranch());
			stmt.setDate(12,  rprsaUploadDetailWrapper.getCheckerDetails().getUserDate());
			stmt.setString(13,  rprsaUploadDetailWrapper.getCheckerDetails().getUserID());
			stmt.setString(14,  rprsaUploadDetailWrapper.getCheckerDetails().getUserIPAddress());
			stmt.setTime(15,  rprsaUploadDetailWrapper.getCheckerDetails().getUserTime());
			stmt.setShort(16,  rprsaUploadDetailWrapper.getStatusFlag());
            stmt.setString(17, rprsaUploadDetailWrapper.getAccountNo());
			if (stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			// reengineering
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);

		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

		} finally {
			try {
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}

			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());

			}

		}
	}
	public String[]  fetchProdSegCodeBasedOnAccountNo(String accountNo,String currencyCode) throws FinderException, SQLExecuteException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		String[] prodSegCode = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(SELECT_PROD_SEG_CODE, false, false);
			stmt.setString(1, accountNo);
			stmt.setString(2, currencyCode);

			rs = stmt.executeQuery();
			if (rs.next()) {
				prodSegCode = new String[2];
				prodSegCode[0] = rs.getString(1); // product code
				prodSegCode[1] = rs.getString(2); // segment code
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new FinderException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {

			if (rs != null) {
				rs.close();
			}
			if (stmt != null) {
				stmt.close();
			}
			if (con != null) {
				con.destroy();
			}
		}
		return prodSegCode;
	}


	public boolean checkRPRCodeCombination(String rprCode, String currencyCode, String productCode, String segmentCode) throws SQLExecuteException {
		SQLExecutor con = null;
		SQLStatementObject stmt = null;
		SQLResultObject rs = null;
		boolean isValid = false;

		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);


			// First check: RPR Code, Currency Code, Product Code, and Segment Code combination
			stmt = con.getStatementObject(CHECK_RPR_CODE_CURR_CODE_PRO_CODE_SEG_CODE_COMBINATION, false, false);
			stmt.setString(1, rprCode);
			stmt.setString(2, currencyCode);
			stmt.setString(3, productCode);
			stmt.setString(4, segmentCode);
			rs = stmt.executeQuery();
			if (rs.next()) {
				return true; // If valid, return true
			}


			// Second check: RPR Code, Currency Code, and Product Code combination
			stmt = con.getStatementObject(CHECK_RPR_CODE_CURR_CODE_PRO_CODE_COMBINATION, false, false);
			stmt.setString(1, rprCode);
			stmt.setString(2, currencyCode);
			stmt.setString(3, productCode);
			rs = stmt.executeQuery();
			if (rs.next()) {
				return true; // If valid, skip further checks
			}
			// third check: RPR Code and Currency Code combination
			stmt = con.getStatementObject(CHECK_RPR_CODE_CURR_CODE_COMBINATION, false, false);
			stmt.setString(1, rprCode);
			stmt.setString(2, currencyCode);
			rs = stmt.executeQuery();
			if (rs.next()) {
				return true; // If valid, skip further checks
			}

		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new RuntimeException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new RuntimeException(sqle.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + sqle.getMessage());
		} finally {
			if (rs != null) {
				rs.close();
			}
			if (stmt != null) {
				stmt.close();
			}
			if (con != null) {
				con.destroy();
			}
		}
		return isValid;
	}
	
	/**
	 * Related to ACCOUNTMISC child table for create
	 */
	public AccountMiscWrapper createAccountMisc(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper argWrapper) throws CreateException {
		AccountMiscWrapper wrapper = (AccountMiscWrapper) argWrapper.accountMiscWrapper;
		SQLExecutor  con = null;
		SQLStatementObject stmt = null;
		try {
			con = SQLExecutor.getInstance(false,EBBSConstants.EBBS_APPLICATION);
			stmt = con.getStatementObject(CREATE_ACCMISC, false, false);
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			stmt.setString(3, wrapper.transactorFlag);
			stmt.setString(4, wrapper.rprCode);
			stmt.setString(5, wrapper.oldRPRCode);
			stmt.setDate(6, wrapper.oldRPREffectiveDate);

			if(wrapper.makerDetail != null) {
				stmt.setString(7, wrapper.makerDetail.getUserBranch());
				stmt.setDate(8, wrapper.makerDetail.getUserDate());
				stmt.setString(9, wrapper.makerDetail.getUserID());
				stmt.setString(10, wrapper.makerDetail.getUserIPAddress());
				stmt.setTime(11, wrapper.makerDetail.getUserTime());
			}
			else {
				stmt.setString(7, argWrapper.makerDetail.getUserBranch());
				stmt.setDate(8, argWrapper.makerDetail.getUserDate());
				stmt.setString(9, argWrapper.makerDetail.getUserID());
				stmt.setString(10, argWrapper.makerDetail.getUserIPAddress());
				stmt.setTime(11, argWrapper.makerDetail.getUserTime());
			}
			
			if (argWrapper.checkerDetail != null) {
				stmt.setString(12, argWrapper.checkerDetail.getUserBranch());
				stmt.setDate(13, argWrapper.checkerDetail.getUserDate());
				stmt.setString(14, argWrapper.checkerDetail.getUserID());
				stmt.setString(15, argWrapper.checkerDetail.getUserIPAddress());
				stmt.setTime(16, argWrapper.checkerDetail.getUserTime());
			} else {
				stmt.setString(12, null);
				stmt.setDate(13, null);
				stmt.setString(14, null);
				stmt.setString(15, null);
				stmt.setTime(16, null);
			}

			if(stmt.executeUpdate() <= 0) {
				throw new CreateException();
			}
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			scb.util.LogWriter.getInstance().printErrorMessage(sqle);
			throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
		} finally {
			try {
				if(stmt != null) {
					stmt.close();
				}
				if(con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException sqle) {
				scb.util.LogWriter.getInstance().printErrorMessage(sqle);
				throw new CreateException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
			}
		}
		return wrapper;
	}
	
	/**
	 * Related to ACCOUNTMISC child table for modify
	 */
	public AccountMiscWrapper modifyAccountMisc(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper argWrapper) throws CreateException {
		AccountMiscWrapper wrapper = (AccountMiscWrapper) argWrapper.accountMiscWrapper;
		SQLExecutor con = null;
		SQLStatementObject ps = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			ps = con.getStatementObject(UPDATE_ACCMISC, false, false);
			ps.setString(1, wrapper.rprCode);
			ps.setString(2, wrapper.oldRPRCode);
			ps.setDate(3, wrapper.oldRPREffectiveDate);

			if(wrapper.makerDetail != null) {
				ps.setString(4, wrapper.makerDetail.getUserBranch());
				ps.setDate(5, wrapper.makerDetail.getUserDate());
				ps.setString(6, wrapper.makerDetail.getUserID());
				ps.setString(7, wrapper.makerDetail.getUserIPAddress());
				ps.setTime(8, wrapper.makerDetail.getUserTime());
			}
			else {
				ps.setString(4, argWrapper.makerDetail.getUserBranch());
				ps.setDate(5, argWrapper.makerDetail.getUserDate());
				ps.setString(6, argWrapper.makerDetail.getUserID());
				ps.setString(7, argWrapper.makerDetail.getUserIPAddress());
				ps.setTime(8, argWrapper.makerDetail.getUserTime());
			}
			if (argWrapper.checkerDetail != null) {
				ps.setString(9, argWrapper.checkerDetail.getUserBranch());
				ps.setDate(10, argWrapper.checkerDetail.getUserDate());
				ps.setString(11, argWrapper.checkerDetail.getUserID());
				ps.setString(12, argWrapper.checkerDetail.getUserIPAddress());
				ps.setTime(13, argWrapper.checkerDetail.getUserTime());
			} else {
				ps.setString(9, null);
				ps.setDate(10, null);
				ps.setString(11, null);
				ps.setString(12, null);
				ps.setTime(13, null);
			}
			
			ps.setString(14, wrapper.currencyCode);
			ps.setString(15, wrapper.accountNo);

			if (ps.executeUpdate() <= 0) {
				throw new CreateException();
			}
		} catch (SQLExecuteException se) {
			scb.util.LogWriter.getInstance().printErrorMessage(se);
			throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
		} catch (NamingException ne) {
			scb.util.LogWriter.getInstance().printErrorMessage(ne);
			throw new CreateException(EBBSConstants.NAMING_EXCEPTION);
		} finally {
			try {
				if (ps != null) {
					ps.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch (SQLExecuteException se) {
				scb.util.LogWriter.getInstance().printErrorMessage(se);
				throw new CreateException(se.getSQLState() + EBBSConstants.MESSAGE_DELIMITER + se.getMessage());
			}
		}
		return wrapper;
	}
	
	/**
	 * Related to ACCOUNTMISC child table for fetch
	 */
	public SubsidiaryAccountWrapper fetchAccountMisc(SubsidiaryAccountEntityKey key, SubsidiaryAccountWrapper wrapper) throws FinderException {
		SQLExecutor con = null;
		SQLStatementObject stmt =null;
		SQLResultObject rs = null;
		AccountMiscWrapper accountMiscWrapper = null;
		try {
			con = SQLExecutor.getInstance(false, EBBSConstants.EBBS_APPLICATION);
			if (key.fetchForUpdate) {
				stmt = con.getStatementObject(SELECT_ACCMISC, true, false);
			} else {
				stmt = con.getStatementObject(SELECT_ACCMISC, false, false);
			}
			stmt.setString(1, key.currencyCode);
			stmt.setString(2, key.accountNo);
			rs = stmt.executeQuery();
			if(rs.next()) {
				accountMiscWrapper = new AccountMiscWrapper();
				accountMiscWrapper.currencyCode = rs.getString(1);
				accountMiscWrapper.accountNo    = rs.getString(2);
				accountMiscWrapper.lastTransactorFlgDt = rs.getDate(3);
				accountMiscWrapper.transactorFlag 	 = rs.getString(4);
				accountMiscWrapper.rprCode = rs.getString(5);
				accountMiscWrapper.oldRPRCode = rs.getString(6);
				accountMiscWrapper.oldRPREffectiveDate = rs.getDate(7);

				wrapper.accountMiscWrapper = accountMiscWrapper;
			}
			else {
				accountMiscWrapper = new AccountMiscWrapper();
				accountMiscWrapper.currencyCode = key.currencyCode;
				accountMiscWrapper.accountNo    = key.accountNo;
				accountMiscWrapper.transactorFlag 	 = "Y";

				wrapper.accountMiscWrapper = accountMiscWrapper;
			}
		} catch (NamingException ne) {
			ne.printStackTrace();
			throw new FinderException(EBBSConstants.NAMING_EXCEPTION);
		} catch (SQLExecuteException sqle) {
			sqle.printStackTrace();
			throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());
		} finally {
			try {
				if(rs != null) {
					rs.close();
				}
				if (stmt != null) {
					stmt.close();
				}
				if (con != null) {
					con.destroy();
				}
			} catch	(SQLExecuteException sqle) {
				sqle.printStackTrace();
				throw new FinderException(sqle.getSQLState()+EBBSConstants.MESSAGE_DELIMITER+sqle.getMessage());

			}
		}
		return wrapper;
	}
}

comlete the complete test file write each and every line of it