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

Java tutorial

Introduction

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

Source

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

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

/*
 *   CFAsteriskXMsgClientClusterTable XMsg Client DbIO implementation
 *   for Cluster.
 */
public class CFAsteriskXMsgClientClusterTable implements ICFAsteriskClusterTable {
    private CFAsteriskXMsgClientSchema schema;

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

    public int nextSecAppIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecAppIdGen");
    }

    public int nextSecAppIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecAppIdGen");
    }

    public int nextSecFormIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecFormIdGen");
    }

    public int nextSecFormIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecFormIdGen");
    }

    public int nextSecGroupIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupIdGen");
    }

    public int nextSecGroupIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupIdGen");
    }

    public long nextSecGroupMemberIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupMemberIdGen");
    }

    public long nextSecGroupMemberIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupMemberIdGen");
    }

    public long nextSecGroupIncludeIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupIncludeIdGen");
    }

    public long nextSecGroupIncludeIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupIncludeIdGen");
    }

    public long nextSecGroupFormIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupFormIdGen");
    }

    public long nextSecGroupFormIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSecGroupFormIdGen");
    }

    public long nextServiceIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextServiceIdGen");
    }

    public long nextServiceIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextServiceIdGen");
    }

    public long nextHostNodeIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextHostNodeIdGen");
    }

    public long nextHostNodeIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextHostNodeIdGen");
    }

    public long nextConfigurationFileIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextConfigurationFileIdGen");
    }

    public long nextConfigurationFileIdGen(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextConfigurationFileIdGen");
    }

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

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

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

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

    public CFSecurityClusterBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argId) {
        final String S_ProcName = "readDerivedByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgClusterMessageFormatter.formatClusterRqstReadByIdIdx("\n\t\t\t", argId) + "\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;
        }
        CFSecurityClusterBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskClusterObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskClusterObj) {
                realized = (ICFAsteriskClusterObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskClusterObj");
            }
            if (realized != null) {
                buff = realized.getClusterBuff();
            }
        }
        return (buff);
    }

    public CFSecurityClusterBuff readDerivedByUDomainNameIdx(CFSecurityAuthorization Authorization,
            String argFullDomainName) {
        final String S_ProcName = "readDerivedByUDomainNameIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgClusterMessageFormatter
                        .formatClusterRqstReadByUDomainNameIdx("\n\t\t\t", argFullDomainName)
                + "\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;
        }
        CFSecurityClusterBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskClusterObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskClusterObj) {
                realized = (ICFAsteriskClusterObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskClusterObj");
            }
            if (realized != null) {
                buff = realized.getClusterBuff();
            }
        }
        return (buff);
    }

    public CFSecurityClusterBuff readDerivedByUDescrIdx(CFSecurityAuthorization Authorization,
            String argDescription) {
        final String S_ProcName = "readDerivedByUDescrIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgClusterMessageFormatter.formatClusterRqstReadByUDescrIdx("\n\t\t\t", argDescription)
                + "\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;
        }
        CFSecurityClusterBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAsteriskClusterObj realized = null;
            if (lastObjectProcessed instanceof ICFAsteriskClusterObj) {
                realized = (ICFAsteriskClusterObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskClusterObj");
            }
            if (realized != null) {
                buff = realized.getClusterBuff();
            }
        }
        return (buff);
    }

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

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

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

    public CFSecurityClusterBuff readBuffByIdIdx(CFSecurityAuthorization Authorization, long argId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx");
    }

    public CFSecurityClusterBuff readBuffByUDomainNameIdx(CFSecurityAuthorization Authorization,
            String argFullDomainName) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUDomainNameIdx");
    }

    public CFSecurityClusterBuff readBuffByUDescrIdx(CFSecurityAuthorization Authorization, String argDescription) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUDescrIdx");
    }

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

    public void deleteCluster(CFSecurityAuthorization Authorization, CFSecurityClusterBuff Buff) {
        final String S_ProcName = "deleteCluster";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgClusterMessageFormatter.formatClusterRqstDelete("\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 deleteClusterByIdIdx(CFSecurityAuthorization Authorization, long argId) {
        final String S_ProcName = "deleteClusterByIdIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgClusterMessageFormatter.formatClusterRqstDeleteByIdIdx("\n\t\t\t", argId) + "\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 deleteClusterByIdIdx(CFSecurityAuthorization Authorization, CFSecurityClusterPKey argKey) {
        deleteClusterByIdIdx(Authorization, argKey.getRequiredId());
    }

    public void deleteClusterByUDomainNameIdx(CFSecurityAuthorization Authorization, String argFullDomainName) {
        final String S_ProcName = "deleteClusterByUDomainNameIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAsteriskXMsgClusterMessageFormatter
                        .formatClusterRqstDeleteByUDomainNameIdx("\n\t\t\t", argFullDomainName)
                + "\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 deleteClusterByUDomainNameIdx(CFSecurityAuthorization Authorization,
            CFSecurityClusterByUDomainNameIdxKey argKey) {
        deleteClusterByUDomainNameIdx(Authorization, argKey.getRequiredFullDomainName());
    }

    public void deleteClusterByUDescrIdx(CFSecurityAuthorization Authorization, String argDescription) {
        final String S_ProcName = "deleteClusterByUDescrIdx";
        String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAsteriskXMsgClusterMessageFormatter.formatClusterRqstDeleteByUDescrIdx("\n\t\t\t",
                        argDescription)
                + "\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 deleteClusterByUDescrIdx(CFSecurityAuthorization Authorization,
            CFSecurityClusterByUDescrIdxKey argKey) {
        deleteClusterByUDescrIdx(Authorization, argKey.getRequiredDescription());
    }

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

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

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

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

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

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

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

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