RepairPartConsumerPG.java :  » Science » Cougaar12_4 » org » cougaar » logistics » ldm » asset » Java Open Source

Java Open Source » Science » Cougaar12_4 
Cougaar12_4 » org » cougaar » logistics » ldm » asset » RepairPartConsumerPG.java
/*
 * <copyright>
 *  
 *  Copyright 1997-2004 BBNT Solutions, LLC
 *  under sponsorship of the Defense Advanced Research Projects
 *  Agency (DARPA).
 * 
 *  You can redistribute this software and/or modify it under the
 *  terms of the Cougaar Open Source License as published on the
 *  Cougaar Open Source Website (www.cougaar.org).
 * 
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "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.
 *  
 * </copyright>
 */

/* @generated Thu Sep 27 15:26:05 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/albbn/src/org/cougaar/logistics/ldm/asset/consumerprops.def - DO NOT HAND EDIT */
/** Primary client interface for RepairPartConsumerPG.
 *  @see NewRepairPartConsumerPG
 *  @see RepairPartConsumerPGImpl
 **/

package org.cougaar.logistics.ldm.asset;

import org.cougaar.planning.ldm.measure.*;
import org.cougaar.planning.ldm.asset.*;
import org.cougaar.planning.ldm.plan.*;
import java.util.*;

import org.cougaar.logistics.ldm.MEIPrototypeProvider;
import  org.cougaar.logistics.ldm.ClassIConsumerPrototypeProvider;
import  org.cougaar.util.TimeSpan;


public interface RepairPartConsumerPG extends PropertyGroup, org.cougaar.planning.ldm.dq.HasDataQuality {
  Asset getMei();
  String getService();
  String getTheater();

  void initialize(MEIPrototypeProvider parentPlugin);
  List getPredicates();
  Schedule getParameterSchedule(Collection col, TimeSpan span);
  Rate getRate(Asset asset, List params);
  Collection getConsumed();
  PGDelegate copy(PropertyGroup del);
  // introspection and construction
  /** the method of factoryClass that creates this type **/
  String factoryMethod = "newRepairPartConsumerPG";
  /** the (mutable) class type returned by factoryMethod **/
  String mutableClass = "org.cougaar.logistics.ldm.asset.NewRepairPartConsumerPG";
  /** the factory class **/
  Class factoryClass = org.cougaar.logistics.ldm.asset.PropertyGroupFactory.class;
  /** the (immutable) class type returned by domain factory **/
   Class primaryClass = org.cougaar.logistics.ldm.asset.RepairPartConsumerPG.class;
  String assetSetter = "setRepairPartConsumerPG";
  String assetGetter = "getRepairPartConsumerPG";
  /** The Null instance for indicating that the PG definitely has no value **/
  RepairPartConsumerPG nullPG = new Null_RepairPartConsumerPG();

/** Null_PG implementation for RepairPartConsumerPG **/
final class Null_RepairPartConsumerPG
  implements RepairPartConsumerPG, Null_PG
{
  public Asset getMei() { throw new UndefinedValueException(); }
  public String getService() { throw new UndefinedValueException(); }
  public String getTheater() { throw new UndefinedValueException(); }
  public RepairPartConsumerBG getRepairPartBG() {
    throw new UndefinedValueException();
  }
  public void setRepairPartBG(RepairPartConsumerBG _repairPartBG) {
    throw new UndefinedValueException();
  }
  public void initialize(MEIPrototypeProvider parentPlugin) { throw new UndefinedValueException(); }
  public List getPredicates() { throw new UndefinedValueException(); }
  public Schedule getParameterSchedule(Collection col, TimeSpan span) { throw new UndefinedValueException(); }
  public Rate getRate(Asset asset, List params) { throw new UndefinedValueException(); }
  public Collection getConsumed() { throw new UndefinedValueException(); }
  public PGDelegate copy(PropertyGroup del) { throw new UndefinedValueException(); }
  public boolean equals(Object object) { throw new UndefinedValueException(); }
  public Object clone() throws CloneNotSupportedException {
    throw new CloneNotSupportedException();
  }
  public NewPropertyGroup unlock(Object key) { return null; }
  public PropertyGroup lock(Object key) { return null; }
  public PropertyGroup lock() { return null; }
  public PropertyGroup copy() { return null; }
  public Class getPrimaryClass(){return primaryClass;}
  public String getAssetGetMethod() {return assetGetter;}
  public String getAssetSetMethod() {return assetSetter;}
  public Class getIntrospectionClass() {
    return RepairPartConsumerPGImpl.class;
  }

  public boolean hasDataQuality() { return false; }
  public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() { return null; }
}

/** Future PG implementation for RepairPartConsumerPG **/
final class Future
  implements RepairPartConsumerPG, Future_PG
{
  public Asset getMei() {
    waitForFinalize();
    return _real.getMei();
  }
  public String getService() {
    waitForFinalize();
    return _real.getService();
  }
  public String getTheater() {
    waitForFinalize();
    return _real.getTheater();
  }
  public boolean equals(Object object) {
    waitForFinalize();
    return _real.equals(object);
  }
  public void initialize(MEIPrototypeProvider parentPlugin) {
    waitForFinalize();
    _real.initialize(parentPlugin);
  }
  public List getPredicates() {
    waitForFinalize();
    return _real.getPredicates();
  }
  public Schedule getParameterSchedule(Collection col, TimeSpan span) {
    waitForFinalize();
    return _real.getParameterSchedule(col, span);
  }
  public Rate getRate(Asset asset, List params) {
    waitForFinalize();
    return _real.getRate(asset, params);
  }
  public Collection getConsumed() {
    waitForFinalize();
    return _real.getConsumed();
  }
  public PGDelegate copy(PropertyGroup del) {
    waitForFinalize();
    return _real.copy(del);
  }
  public Object clone() throws CloneNotSupportedException {
    throw new CloneNotSupportedException();
  }
  public NewPropertyGroup unlock(Object key) { return null; }
  public PropertyGroup lock(Object key) { return null; }
  public PropertyGroup lock() { return null; }
  public PropertyGroup copy() { return null; }
  public Class getPrimaryClass(){return primaryClass;}
  public String getAssetGetMethod() {return assetGetter;}
  public String getAssetSetMethod() {return assetSetter;}
  public Class getIntrospectionClass() {
    return RepairPartConsumerPGImpl.class;
  }
  public synchronized boolean hasDataQuality() {
    return (_real!=null) && _real.hasDataQuality();
  }
  public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
    return (_real==null)?null:(_real.getDataQuality());
  }

  // Finalization support
  private RepairPartConsumerPG _real = null;
  public synchronized void finalize(PropertyGroup real) {
    if (real instanceof RepairPartConsumerPG) {
      _real=(RepairPartConsumerPG) real;
      notifyAll();
    } else {
      throw new IllegalArgumentException("Finalization with wrong class: "+real);
    }
  }
  private synchronized void waitForFinalize() {
    while (_real == null) {
      try {
        wait();
      } catch (InterruptedException _ie) {
        // We should really let waitForFinalize throw InterruptedException
        Thread.interrupted();
      }
    }
  }
}
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.