/*
* <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:06 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/albbn/src/org/cougaar/logistics/plugin/trans/properties.def - DO NOT HAND EDIT */
/** Primary client interface for CargoCatCodeDimensionPG.
* Has dimension info
* @see NewCargoCatCodeDimensionPG
* @see CargoCatCodeDimensionPGImpl
**/
package org.cougaar.logistics.plugin.trans;
import org.cougaar.planning.ldm.measure.*;
import org.cougaar.planning.ldm.asset.*;
import org.cougaar.planning.ldm.plan.*;
import java.util.*;
import org.cougaar.glm.ldm.asset.*;
public interface CargoCatCodeDimensionPG extends PropertyGroup {
/** dimensions for this cargo cat code **/
PhysicalPG getDimensions();
/** cargo cat code for this chunk of level-2 aggregate. May only have one letter set if multiple assets have different cargo cat codes but same transportation category (e.g. outsize). **/
String getCargoCatCode();
/** indicates whether aggregate is just containers **/
boolean getIsContainer();
/** asset class of the aggregate **/
int getAssetClass();
// introspection and construction
/** the method of factoryClass that creates this type **/
String factoryMethod = "newCargoCatCodeDimensionPG";
/** the (mutable) class type returned by factoryMethod **/
String mutableClass = "org.cougaar.logistics.plugin.trans.NewCargoCatCodeDimensionPG";
/** the factory class **/
Class factoryClass = org.cougaar.logistics.plugin.trans.PropertyGroupFactory.class;
/** the (immutable) class type returned by domain factory **/
Class primaryClass = org.cougaar.logistics.plugin.trans.CargoCatCodeDimensionPG.class;
String assetSetter = "setCargoCatCodeDimensionPG";
String assetGetter = "getCargoCatCodeDimensionPG";
/** The Null instance for indicating that the PG definitely has no value **/
CargoCatCodeDimensionPG nullPG = new Null_CargoCatCodeDimensionPG();
/** Null_PG implementation for CargoCatCodeDimensionPG **/
final class Null_CargoCatCodeDimensionPG
implements CargoCatCodeDimensionPG, Null_PG
{
public PhysicalPG getDimensions() { throw new UndefinedValueException(); }
public String getCargoCatCode() { throw new UndefinedValueException(); }
public boolean getIsContainer() { throw new UndefinedValueException(); }
public int getAssetClass() { 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 CargoCatCodeDimensionPGImpl.class;
}
public boolean hasDataQuality() { return false; }
}
/** Future PG implementation for CargoCatCodeDimensionPG **/
final class Future
implements CargoCatCodeDimensionPG, Future_PG
{
public PhysicalPG getDimensions() {
waitForFinalize();
return _real.getDimensions();
}
public String getCargoCatCode() {
waitForFinalize();
return _real.getCargoCatCode();
}
public boolean getIsContainer() {
waitForFinalize();
return _real.getIsContainer();
}
public int getAssetClass() {
waitForFinalize();
return _real.getAssetClass();
}
public boolean equals(Object object) {
waitForFinalize();
return _real.equals(object);
}
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 CargoCatCodeDimensionPGImpl.class;
}
public synchronized boolean hasDataQuality() {
return (_real!=null) && _real.hasDataQuality();
}
// Finalization support
private CargoCatCodeDimensionPG _real = null;
public synchronized void finalize(PropertyGroup real) {
if (real instanceof CargoCatCodeDimensionPG) {
_real=(CargoCatCodeDimensionPG) 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();
}
}
}
}
}
|