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: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 */
028: /** Implementation of CargoCatCodeDimensionPG.
029: * @see CargoCatCodeDimensionPG
030: * @see NewCargoCatCodeDimensionPG
031: **/package org.cougaar.logistics.plugin.trans;
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: import org.cougaar.glm.ldm.asset.*;
039:
040: import java.io.ObjectOutputStream;
041: import java.io.ObjectInputStream;
042: import java.io.IOException;
043: import java.beans.PropertyDescriptor;
044: import java.beans.IndexedPropertyDescriptor;
045:
046: public final class CargoCatCodeDimensionPGImpl extends
047: java.beans.SimpleBeanInfo implements
048: NewCargoCatCodeDimensionPG, Cloneable {
049: public CargoCatCodeDimensionPGImpl() {
050: }
051:
052: // Slots
053:
054: private PhysicalPG theDimensions;
055:
056: public PhysicalPG getDimensions() {
057: return theDimensions;
058: }
059:
060: public void setDimensions(PhysicalPG dimensions) {
061: theDimensions = dimensions;
062: }
063:
064: private String theCargoCatCode;
065:
066: public String getCargoCatCode() {
067: return theCargoCatCode;
068: }
069:
070: public void setCargoCatCode(String cargoCatCode) {
071: theCargoCatCode = cargoCatCode;
072: }
073:
074: private boolean theIsContainer;
075:
076: public boolean getIsContainer() {
077: return theIsContainer;
078: }
079:
080: public void setIsContainer(boolean isContainer) {
081: theIsContainer = isContainer;
082: }
083:
084: private int theAssetClass;
085:
086: public int getAssetClass() {
087: return theAssetClass;
088: }
089:
090: public void setAssetClass(int assetClass) {
091: theAssetClass = assetClass;
092: }
093:
094: public CargoCatCodeDimensionPGImpl(CargoCatCodeDimensionPG original) {
095: theDimensions = original.getDimensions();
096: theCargoCatCode = original.getCargoCatCode();
097: theIsContainer = original.getIsContainer();
098: theAssetClass = original.getAssetClass();
099: }
100:
101: public boolean equals(Object other) {
102:
103: if (!(other instanceof CargoCatCodeDimensionPG)) {
104: return false;
105: }
106:
107: CargoCatCodeDimensionPG otherCargoCatCodeDimensionPG = (CargoCatCodeDimensionPG) other;
108:
109: if (getDimensions() == null) {
110: if (otherCargoCatCodeDimensionPG.getDimensions() != null) {
111: return false;
112: }
113: } else if (!(getDimensions()
114: .equals(otherCargoCatCodeDimensionPG.getDimensions()))) {
115: return false;
116: }
117:
118: if (getCargoCatCode() == null) {
119: if (otherCargoCatCodeDimensionPG.getCargoCatCode() != null) {
120: return false;
121: }
122: } else if (!(getCargoCatCode()
123: .equals(otherCargoCatCodeDimensionPG.getCargoCatCode()))) {
124: return false;
125: }
126:
127: if (!(getIsContainer() == otherCargoCatCodeDimensionPG
128: .getIsContainer())) {
129: return false;
130: }
131:
132: if (!(getAssetClass() == otherCargoCatCodeDimensionPG
133: .getAssetClass())) {
134: return false;
135: }
136:
137: return true;
138: }
139:
140: public final boolean hasDataQuality() {
141: return false;
142: }
143:
144: private transient CargoCatCodeDimensionPG _locked = null;
145:
146: public PropertyGroup lock(Object key) {
147: if (_locked == null)
148: _locked = new _Locked(key);
149: return _locked;
150: }
151:
152: public PropertyGroup lock() {
153: return lock(null);
154: }
155:
156: public NewPropertyGroup unlock(Object key) {
157: return this ;
158: }
159:
160: public Object clone() throws CloneNotSupportedException {
161: return new CargoCatCodeDimensionPGImpl(
162: CargoCatCodeDimensionPGImpl.this );
163: }
164:
165: public PropertyGroup copy() {
166: try {
167: return (PropertyGroup) clone();
168: } catch (CloneNotSupportedException cnse) {
169: return null;
170: }
171: }
172:
173: public Class getPrimaryClass() {
174: return primaryClass;
175: }
176:
177: public String getAssetGetMethod() {
178: return assetGetter;
179: }
180:
181: public String getAssetSetMethod() {
182: return assetSetter;
183: }
184:
185: private final static PropertyDescriptor properties[] = new PropertyDescriptor[4];
186: static {
187: try {
188: properties[0] = new PropertyDescriptor("dimensions",
189: CargoCatCodeDimensionPG.class, "getDimensions",
190: null);
191: properties[1] = new PropertyDescriptor("cargoCatCode",
192: CargoCatCodeDimensionPG.class, "getCargoCatCode",
193: null);
194: properties[2] = new PropertyDescriptor("isContainer",
195: CargoCatCodeDimensionPG.class, "getIsContainer",
196: null);
197: properties[3] = new PropertyDescriptor("assetClass",
198: CargoCatCodeDimensionPG.class, "getAssetClass",
199: null);
200: } catch (Exception e) {
201: org.cougaar.util.log.Logging.getLogger(
202: CargoCatCodeDimensionPG.class).error(
203: "Caught exception", e);
204: }
205: }
206:
207: public PropertyDescriptor[] getPropertyDescriptors() {
208: return properties;
209: }
210:
211: private final class _Locked extends java.beans.SimpleBeanInfo
212: implements CargoCatCodeDimensionPG, Cloneable, LockedPG {
213: private transient Object theKey = null;
214:
215: _Locked(Object key) {
216: if (this .theKey == null)
217: this .theKey = key;
218: }
219:
220: public _Locked() {
221: }
222:
223: public PropertyGroup lock() {
224: return this ;
225: }
226:
227: public PropertyGroup lock(Object o) {
228: return this ;
229: }
230:
231: public NewPropertyGroup unlock(Object key)
232: throws IllegalAccessException {
233: if (theKey.equals(key)) {
234: return CargoCatCodeDimensionPGImpl.this ;
235: } else {
236: throw new IllegalAccessException(
237: "unlock: mismatched internal and provided keys!");
238: }
239: }
240:
241: public PropertyGroup copy() {
242: try {
243: return (PropertyGroup) clone();
244: } catch (CloneNotSupportedException cnse) {
245: return null;
246: }
247: }
248:
249: public Object clone() throws CloneNotSupportedException {
250: return new CargoCatCodeDimensionPGImpl(
251: CargoCatCodeDimensionPGImpl.this );
252: }
253:
254: public boolean equals(Object object) {
255: return CargoCatCodeDimensionPGImpl.this .equals(object);
256: }
257:
258: public PhysicalPG getDimensions() {
259: return CargoCatCodeDimensionPGImpl.this .getDimensions();
260: }
261:
262: public String getCargoCatCode() {
263: return CargoCatCodeDimensionPGImpl.this .getCargoCatCode();
264: }
265:
266: public boolean getIsContainer() {
267: return CargoCatCodeDimensionPGImpl.this .getIsContainer();
268: }
269:
270: public int getAssetClass() {
271: return CargoCatCodeDimensionPGImpl.this .getAssetClass();
272: }
273:
274: public final boolean hasDataQuality() {
275: return false;
276: }
277:
278: public Class getPrimaryClass() {
279: return primaryClass;
280: }
281:
282: public String getAssetGetMethod() {
283: return assetGetter;
284: }
285:
286: public String getAssetSetMethod() {
287: return assetSetter;
288: }
289:
290: public PropertyDescriptor[] getPropertyDescriptors() {
291: return properties;
292: }
293:
294: public Class getIntrospectionClass() {
295: return CargoCatCodeDimensionPGImpl.class;
296: }
297:
298: }
299:
300: }
|