Java tutorial
// Description: Java 8 XMsg Client DbIO implementation for ISOCountryCurrency. /* * Code Factory Asterisk 11 Configuration Model * * Copyright (c) 2014-2015 Mark Sobkow * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient; import java.lang.reflect.*; import java.math.*; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.sql.*; import java.text.*; import java.util.*; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.naming.*; import javax.sql.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.Tip.*; import org.apache.commons.codec.binary.Base64; import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurity.*; import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternet.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsterisk.*; import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurityObj.*; import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternetObj.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskObj.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsg.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgRspnHandler.*; /* * CFAsteriskXMsgClientISOCountryCurrencyTable XMsg Client DbIO implementation * for ISOCountryCurrency. */ public class CFAsteriskXMsgClientISOCountryCurrencyTable implements ICFAsteriskISOCountryCurrencyTable { private CFAsteriskXMsgClientSchema schema; public CFAsteriskXMsgClientISOCountryCurrencyTable(CFAsteriskXMsgClientSchema argSchema) { schema = argSchema; } public void createISOCountryCurrency(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyBuff Buff) { final String S_ProcName = "createISOCountryCurrency"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstCreate("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskISOCountryCurrencyObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskISOCountryCurrencyObj) { realized = (ICFAsteriskISOCountryCurrencyObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskISOCountryCurrencyObj"); } if (realized != null) { Buff.set(realized.getISOCountryCurrencyBuff()); } } else { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getLastObjectProcessed()"); } } public CFSecurityISOCountryCurrencyBuff readDerived(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) { final String S_ProcName = "readDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstRead("\n\t\t\t", PKey) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecurityISOCountryCurrencyBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskISOCountryCurrencyObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskISOCountryCurrencyObj) { realized = (ICFAsteriskISOCountryCurrencyObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskISOCountryCurrencyObj"); } if (realized != null) { buff = realized.getISOCountryCurrencyBuff(); } } return (buff); } public CFSecurityISOCountryCurrencyBuff lockDerived(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) { final String S_ProcName = "lockDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstLock("\n\t\t\t", PKey) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecurityISOCountryCurrencyBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskISOCountryCurrencyObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskISOCountryCurrencyObj) { realized = (ICFAsteriskISOCountryCurrencyObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskISOCountryCurrencyObj"); } if (realized != null) { buff = realized.getISOCountryCurrencyBuff(); } } return (buff); } public CFSecurityISOCountryCurrencyBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "readAllDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstReadAll("\n\t\t\t") + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object sortedListObj = responseHandler.getListOfObjects(); if (sortedListObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getListOfObjects"); } @SuppressWarnings("unchecked") List<ICFSecurityISOCountryCurrencyObj> sortedList = (List<ICFSecurityISOCountryCurrencyObj>) sortedListObj; int sz = sortedList.size(); CFSecurityISOCountryCurrencyBuff arr[] = new CFSecurityISOCountryCurrencyBuff[sz]; Iterator<ICFSecurityISOCountryCurrencyObj> iter = sortedList.iterator(); ICFSecurityISOCountryCurrencyObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFSecurityISOCountryCurrencyObj) iter.next(); arr[idx] = cur.getISOCountryCurrencyBuff(); } return (arr); } public CFSecurityISOCountryCurrencyBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, short argISOCountryId, short argISOCurrencyId) { final String S_ProcName = "readDerivedByIdIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstReadByIdIdx("\n\t\t\t", argISOCountryId, argISOCurrencyId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecurityISOCountryCurrencyBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskISOCountryCurrencyObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskISOCountryCurrencyObj) { realized = (ICFAsteriskISOCountryCurrencyObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskISOCountryCurrencyObj"); } if (realized != null) { buff = realized.getISOCountryCurrencyBuff(); } } return (buff); } public CFSecurityISOCountryCurrencyBuff[] readDerivedByCountryIdx(CFSecurityAuthorization Authorization, short argISOCountryId) { final String S_ProcName = "readDerivedByCountryIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstReadByCountryIdx("\n\t\t\t", argISOCountryId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object sortedListObj = responseHandler.getListOfObjects(); if (sortedListObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getListOfObjects"); } @SuppressWarnings("unchecked") List<ICFSecurityISOCountryCurrencyObj> sortedList = (List<ICFSecurityISOCountryCurrencyObj>) sortedListObj; int sz = sortedList.size(); CFSecurityISOCountryCurrencyBuff arr[] = new CFSecurityISOCountryCurrencyBuff[sz]; Iterator<ICFSecurityISOCountryCurrencyObj> iter = sortedList.iterator(); ICFSecurityISOCountryCurrencyObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFSecurityISOCountryCurrencyObj) iter.next(); arr[idx] = cur.getISOCountryCurrencyBuff(); } return (arr); } public CFSecurityISOCountryCurrencyBuff[] readDerivedByCurrencyIdx(CFSecurityAuthorization Authorization, short argISOCurrencyId) { final String S_ProcName = "readDerivedByCurrencyIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstReadByCurrencyIdx("\n\t\t\t", argISOCurrencyId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object sortedListObj = responseHandler.getListOfObjects(); if (sortedListObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getListOfObjects"); } @SuppressWarnings("unchecked") List<ICFSecurityISOCountryCurrencyObj> sortedList = (List<ICFSecurityISOCountryCurrencyObj>) sortedListObj; int sz = sortedList.size(); CFSecurityISOCountryCurrencyBuff arr[] = new CFSecurityISOCountryCurrencyBuff[sz]; Iterator<ICFSecurityISOCountryCurrencyObj> iter = sortedList.iterator(); ICFSecurityISOCountryCurrencyObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFSecurityISOCountryCurrencyObj) iter.next(); arr[idx] = cur.getISOCountryCurrencyBuff(); } return (arr); } public CFSecurityISOCountryCurrencyBuff readBuff(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuff"); } public CFSecurityISOCountryCurrencyBuff lockBuff(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey PKey) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lockBuff"); } public CFSecurityISOCountryCurrencyBuff[] readAllBuff(CFSecurityAuthorization Authorization) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readAllBuff"); } public CFSecurityISOCountryCurrencyBuff readBuffByIdIdx(CFSecurityAuthorization Authorization, short argISOCountryId, short argISOCurrencyId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx"); } public CFSecurityISOCountryCurrencyBuff[] readBuffByCountryIdx(CFSecurityAuthorization Authorization, short argISOCountryId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByCountryIdx"); } public CFSecurityISOCountryCurrencyBuff[] readBuffByCurrencyIdx(CFSecurityAuthorization Authorization, short argISOCurrencyId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByCurrencyIdx"); } public void updateISOCountryCurrency(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyBuff Buff) { final String S_ProcName = "updateISOCountryCurrency"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstUpdate("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecurityISOCountryCurrencyBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskISOCountryCurrencyObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskISOCountryCurrencyObj) { realized = (ICFAsteriskISOCountryCurrencyObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskISOCountryCurrencyObj"); } if (realized != null) { buff = realized.getISOCountryCurrencyBuff(); } } if (buff != null) { Buff.set(buff); } } public void deleteISOCountryCurrency(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyBuff Buff) { final String S_ProcName = "deleteISOCountryCurrency"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter.formatISOCountryCurrencyRqstDelete("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteISOCountryCurrencyByIdIdx(CFSecurityAuthorization Authorization, short argISOCountryId, short argISOCurrencyId) { final String S_ProcName = "deleteISOCountryCurrencyByIdIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstDeleteByIdIdx("\n\t\t\t", argISOCountryId, argISOCurrencyId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteISOCountryCurrencyByIdIdx(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyPKey argKey) { deleteISOCountryCurrencyByIdIdx(Authorization, argKey.getRequiredISOCountryId(), argKey.getRequiredISOCurrencyId()); } public void deleteISOCountryCurrencyByCountryIdx(CFSecurityAuthorization Authorization, short argISOCountryId) { final String S_ProcName = "deleteISOCountryCurrencyByCountryIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstDeleteByCountryIdx("\n\t\t\t", argISOCountryId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteISOCountryCurrencyByCountryIdx(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyByCountryIdxKey argKey) { deleteISOCountryCurrencyByCountryIdx(Authorization, argKey.getRequiredISOCountryId()); } public void deleteISOCountryCurrencyByCurrencyIdx(CFSecurityAuthorization Authorization, short argISOCurrencyId) { final String S_ProcName = "deleteISOCountryCurrencyByCurrencyIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgISOCountryCurrencyMessageFormatter .formatISOCountryCurrencyRqstDeleteByCurrencyIdx("\n\t\t\t", argISOCurrencyId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteISOCountryCurrencyByCurrencyIdx(CFSecurityAuthorization Authorization, CFSecurityISOCountryCurrencyByCurrencyIdxKey argKey) { deleteISOCountryCurrencyByCurrencyIdx(Authorization, argKey.getRequiredISOCurrencyId()); } public CFSecurityCursor openISOCountryCurrencyCursorAll(CFSecurityAuthorization Authorization) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openISOCountryCurrencyCursorAll"); } public CFSecurityCursor openISOCountryCurrencyCursorByCountryIdx(CFSecurityAuthorization Authorization, short argISOCountryId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openISOCountryCurrencyCursorByCountryIdx"); } public CFSecurityCursor openISOCountryCurrencyCursorByCurrencyIdx(CFSecurityAuthorization Authorization, short argISOCurrencyId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openISOCountryCurrencyCursorByCurrencyIdx"); } public void closeISOCountryCurrencyCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "closeISOCountryCurrencyCursor"); } public CFSecurityISOCountryCurrencyBuff nextISOCountryCurrencyCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextISOCountryCurrencyCursor"); } public CFSecurityISOCountryCurrencyBuff prevISOCountryCurrencyCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "prevISOCountryCurrencyCursor"); } public CFSecurityISOCountryCurrencyBuff firstISOCountryCurrencyCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "firstISOCountryCurrencyCursor"); } public CFSecurityISOCountryCurrencyBuff lastISOCountryCurrencyCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lastISOCountryCurrencyCursor"); } public CFSecurityISOCountryCurrencyBuff nthISOCountryCurrencyCursor(CFSecurityCursor Cursor, int Idx) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nthISOCountryCurrencyCursor"); } /** * Release the prepared statements. * <p> * When the schema changes connections, the prepared statements * have to be released because they contain connection-specific * information for most databases. */ public void releasePreparedStatements() { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "releasePreparedStatements"); } }