net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientVersionTable.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientVersionTable.java

Source

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

/*
 *   CF FreeSwitch 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.cffreeswitch.v2_4.CFFreeSwitchXMsgClient;

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.cffreeswitch.v2_4.CFFreeSwitch.*;
import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurityObj.*;
import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternetObj.*;
import net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchObj.*;
import net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsg.*;
import net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgRspnHandler.*;

/*
 *   CFFreeSwitchXMsgClientVersionTable XMsg Client DbIO implementation
 *   for Version.
 */
public class CFFreeSwitchXMsgClientVersionTable implements ICFFreeSwitchVersionTable {
    private CFFreeSwitchXMsgClientSchema schema;

    public CFFreeSwitchXMsgClientVersionTable(CFFreeSwitchXMsgClientSchema argSchema) {
        schema = argSchema;
    }

    public void createVersion(CFSecurityAuthorization Authorization, CFInternetVersionBuff Buff) {
        final String S_ProcName = "createVersion";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstCreate("\n\t\t\t", Buff) + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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) {
            ICFFreeSwitchVersionObj realized = null;
            if (lastObjectProcessed instanceof ICFFreeSwitchVersionObj) {
                realized = (ICFFreeSwitchVersionObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchVersionObj");
            }
            if (realized != null) {
                Buff.set(realized.getVersionBuff());
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getLastObjectProcessed()");
        }
    }

    public CFInternetVersionBuff readDerived(CFSecurityAuthorization Authorization, CFInternetDomainBasePKey PKey) {
        final String S_ProcName = "readDerived";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstRead("\n\t\t\t", PKey) + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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;
        }
        CFInternetVersionBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFFreeSwitchVersionObj realized = null;
            if (lastObjectProcessed instanceof ICFFreeSwitchVersionObj) {
                realized = (ICFFreeSwitchVersionObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchVersionObj");
            }
            if (realized != null) {
                buff = realized.getVersionBuff();
            }
        }
        return (buff);
    }

    public CFInternetVersionBuff lockDerived(CFSecurityAuthorization Authorization, CFInternetDomainBasePKey PKey) {
        final String S_ProcName = "lockDerived";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstLock("\n\t\t\t", PKey) + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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;
        }
        CFInternetVersionBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFFreeSwitchVersionObj realized = null;
            if (lastObjectProcessed instanceof ICFFreeSwitchVersionObj) {
                realized = (ICFFreeSwitchVersionObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchVersionObj");
            }
            if (realized != null) {
                buff = realized.getVersionBuff();
            }
        }
        return (buff);
    }

    public CFInternetVersionBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
        final String S_ProcName = "readAllDerived";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstReadAll("\n\t\t\t") + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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<ICFInternetDomainBaseObj> sortedList = (List<ICFInternetDomainBaseObj>) sortedListObj;
        int sz = sortedList.size();
        CFInternetVersionBuff arr[] = new CFInternetVersionBuff[sz];
        Iterator<ICFInternetDomainBaseObj> iter = sortedList.iterator();
        ICFInternetVersionObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFInternetVersionObj) iter.next();
            arr[idx] = cur.getVersionBuff();
        }
        return (arr);
    }

    public CFInternetVersionBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
            long argId) {
        final String S_ProcName = "readDerivedByIdIdx";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstReadByIdIdx("\n\t\t\t",
                        argTenantId, argId)
                + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.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;
        }
        CFInternetVersionBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFFreeSwitchVersionObj realized = null;
            if (lastObjectProcessed instanceof ICFFreeSwitchVersionObj) {
                realized = (ICFFreeSwitchVersionObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchVersionObj");
            }
            if (realized != null) {
                buff = realized.getVersionBuff();
            }
        }
        return (buff);
    }

    public CFInternetVersionBuff[] readDerivedByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
        final String S_ProcName = "readDerivedByTenantIdx";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstReadByTenantIdx("\n\t\t\t", argTenantId)
                + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.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<ICFInternetDomainBaseObj> sortedList = (List<ICFInternetDomainBaseObj>) sortedListObj;
        int sz = sortedList.size();
        CFInternetVersionBuff arr[] = new CFInternetVersionBuff[sz];
        Iterator<ICFInternetDomainBaseObj> iter = sortedList.iterator();
        ICFInternetVersionObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFInternetVersionObj) iter.next();
            arr[idx] = cur.getVersionBuff();
        }
        return (arr);
    }

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

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

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

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

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

    public void updateVersion(CFSecurityAuthorization Authorization, CFInternetVersionBuff Buff) {
        final String S_ProcName = "updateVersion";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstUpdate("\n\t\t\t", Buff) + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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;
        }
        CFInternetVersionBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFFreeSwitchVersionObj realized = null;
            if (lastObjectProcessed instanceof ICFFreeSwitchVersionObj) {
                realized = (ICFFreeSwitchVersionObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchVersionObj");
            }
            if (realized != null) {
                buff = realized.getVersionBuff();
            }
        }
        if (buff != null) {
            Buff.set(buff);
        }
    }

    public void deleteVersion(CFSecurityAuthorization Authorization, CFInternetVersionBuff Buff) {
        final String S_ProcName = "deleteVersion";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgVersionMessageFormatter.formatVersionRqstDelete("\n\t\t\t", Buff) + "\n"
                + CFFreeSwitchXMsgSchemaMessageFormatter.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 deleteVersionByIdIdx(CFSecurityAuthorization Authorization, long argTenantId, long argId) {
        final String S_ProcName = "deleteVersionByIdIdx";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFFreeSwitchXMsgDomainBaseMessageFormatter.formatDomainBaseRqstDeleteByIdIdx("\n\t\t\t",
                        argTenantId, argId)
                + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.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 deleteVersionByIdIdx(CFSecurityAuthorization Authorization, CFInternetDomainBasePKey argKey) {
        deleteVersionByIdIdx(Authorization, argKey.getRequiredTenantId(), argKey.getRequiredId());
    }

    public void deleteVersionByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
        final String S_ProcName = "deleteVersionByTenantIdx";
        String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFFreeSwitchXMsgVersionMessageFormatter
                        .formatVersionRqstDeleteByTenantIdx("\n\t\t\t", argTenantId)
                + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.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 deleteVersionByTenantIdx(CFSecurityAuthorization Authorization,
            CFInternetDomainBaseByTenantIdxKey argKey) {
        deleteVersionByTenantIdx(Authorization, argKey.getRequiredTenantId());
    }

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

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

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

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

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

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

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

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