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 LocationSchedulePG.
029: * @see LocationSchedulePG
030: * @see NewLocationSchedulePG
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 LocationSchedulePGImpl extends
045: java.beans.SimpleBeanInfo implements NewLocationSchedulePG,
046: Cloneable {
047: public LocationSchedulePGImpl() {
048: }
049:
050: // Slots
051:
052: private Schedule theSchedule;
053:
054: public Schedule getSchedule() {
055: return theSchedule;
056: }
057:
058: public void setSchedule(Schedule schedule) {
059: theSchedule = schedule;
060: }
061:
062: public LocationSchedulePGImpl(LocationSchedulePG original) {
063: theSchedule = original.getSchedule();
064: }
065:
066: public boolean equals(Object other) {
067:
068: if (!(other instanceof LocationSchedulePG)) {
069: return false;
070: }
071:
072: LocationSchedulePG otherLocationSchedulePG = (LocationSchedulePG) other;
073:
074: if (getSchedule() == null) {
075: if (otherLocationSchedulePG.getSchedule() != null) {
076: return false;
077: }
078: } else if (!(getSchedule().equals(otherLocationSchedulePG
079: .getSchedule()))) {
080: return false;
081: }
082:
083: return true;
084: }
085:
086: public final boolean hasDataQuality() {
087: return false;
088: }
089:
090: private transient LocationSchedulePG _locked = null;
091:
092: public PropertyGroup lock(Object key) {
093: if (_locked == null)
094: _locked = new _Locked(key);
095: return _locked;
096: }
097:
098: public PropertyGroup lock() {
099: return lock(null);
100: }
101:
102: public NewPropertyGroup unlock(Object key) {
103: return this ;
104: }
105:
106: public Object clone() throws CloneNotSupportedException {
107: return new LocationSchedulePGImpl(LocationSchedulePGImpl.this );
108: }
109:
110: public PropertyGroup copy() {
111: try {
112: return (PropertyGroup) clone();
113: } catch (CloneNotSupportedException cnse) {
114: return null;
115: }
116: }
117:
118: public Class getPrimaryClass() {
119: return primaryClass;
120: }
121:
122: public String getAssetGetMethod() {
123: return assetGetter;
124: }
125:
126: public String getAssetSetMethod() {
127: return assetSetter;
128: }
129:
130: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
131: static {
132: try {
133: properties[0] = new PropertyDescriptor("schedule",
134: LocationSchedulePG.class, "getSchedule", null);
135: } catch (Exception e) {
136: org.cougaar.util.log.Logging.getLogger(
137: LocationSchedulePG.class).error("Caught exception",
138: e);
139: }
140: }
141:
142: public PropertyDescriptor[] getPropertyDescriptors() {
143: return properties;
144: }
145:
146: private final class _Locked extends java.beans.SimpleBeanInfo
147: implements LocationSchedulePG, Cloneable, LockedPG {
148: private transient Object theKey = null;
149:
150: _Locked(Object key) {
151: if (this .theKey == null)
152: this .theKey = key;
153: }
154:
155: public _Locked() {
156: }
157:
158: public PropertyGroup lock() {
159: return this ;
160: }
161:
162: public PropertyGroup lock(Object o) {
163: return this ;
164: }
165:
166: public NewPropertyGroup unlock(Object key)
167: throws IllegalAccessException {
168: if (theKey.equals(key)) {
169: return LocationSchedulePGImpl.this ;
170: } else {
171: throw new IllegalAccessException(
172: "unlock: mismatched internal and provided keys!");
173: }
174: }
175:
176: public PropertyGroup copy() {
177: try {
178: return (PropertyGroup) clone();
179: } catch (CloneNotSupportedException cnse) {
180: return null;
181: }
182: }
183:
184: public Object clone() throws CloneNotSupportedException {
185: return new LocationSchedulePGImpl(
186: LocationSchedulePGImpl.this );
187: }
188:
189: public boolean equals(Object object) {
190: return LocationSchedulePGImpl.this .equals(object);
191: }
192:
193: public Schedule getSchedule() {
194: return LocationSchedulePGImpl.this .getSchedule();
195: }
196:
197: public final boolean hasDataQuality() {
198: return false;
199: }
200:
201: public Class getPrimaryClass() {
202: return primaryClass;
203: }
204:
205: public String getAssetGetMethod() {
206: return assetGetter;
207: }
208:
209: public String getAssetSetMethod() {
210: return assetSetter;
211: }
212:
213: public PropertyDescriptor[] getPropertyDescriptors() {
214: return properties;
215: }
216:
217: public Class getIntrospectionClass() {
218: return LocationSchedulePGImpl.class;
219: }
220:
221: }
222:
223: }
|