Package Express.services

Source Code of Express.services.BusinessMgr

/*
Copyright (c) 2003-2009 ITerative Consulting Pty Ltd. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:

o Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
 
o Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
   
o This jcTOOL Helper Class software, whether in binary or source form may not be used within,
or to derive, any other product without the specific prior written permission of the copyright holder

 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


*/
package Express.services;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;

import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import Express.services.interfaces.IBusinessMgr;
import Express.services.interfaces.IBusinessServiceMgr;
import Framework.RuntimeProperties;
import Framework.ServiceObjectContext;

/**
* The BusinessMgr class is an abstract class that defines the attributes and operations in common to all business class managers. The primary public operations that the BusinessMgr class and subclasses support are select and update.
* <p>
* @author ITerative Consulting
* @since  26-Feb-2008
*/
@RuntimeProperties(isDistributed=true, isAnchored=true, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class BusinessMgr
        implements Serializable, Observable, IBusinessMgr
{

    // ----------
    // Attributes
    // ----------
    public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
    private IBusinessServiceMgr parentService;
    private boolean readOnly;
    private Trace trace;

    // ------------
    // Constructors
    // ------------
    public BusinessMgr() {
        // Explicitly call the superclass constructor to prevent the implicit call
        super();

        this.setReadOnly(false);

    }

    public BusinessMgr(ServiceObjectContext pContext) {
    }

    // ----------------------
    // Accessors and Mutators
    // ----------------------
    public void setParentService(IBusinessServiceMgr parentService) {
        IBusinessServiceMgr oldValue = this.parentService;
        this.parentService = parentService;
        this.qq_Listeners.firePropertyChange("parentService", oldValue, this.parentService);
    }

    public IBusinessServiceMgr getParentService() {
        return this.parentService;
    }

    public void setReadOnly(boolean readOnly) {
        boolean oldValue = this.readOnly;
        this.readOnly = readOnly;
        this.qq_Listeners.firePropertyChange("readOnly", oldValue, this.readOnly);
    }

    public boolean getReadOnly() {
        return this.readOnly;
    }

    public void setTrace(Trace trace) {
        Trace oldValue = this.trace;
        this.trace = trace;
        this.qq_Listeners.firePropertyChange("trace", oldValue, this.trace);
    }

    public Trace getTrace() {
        return this.trace;
    }

    // -------
    // Methods
    // -------
    public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(property, listener);
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(property, listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(listener);
    }
    /**
     * newKey<p>
     * NewKey<br>
     *     The NewKey method fills in the key attributes of a BusinessClass by<br>
     *     requesting one from its associated BusinessMgr.<br>
     * <p>
     *     source<br>
     *       The source parameter holds the BusinessClass which is to get a<br>
     *       new key.<br>
     * <p>
     * @param source Type: BusinessClass
     */
    public void newKey(BusinessClass source) {
        throw new Error(Error.GEN_UNIMPLEMENTED, "NewKey", this).getException();
    }

    /**
     * select<p>
     * Select<br>
     *     The Select method retrieves data as described by the query parameter<br>
     *     and returns it as an array of BusinessClasses.<br>
     * <p>
     *     query<br>
     *       The query parameter holds the BusinessQuery describing what should<br>
     *       be selected.<br>
     * <p>
     * @param query Type: BusinessQuery
     * @return Array_Of_BusinessClass<BusinessClass>
     */
    public Array_Of_BusinessClass<BusinessClass> select(BusinessQuery query) {
        throw new Error(Error.GEN_UNIMPLEMENTED, "Setup", this).getException();
    }

    /**
     * setup<p>
     * Setup<br>
     *     The Setup method is used to initialize the BusinessMgr.  It<br>
     *     should be invoked once before any other method is used.<br>
     * <p>
     *     This method will be overridden by the manager's generated class.<br>
     * <p>
     * @param managers Type: Array_Of_IBusinessMgr<IBusinessMgr> (Input) (default in Forte: NIL)
     */
    public void setup(Array_Of_IBusinessMgr<IBusinessMgr> managers) {
        throw new Error(Error.GEN_UNIMPLEMENTED, "Setup", this).getException();
    }
    public void setup(){
      this.setup(null);
    }
    /**
     * update<p>
     * Update<br>
     *     The Update method updates data as described by the query parameter.<br>
     * <p>
     *     query<br>
     *       The query parameter holds the BusinessQuery describing what should<br>
     *       be updated.<br>
     * <p>
     * @param query Type: BusinessQuery
     */
    public void update(BusinessQuery query) {
        throw new Error(Error.GEN_UNIMPLEMENTED, "Update", this).getException();
    }
// end class BusinessMgr
// c Pass 2 Conversion Time: 218 milliseconds
TOP

Related Classes of Express.services.BusinessMgr

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.