001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: /* @generated Thu Sep 27 15:26:44 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/pizza/src/org/cougaar/pizza/asset/properties.def - DO NOT HAND EDIT */
028: /** Primary client interface for MeatPG.
029: * @see NewMeatPG
030: * @see MeatPGImpl
031: **/package org.cougaar.pizza.asset;
032:
033: import org.cougaar.planning.ldm.measure.*;
034: import org.cougaar.planning.ldm.asset.*;
035: import org.cougaar.planning.ldm.plan.*;
036: import java.util.*;
037:
038: public interface MeatPG extends PropertyGroup,
039: org.cougaar.planning.ldm.dq.HasDataQuality {
040:
041: // introspection and construction
042: /** the method of factoryClass that creates this type **/
043: String factoryMethod = "newMeatPG";
044: /** the (mutable) class type returned by factoryMethod **/
045: String mutableClass = "org.cougaar.pizza.asset.NewMeatPG";
046: /** the factory class **/
047: Class factoryClass = org.cougaar.pizza.asset.PropertyGroupFactory.class;
048: /** the (immutable) class type returned by domain factory **/
049: Class primaryClass = org.cougaar.pizza.asset.MeatPG.class;
050: String assetSetter = "setMeatPG";
051: String assetGetter = "getMeatPG";
052: /** The Null instance for indicating that the PG definitely has no value **/
053: MeatPG nullPG = new Null_MeatPG();
054:
055: /** Null_PG implementation for MeatPG **/
056: final class Null_MeatPG implements MeatPG, Null_PG {
057: public boolean equals(Object object) {
058: throw new UndefinedValueException();
059: }
060:
061: public Object clone() throws CloneNotSupportedException {
062: throw new CloneNotSupportedException();
063: }
064:
065: public NewPropertyGroup unlock(Object key) {
066: return null;
067: }
068:
069: public PropertyGroup lock(Object key) {
070: return null;
071: }
072:
073: public PropertyGroup lock() {
074: return null;
075: }
076:
077: public PropertyGroup copy() {
078: return null;
079: }
080:
081: public Class getPrimaryClass() {
082: return primaryClass;
083: }
084:
085: public String getAssetGetMethod() {
086: return assetGetter;
087: }
088:
089: public String getAssetSetMethod() {
090: return assetSetter;
091: }
092:
093: public Class getIntrospectionClass() {
094: return MeatPGImpl.class;
095: }
096:
097: public boolean hasDataQuality() {
098: return false;
099: }
100:
101: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
102: return null;
103: }
104: }
105:
106: /** Future PG implementation for MeatPG **/
107: final class Future implements MeatPG, Future_PG {
108: public boolean equals(Object object) {
109: waitForFinalize();
110: return _real.equals(object);
111: }
112:
113: public Object clone() throws CloneNotSupportedException {
114: throw new CloneNotSupportedException();
115: }
116:
117: public NewPropertyGroup unlock(Object key) {
118: return null;
119: }
120:
121: public PropertyGroup lock(Object key) {
122: return null;
123: }
124:
125: public PropertyGroup lock() {
126: return null;
127: }
128:
129: public PropertyGroup copy() {
130: return null;
131: }
132:
133: public Class getPrimaryClass() {
134: return primaryClass;
135: }
136:
137: public String getAssetGetMethod() {
138: return assetGetter;
139: }
140:
141: public String getAssetSetMethod() {
142: return assetSetter;
143: }
144:
145: public Class getIntrospectionClass() {
146: return MeatPGImpl.class;
147: }
148:
149: public synchronized boolean hasDataQuality() {
150: return (_real != null) && _real.hasDataQuality();
151: }
152:
153: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
154: return (_real == null) ? null : (_real.getDataQuality());
155: }
156:
157: // Finalization support
158: private MeatPG _real = null;
159:
160: public synchronized void finalize(PropertyGroup real) {
161: if (real instanceof MeatPG) {
162: _real = (MeatPG) real;
163: notifyAll();
164: } else {
165: throw new IllegalArgumentException(
166: "Finalization with wrong class: " + real);
167: }
168: }
169:
170: private synchronized void waitForFinalize() {
171: while (_real == null) {
172: try {
173: wait();
174: } catch (InterruptedException _ie) {
175: // We should really let waitForFinalize throw InterruptedException
176: Thread.interrupted();
177: }
178: }
179: }
180: }
181: }
|