net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientServiceTable.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientServiceTable.java

Source

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

/*
 *   MSS Code Factory Accounting Business Application Model
 *
 *   Copyright (c) 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.cfacc.v2_0.CFAccXMsgClient;

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.cfacc.v2_0.CFAcc.*;
import net.sourceforge.msscodefactory.cfacc.v2_0.CFAccObj.*;
import net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsg.*;
import net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgRspnHandler.*;

/*
 *   CFAccXMsgClientServiceTable XMsg Client DbIO implementation
 *   for Service.
 */
public class CFAccXMsgClientServiceTable implements ICFAccServiceTable {
    private CFAccXMsgClientSchema schema;

    public CFAccXMsgClientServiceTable(CFAccXMsgClientSchema argSchema) {
        schema = argSchema;
    }

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

    public CFAccServiceBuff readDerived(CFAccAuthorization Authorization, CFAccServicePKey PKey) {
        final String S_ProcName = "readDerived";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstRead("\n\t\t\t", PKey) + "\n"
                + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAccServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAccServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAccServiceObj) {
                realized = (ICFAccServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAccServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAccServiceBuff lockDerived(CFAccAuthorization Authorization, CFAccServicePKey PKey) {
        final String S_ProcName = "lockDerived";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstLock("\n\t\t\t", PKey) + "\n"
                + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
        responseHandler.parseStringContents(rspn);
        CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
        if (exceptionRaised != null) {
            throw exceptionRaised;
        }
        CFAccServiceBuff buff = null;
        Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
        if (lastObjectProcessed != null) {
            ICFAccServiceObj realized = null;
            if (lastObjectProcessed instanceof ICFAccServiceObj) {
                realized = (ICFAccServiceObj) lastObjectProcessed;
            } else {
                throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                        "lastObjectProcessed", lastObjectProcessed, "ICFAccServiceObj");
            }
            if (realized != null) {
                buff = realized.getServiceBuff();
            }
        }
        return (buff);
    }

    public CFAccServiceBuff[] readAllDerived(CFAccAuthorization Authorization) {
        final String S_ProcName = "readAllDerived";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstReadAll("\n\t\t\t") + "\n"
                + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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<CFAccServicePKey, ICFAccServiceObj> sortedMap = (SortedMap<CFAccServicePKey, ICFAccServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAccServiceBuff arr[] = new CFAccServiceBuff[sz];
        Iterator<ICFAccServiceObj> iter = sortedMap.values().iterator();
        ICFAccServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAccServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

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

    public CFAccServiceBuff[] readDerivedByClusterIdx(CFAccAuthorization Authorization, long argClusterId) {
        final String S_ProcName = "readDerivedByClusterIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstReadByClusterIdx("\n\t\t\t", argClusterId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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<CFAccServicePKey, ICFAccServiceObj> sortedMap = (SortedMap<CFAccServicePKey, ICFAccServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAccServiceBuff arr[] = new CFAccServiceBuff[sz];
        Iterator<ICFAccServiceObj> iter = sortedMap.values().iterator();
        ICFAccServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAccServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAccServiceBuff[] readDerivedByHostIdx(CFAccAuthorization Authorization, long argClusterId,
            long argHostNodeId) {
        final String S_ProcName = "readDerivedByHostIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAccXMsgServiceMessageFormatter.formatServiceRqstReadByHostIdx("\n\t\t\t",
                        argClusterId, argHostNodeId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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<CFAccServicePKey, ICFAccServiceObj> sortedMap = (SortedMap<CFAccServicePKey, ICFAccServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAccServiceBuff arr[] = new CFAccServiceBuff[sz];
        Iterator<ICFAccServiceObj> iter = sortedMap.values().iterator();
        ICFAccServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAccServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

    public CFAccServiceBuff[] readDerivedByTypeIdx(CFAccAuthorization Authorization, int argServiceTypeId) {
        final String S_ProcName = "readDerivedByTypeIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstReadByTypeIdx("\n\t\t\t", argServiceTypeId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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<CFAccServicePKey, ICFAccServiceObj> sortedMap = (SortedMap<CFAccServicePKey, ICFAccServiceObj>) sortedMapObj;
        int sz = sortedMap.size();
        CFAccServiceBuff arr[] = new CFAccServiceBuff[sz];
        Iterator<ICFAccServiceObj> iter = sortedMap.values().iterator();
        ICFAccServiceObj cur;
        for (int idx = 0; idx < sz; idx++) {
            cur = (ICFAccServiceObj) iter.next();
            arr[idx] = cur.getServiceBuff();
        }
        return (arr);
    }

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

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

    public CFAccServiceBuff readBuff(CFAccAuthorization Authorization, CFAccServicePKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuff");
    }

    public CFAccServiceBuff lockBuff(CFAccAuthorization Authorization, CFAccServicePKey PKey) {
        throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lockBuff");
    }

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

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

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

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

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

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

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

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

    public void deleteService(CFAccAuthorization Authorization, CFAccServiceBuff Buff) {
        final String S_ProcName = "deleteService";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstDelete("\n\t\t\t", Buff) + "\n"
                + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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(CFAccAuthorization Authorization, long argClusterId, long argServiceId) {
        final String S_ProcName = "deleteServiceByIdIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAccXMsgServiceMessageFormatter.formatServiceRqstDeleteByIdIdx("\n\t\t\t",
                        argClusterId, argServiceId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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(CFAccAuthorization Authorization, CFAccServicePKey argKey) {
        deleteServiceByIdIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredServiceId());
    }

    public void deleteServiceByClusterIdx(CFAccAuthorization Authorization, long argClusterId) {
        final String S_ProcName = "deleteServiceByClusterIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstDeleteByClusterIdx("\n\t\t\t", argClusterId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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(CFAccAuthorization Authorization, CFAccServiceByClusterIdxKey argKey) {
        deleteServiceByClusterIdx(Authorization, argKey.getRequiredClusterId());
    }

    public void deleteServiceByHostIdx(CFAccAuthorization Authorization, long argClusterId, long argHostNodeId) {
        final String S_ProcName = "deleteServiceByHostIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
                + "\n" + "\t" + CFAccXMsgServiceMessageFormatter.formatServiceRqstDeleteByHostIdx("\n\t\t\t",
                        argClusterId, argHostNodeId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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(CFAccAuthorization Authorization, CFAccServiceByHostIdxKey argKey) {
        deleteServiceByHostIdx(Authorization, argKey.getRequiredClusterId(), argKey.getRequiredHostNodeId());
    }

    public void deleteServiceByTypeIdx(CFAccAuthorization Authorization, int argServiceTypeId) {
        final String S_ProcName = "deleteServiceByTypeIdx";
        String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
                + CFAccXMsgServiceMessageFormatter.formatServiceRqstDeleteByTypeIdx("\n\t\t\t", argServiceTypeId)
                + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
        String rspn = schema.sendReceive(Authorization, rqst);
        if ((rspn == null) || (rspn.length() <= 0)) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
        }
        CFAccXMsgRspnHandler 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(CFAccAuthorization Authorization, CFAccServiceByTypeIdxKey argKey) {
        deleteServiceByTypeIdx(Authorization, argKey.getRequiredServiceTypeId());
    }

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

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

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

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

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

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

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

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

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

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

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

    public CFAccServiceBuff nthServiceCursor(CFAccCursor 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");
    }
}