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