net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientServiceTable.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientServiceTable.java

Source

// Description: Java 7 XMsg Client DbIO implementation for Service.

/*
 *   CF Asterisk 11 Configuration Model
 *
 *   Copyright (c) 2013-2014 Mark Sobkow
 *   
 *   This program is available as free software under the GNU GPL v3, or
 *   under a commercial license from Mark Sobkow.  For commercial licensing
 *   details, please contact msobkow@sasktel.net.
 *   
 *   Under the terms of the GPL:
 *   
 *      This program is free software: you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation, either version 3 of the License, or
 *      (at your option) any later version.
 *     
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *     
 *      You should have received a copy of the GNU General Public License
 *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 *      This source code incorporates modified modules originally licensed
 *      under the Apache 2.0 license by MSS Code Factory including CFSecurity
 *      (net-sourceforge-msscodefactory-2.0-cfsecurity.xml),
 *      CFInternet (net-sourceforge-msscodefactory-2.0-cfinternet.xml), and
 *      CFCrm 2.0 (net-sourceforge-msscodefactory-2.0-cfcrm.xml), with all of the
 *      required models being available as part of the MSS Code Factory 1.11
 *      distribution source and install zips.
 *   
 *      You can download installations of MSS Code Factory 1.11 from
 *      http://msscodefactory.sourceforge.net/
 *   
 * ***********************************************************************
 *
 *   Code manufactured by MSS Code Factory
 */

package net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient;

import java.math.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import net.sourceforge.msscodefactory.cflib.v1_11.CFLib.*;
import org.apache.commons.codec.binary.Base64;
import net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAst.*;
import net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstObj.*;
import net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsg.*;
import net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgRspnHandler.*;

/*
 *   CFAstXMsgClientServiceTable XMsg Client DbIO implementation
 *   for Service.
 */
public class CFAstXMsgClientServiceTable implements ICFAstServiceTable {
    private CFAstXMsgClientSchema schema;

    public CFAstXMsgClientServiceTable(CFAstXMsgClientSchema argSchema) {
        schema = argSchema;
    }

    public void createService(CFAstAuthorization Authorization, CFAstServiceBuff Buff) {
        final String S_ProcName = "createService";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstCreate("\n\t\t\t", Buff) + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                Buff.set(realized.getServiceBuff());
            }
        } else {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getLastObjectProcessed()");
        }
    }

    public CFAstServiceBuff readDerived(CFAstAuthorization Authorization, CFAstServicePKey PKey) {
        final String S_ProcName = "readDerived";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstRead("\n\t\t\t", PKey) + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAstServiceBuff lockDerived(CFAstAuthorization Authorization, CFAstServicePKey PKey) {
        final String S_ProcName = "lockDerived";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstLock("\n\t\t\t", PKey) + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAstServiceBuff[] readAllDerived(CFAstAuthorization Authorization) {
        final String S_ProcName = "readAllDerived";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadAll("\n\t\t\t") + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        Object sortedMapObj = responseHandler.getSortedMapOfObjects();
        if (sortedMapObj == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getSortedMapOfObjects");
        }
        SortedMap<CFAstServicePKey, ICFAstServiceObj> sortedMap = (SortedMap<CFAstServicePKey, ICFAstServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAstServiceBuff arr[] = new CFAstServiceBuff[sz];
        Iterator<ICFAstServiceObj> iter = sortedMap.values().iterator();
        ICFAstServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAstServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAstServiceBuff readDerivedByIdIdx(CFAstAuthorization Authorization, long argClusterId,
            long argServiceId) {
        final String S_ProcName = "readDerivedByIdIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByIdIdx("\n\t\t\t",
                        argClusterId, argServiceId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAstServiceBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
        final String S_ProcName = "readDerivedByClusterIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByClusterIdx("\n\t\t\t", argClusterId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        Object sortedMapObj = responseHandler.getSortedMapOfObjects();
        if (sortedMapObj == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getSortedMapOfObjects");
        }
        SortedMap<CFAstServicePKey, ICFAstServiceObj> sortedMap = (SortedMap<CFAstServicePKey, ICFAstServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAstServiceBuff arr[] = new CFAstServiceBuff[sz];
        Iterator<ICFAstServiceObj> iter = sortedMap.values().iterator();
        ICFAstServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAstServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAstServiceBuff[] readDerivedByHostIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId) {
        final String S_ProcName = "readDerivedByHostIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByHostIdx("\n\t\t\t",
                        argClusterId, argHostNodeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        Object sortedMapObj = responseHandler.getSortedMapOfObjects();
        if (sortedMapObj == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getSortedMapOfObjects");
        }
        SortedMap<CFAstServicePKey, ICFAstServiceObj> sortedMap = (SortedMap<CFAstServicePKey, ICFAstServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAstServiceBuff arr[] = new CFAstServiceBuff[sz];
        Iterator<ICFAstServiceObj> iter = sortedMap.values().iterator();
        ICFAstServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAstServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAstServiceBuff[] readDerivedByTypeIdx(CFAstAuthorization Authorization, int argServiceTypeId) {
        final String S_ProcName = "readDerivedByTypeIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByTypeIdx("\n\t\t\t", argServiceTypeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        Object sortedMapObj = responseHandler.getSortedMapOfObjects();
        if (sortedMapObj == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                    "responseHandler.getSortedMapOfObjects");
        }
        SortedMap<CFAstServicePKey, ICFAstServiceObj> sortedMap = (SortedMap<CFAstServicePKey, ICFAstServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAstServiceBuff arr[] = new CFAstServiceBuff[sz];
        Iterator<ICFAstServiceObj> iter = sortedMap.values().iterator();
        ICFAstServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAstServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAstServiceBuff readDerivedByUTypeIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId, int argServiceTypeId) {
        final String S_ProcName = "readDerivedByUTypeIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByUTypeIdx("\n\t\t\t", argClusterId,
                        argHostNodeId, argServiceTypeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAstServiceBuff readDerivedByUHostPortIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId, short argHostPort) {
        final String S_ProcName = "readDerivedByUHostPortIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstReadByUHostPortIdx("\n\t\t\t", argClusterId,
                        argHostNodeId, argHostPort)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAstServiceBuff readBuff(CFAstAuthorization Authorization, CFAstServicePKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuff");
    }

    public CFAstServiceBuff lockBuff(CFAstAuthorization Authorization, CFAstServicePKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lockBuff");
    }

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

    public CFAstServiceBuff readBuffByIdIdx(CFAstAuthorization Authorization, long argClusterId,
            long argServiceId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx");
    }

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

    public CFAstServiceBuff[] readBuffByHostIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByHostIdx");
    }

    public CFAstServiceBuff[] readBuffByTypeIdx(CFAstAuthorization Authorization, int argServiceTypeId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByTypeIdx");
    }

    public CFAstServiceBuff readBuffByUTypeIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId, int argServiceTypeId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUTypeIdx");
    }

    public CFAstServiceBuff readBuffByUHostPortIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId, short argHostPort) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByUHostPortIdx");
    }

    public void updateService(CFAstAuthorization Authorization, CFAstServiceBuff Buff) {
        final String S_ProcName = "updateService";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstUpdate("\n\t\t\t", Buff) + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAstServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAstServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAstServiceObj) {
                realized = (ICFAstServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAstServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        if (buff != null) {
            Buff.set(buff);
        }
    }

    public void deleteService(CFAstAuthorization Authorization, CFAstServiceBuff Buff) {
        final String S_ProcName = "deleteService";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstDelete("\n\t\t\t", Buff) + "\n"
                + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByIdIdx(CFAstAuthorization Authorization, long argClusterId, long argServiceId) {
        final String S_ProcName = "deleteServiceByIdIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByIdIdx("\n\t\t\t",
                        argClusterId, argServiceId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByIdIdx(CFAstAuthorization Authorization, CFAstServicePKey argKey) {
        deleteServiceByIdIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredServiceId());
    }

    public void deleteServiceByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
        final String S_ProcName = "deleteServiceByClusterIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByClusterIdx("\n\t\t\t", argClusterId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByClusterIdx(CFAstAuthorization Authorization, CFAstServiceByClusterIdxKey argKey) {
        deleteServiceByClusterIdx(Authorization, argKey.getRequiredClusterId());
    }

    public void deleteServiceByHostIdx(CFAstAuthorization Authorization, long argClusterId, long argHostNodeId) {
        final String S_ProcName = "deleteServiceByHostIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByHostIdx("\n\t\t\t",
                        argClusterId, argHostNodeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByHostIdx(CFAstAuthorization Authorization, CFAstServiceByHostIdxKey argKey) {
        deleteServiceByHostIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredHostNodeId());
    }

    public void deleteServiceByTypeIdx(CFAstAuthorization Authorization, int argServiceTypeId) {
        final String S_ProcName = "deleteServiceByTypeIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByTypeIdx("\n\t\t\t", argServiceTypeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByTypeIdx(CFAstAuthorization Authorization, CFAstServiceByTypeIdxKey argKey) {
        deleteServiceByTypeIdx(Authorization, argKey.getRequiredServiceTypeId());
    }

    public void deleteServiceByUTypeIdx(CFAstAuthorization Authorization, long argClusterId, long argHostNodeId,
            int argServiceTypeId) {
        final String S_ProcName = "deleteServiceByUTypeIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByUTypeIdx("\n\t\t\t", argClusterId,
                        argHostNodeId, argServiceTypeId)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByUTypeIdx(CFAstAuthorization Authorization, CFAstServiceByUTypeIdxKey argKey) {
        deleteServiceByUTypeIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredHostNodeId(),
                argKey.getRequiredServiceTypeId());
    }

    public void deleteServiceByUHostPortIdx(CFAstAuthorization Authorization, long argClusterId, long argHostNodeId,
            short argHostPort) {
        final String S_ProcName = "deleteServiceByUHostPortIdx";
        String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAstXMsgServiceMessageFormatter.formatServiceRqstDeleteByUHostPortIdx("\n\t\t\t", argClusterId,
                        argHostNodeId, argHostPort)
                + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        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 deleteServiceByUHostPortIdx(CFAstAuthorization Authorization,
            CFAstServiceByUHostPortIdxKey argKey) {
        deleteServiceByUHostPortIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredHostNodeId(),
                argKey.getRequiredHostPort());
    }

    public CFAstCursor openServiceCursorAll(CFAstAuthorization Authorization) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openServiceCursorAll");
    }

    public CFAstCursor openServiceCursorByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(),
                "openServiceCursorByClusterIdx");
    }

    public CFAstCursor openServiceCursorByHostIdx(CFAstAuthorization Authorization, long argClusterId,
            long argHostNodeId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openServiceCursorByHostIdx");
    }

    public CFAstCursor openServiceCursorByTypeIdx(CFAstAuthorization Authorization, int argServiceTypeId) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openServiceCursorByTypeIdx");
    }

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

    public CFAstServiceBuff nextServiceCursor(CFAstCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "next$Tablename$Cursor");
    }

    public CFAstServiceBuff prevServiceCursor(CFAstCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "prevServiceCursor");
    }

    public CFAstServiceBuff firstServiceCursor(CFAstCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "firstServiceCursor");
    }

    public CFAstServiceBuff lastServiceCursor(CFAstCursor Cursor) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lastServiceCursor");
    }

    public CFAstServiceBuff nthServiceCursor(CFAstCursor Cursor, int Idx) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nthServiceCursor");
    }

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