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

Java tutorial

Introduction

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

Source

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

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

/*
 *   CFAsteriskXMsgClientTSecGroupTable XMsg Client DbIO implementation
 *   for TSecGroup.
 */
public class CFAsteriskXMsgClientTSecGroupTable implements ICFAsteriskTSecGroupTable {
    private CFAsteriskXMsgClientSchema schema;

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

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

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

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

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

    public CFSecurityTSecGroupBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
            int argTSecGroupId) {
        final String S_ProcName = "readDerivedByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgTSecGroupMessageFormatter.formatTSecGroupRqstReadByIdIdx("\n\t\t\t",
                        argTenantId, argTSecGroupId)
                + "\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;
        }
        CFSecurityTSecGroupBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskTSecGroupObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskTSecGroupObj) {
                realized = (ICFAsteriskTSecGroupObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskTSecGroupObj");
            }
            if (realized != null) {
                buff = realized.getTSecGroupBuff();
            }
        }
        return (buff);
    }

    public CFSecurityTSecGroupBuff[] readDerivedByTenantIdx(CFSecurityAuthorization Authorization,
            long argTenantId) {
        final String S_ProcName = "readDerivedByTenantIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgTSecGroupMessageFormatter
                        .formatTSecGroupRqstReadByTenantIdx("\n\t\t\t", argTenantId)
                + "\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<ICFSecurityTSecGroupObj> sortedList = (List<ICFSecurityTSecGroupObj>) sortedListObj;
        int sz = sortedList.size();
        CFSecurityTSecGroupBuff arr[] = new CFSecurityTSecGroupBuff[sz];
        Iterator<ICFSecurityTSecGroupObj> iter = sortedList.iterator();
        ICFSecurityTSecGroupObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFSecurityTSecGroupObj) iter.next();
            arr[idx] = cur.getTSecGroupBuff();
        }
        return (arr);
    }

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

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

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

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

    public CFSecurityTSecGroupBuff readBuffByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
            int argTSecGroupId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx");
    }

    public CFSecurityTSecGroupBuff[] readBuffByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByTenantIdx");
    }

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

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

    public void deleteTSecGroup(CFSecurityAuthorization Authorization, CFSecurityTSecGroupBuff Buff) {
        final String S_ProcName = "deleteTSecGroup";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgTSecGroupMessageFormatter.formatTSecGroupRqstDelete("\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 deleteTSecGroupByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
            int argTSecGroupId) {
        final String S_ProcName = "deleteTSecGroupByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgTSecGroupMessageFormatter.formatTSecGroupRqstDeleteByIdIdx("\n\t\t\t",
                        argTenantId, argTSecGroupId)
                + "\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 deleteTSecGroupByIdIdx(CFSecurityAuthorization Authorization, CFSecurityTSecGroupPKey argKey) {
        deleteTSecGroupByIdIdx(Authorization, argKey.getRequiredTenantId(), argKey.getRequiredTSecGroupId());
    }

    public void deleteTSecGroupByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
        final String S_ProcName = "deleteTSecGroupByTenantIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgTSecGroupMessageFormatter
                        .formatTSecGroupRqstDeleteByTenantIdx("\n\t\t\t", argTenantId)
                + "\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 deleteTSecGroupByTenantIdx(CFSecurityAuthorization Authorization,
            CFSecurityTSecGroupByTenantIdxKey argKey) {
        deleteTSecGroupByTenantIdx(Authorization, argKey.getRequiredTenantId());
    }

    public void deleteTSecGroupByUNameIdx(CFSecurityAuthorization Authorization, long argTenantId, String argName) {
        final String S_ProcName = "deleteTSecGroupByUNameIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgTSecGroupMessageFormatter.formatTSecGroupRqstDeleteByUNameIdx("\n\t\t\t",
                        argTenantId, 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 deleteTSecGroupByUNameIdx(CFSecurityAuthorization Authorization,
            CFSecurityTSecGroupByUNameIdxKey argKey) {
        deleteTSecGroupByUNameIdx(Authorization, argKey.getRequiredTenantId(), argKey.getRequiredName());
    }

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

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

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

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

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

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

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

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

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