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

Java tutorial

Introduction

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

Source

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

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

/*
 *   CFAsteriskXMsgClientSecGroupTable XMsg Client DbIO implementation
 *   for SecGroup.
 */
public class CFAsteriskXMsgClientSecGroupTable implements ICFAsteriskSecGroupTable {
    private CFAsteriskXMsgClientSchema schema;

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

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

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

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

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

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

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

    public CFSecuritySecGroupBuff readDerivedByUNameIdx(CFSecurityAuthorization Authorization, long argClusterId,
            String argName) {
        final String S_ProcName = "readDerivedByUNameIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgSecGroupMessageFormatter.formatSecGroupRqstReadByUNameIdx("\n\t\t\t",
                        argClusterId, argName)
                + "\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;
        }
        CFSecuritySecGroupBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskSecGroupObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskSecGroupObj) {
                realized = (ICFAsteriskSecGroupObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecGroupObj");
            }
            if (realized != null) {
                buff = realized.getSecGroupBuff();
            }
        }
        return (buff);
    }

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

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

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

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

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

    public CFSecuritySecGroupBuff readBuffByUNameIdx(CFSecurityAuthorization Authorization, long argClusterId,
            String argName) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUNameIdx");
    }

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

    public void deleteSecGroup(CFSecurityAuthorization Authorization, CFSecuritySecGroupBuff Buff) {
        final String S_ProcName = "deleteSecGroup";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecGroupMessageFormatter.formatSecGroupRqstDelete("\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 deleteSecGroupByIdIdx(CFSecurityAuthorization Authorization, long argClusterId, int argSecGroupId) {
        final String S_ProcName = "deleteSecGroupByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgSecGroupMessageFormatter.formatSecGroupRqstDeleteByIdIdx("\n\t\t\t",
                        argClusterId, argSecGroupId)
                + "\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 deleteSecGroupByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySecGroupPKey argKey) {
        deleteSecGroupByIdIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredSecGroupId());
    }

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

    public void deleteSecGroupByUNameIdx(CFSecurityAuthorization Authorization, long argClusterId, String argName) {
        final String S_ProcName = "deleteSecGroupByUNameIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgSecGroupMessageFormatter.formatSecGroupRqstDeleteByUNameIdx("\n\t\t\t",
                        argClusterId, argName)
                + "\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 deleteSecGroupByUNameIdx(CFSecurityAuthorization Authorization,
            CFSecuritySecGroupByUNameIdxKey argKey) {
        deleteSecGroupByUNameIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredName());
    }

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

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

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

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

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

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

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

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

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