net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientSecAppTable.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientSecAppTable.java

Source

// Description: Java 8 XMsg Client DbIO implementation for SecApp.

/*
 *   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.*;

/*
 *   CFAsteriskXMsgClientSecAppTable XMsg Client DbIO implementation
 *   for SecApp.
 */
public class CFAsteriskXMsgClientSecAppTable implements ICFAsteriskSecAppTable {
    private CFAsteriskXMsgClientSchema schema;

    public CFAsteriskXMsgClientSecAppTable(CFAsteriskXMsgClientSchema argSchema) {
        schema = argSchema;
    }

    public void createSecApp(CFSecurityAuthorization Authorization, CFSecuritySecAppBuff Buff) {
        final String S_ProcName = "createSecApp";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstCreate("\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) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                Buff.set(realized.getSecAppBuff());
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getLastObjectProcessed()");
        }
    }

    public CFSecuritySecAppBuff readDerived(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
        final String S_ProcName = "readDerived";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstRead("\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;
        }
        CFSecuritySecAppBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                buff = realized.getSecAppBuff();
            }
        }
        return (buff);
    }

    public CFSecuritySecAppBuff lockDerived(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
        final String S_ProcName = "lockDerived";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstLock("\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;
        }
        CFSecuritySecAppBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                buff = realized.getSecAppBuff();
            }
        }
        return (buff);
    }

    public CFSecuritySecAppBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
        final String S_ProcName = "readAllDerived";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadAll("\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<ICFSecuritySecAppObj> sortedList = (List<ICFSecuritySecAppObj>) sortedListObj;
        int sz = sortedList.size();
        CFSecuritySecAppBuff arr[] = new CFSecuritySecAppBuff[sz];
        Iterator<ICFSecuritySecAppObj> iter = sortedList.iterator();
        ICFSecuritySecAppObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFSecuritySecAppObj) iter.next();
            arr[idx] = cur.getSecAppBuff();
        }
        return (arr);
    }

    public CFSecuritySecAppBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argClusterId,
            int argSecAppId) {
        final String S_ProcName = "readDerivedByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByIdIdx("\n\t\t\t",
                        argClusterId, argSecAppId)
                + "\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;
        }
        CFSecuritySecAppBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                buff = realized.getSecAppBuff();
            }
        }
        return (buff);
    }

    public CFSecuritySecAppBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization,
            long argClusterId) {
        final String S_ProcName = "readDerivedByClusterIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByClusterIdx("\n\t\t\t", argClusterId)
                + "\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<ICFSecuritySecAppObj> sortedList = (List<ICFSecuritySecAppObj>) sortedListObj;
        int sz = sortedList.size();
        CFSecuritySecAppBuff arr[] = new CFSecuritySecAppBuff[sz];
        Iterator<ICFSecuritySecAppObj> iter = sortedList.iterator();
        ICFSecuritySecAppObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFSecuritySecAppObj) iter.next();
            arr[idx] = cur.getSecAppBuff();
        }
        return (arr);
    }

    public CFSecuritySecAppBuff readDerivedByUJEEMountIdx(CFSecurityAuthorization Authorization, long argClusterId,
            String argJEEMountName) {
        final String S_ProcName = "readDerivedByUJEEMountIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByUJEEMountIdx("\n\t\t\t",
                        argClusterId, argJEEMountName)
                + "\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;
        }
        CFSecuritySecAppBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                buff = realized.getSecAppBuff();
            }
        }
        return (buff);
    }

    public CFSecuritySecAppBuff readBuff(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuff");
    }

    public CFSecuritySecAppBuff lockBuff(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lockBuff");
    }

    public CFSecuritySecAppBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readAllBuff");
    }

    public CFSecuritySecAppBuff readBuffByIdIdx(CFSecurityAuthorization Authorization, long argClusterId,
            int argSecAppId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx");
    }

    public CFSecuritySecAppBuff[] readBuffByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByClusterIdx");
    }

    public CFSecuritySecAppBuff readBuffByUJEEMountIdx(CFSecurityAuthorization Authorization, long argClusterId,
            String argJEEMountName) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUJEEMountIdx");
    }

    public void updateSecApp(CFSecurityAuthorization Authorization, CFSecuritySecAppBuff Buff) {
        final String S_ProcName = "updateSecApp";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstUpdate("\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;
        }
        CFSecuritySecAppBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecAppObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
                realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
            }
            if (realized != null) {
                buff = realized.getSecAppBuff();
            }
        }
        if (buff != null) {
            Buff.set(buff);
        }
    }

    public void deleteSecApp(CFSecurityAuthorization Authorization, CFSecuritySecAppBuff Buff) {
        final String S_ProcName = "deleteSecApp";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstDelete("\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 deleteSecAppByIdIdx(CFSecurityAuthorization Authorization, long argClusterId, int argSecAppId) {
        final String S_ProcName = "deleteSecAppByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstDeleteByIdIdx("\n\t\t\t",
                        argClusterId, argSecAppId)
                + "\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 deleteSecAppByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey argKey) {
        deleteSecAppByIdIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredSecAppId());
    }

    public void deleteSecAppByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) {
        final String S_ProcName = "deleteSecAppByClusterIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstDeleteByClusterIdx("\n\t\t\t", argClusterId)
                + "\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 deleteSecAppByClusterIdx(CFSecurityAuthorization Authorization,
            CFSecuritySecAppByClusterIdxKey argKey) {
        deleteSecAppByClusterIdx(Authorization, argKey.getRequiredClusterId());
    }

    public void deleteSecAppByUJEEMountIdx(CFSecurityAuthorization Authorization, long argClusterId,
            String argJEEMountName) {
        final String S_ProcName = "deleteSecAppByUJEEMountIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstDeleteByUJEEMountIdx("\n\t\t\t",
                        argClusterId, argJEEMountName)
                + "\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 deleteSecAppByUJEEMountIdx(CFSecurityAuthorization Authorization,
            CFSecuritySecAppByUJEEMountIdxKey argKey) {
        deleteSecAppByUJEEMountIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredJEEMountName());
    }

    public CFSecurityCursor openSecAppCursorAll(CFSecurityAuthorization Authorization) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openSecAppCursorAll");
    }

    public CFSecurityCursor openSecAppCursorByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(),
                "openSecAppCursorByClusterIdx");
    }

    public void closeSecAppCursor(CFSecurityCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "closeSecAppCursor");
    }

    public CFSecuritySecAppBuff nextSecAppCursor(CFSecurityCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecAppCursor");
    }

    public CFSecuritySecAppBuff prevSecAppCursor(CFSecurityCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "prevSecAppCursor");
    }

    public CFSecuritySecAppBuff firstSecAppCursor(CFSecurityCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "firstSecAppCursor");
    }

    public CFSecuritySecAppBuff lastSecAppCursor(CFSecurityCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lastSecAppCursor");
    }

    public CFSecuritySecAppBuff nthSecAppCursor(CFSecurityCursor Cursor, int Idx) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nthSecAppCursor");
    }

    /**
     *   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");
    }
}