001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: GetFeatureWithLockTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs.impl;
007:
008: import java.math.BigInteger;
009:
010: import net.opengis.wfs.GetFeatureWithLockType;
011: import net.opengis.wfs.WfsPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014:
015: import org.eclipse.emf.ecore.EClass;
016:
017: import org.eclipse.emf.ecore.impl.ENotificationImpl;
018:
019: /**
020: * <!-- begin-user-doc -->
021: * An implementation of the model object '<em><b>Get Feature With Lock Type</b></em>'.
022: * <!-- end-user-doc -->
023: * <p>
024: * The following features are implemented:
025: * <ul>
026: * <li>{@link net.opengis.wfs.impl.GetFeatureWithLockTypeImpl#getExpiry <em>Expiry</em>}</li>
027: * </ul>
028: * </p>
029: *
030: * @generated
031: */
032: public class GetFeatureWithLockTypeImpl extends GetFeatureTypeImpl
033: implements GetFeatureWithLockType {
034: /**
035: * The default value of the '{@link #getExpiry() <em>Expiry</em>}' attribute.
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @see #getExpiry()
039: * @generated
040: * @ordered
041: */
042: protected static final BigInteger EXPIRY_EDEFAULT = new BigInteger(
043: "5");
044:
045: /**
046: * The cached value of the '{@link #getExpiry() <em>Expiry</em>}' attribute.
047: * <!-- begin-user-doc -->
048: * <!-- end-user-doc -->
049: * @see #getExpiry()
050: * @generated
051: * @ordered
052: */
053: protected BigInteger expiry = EXPIRY_EDEFAULT;
054:
055: /**
056: * This is true if the Expiry attribute has been set.
057: * <!-- begin-user-doc -->
058: * <!-- end-user-doc -->
059: * @generated
060: * @ordered
061: */
062: protected boolean expiryESet;
063:
064: /**
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @generated
068: */
069: protected GetFeatureWithLockTypeImpl() {
070: super ();
071: }
072:
073: /**
074: * <!-- begin-user-doc -->
075: * <!-- end-user-doc -->
076: * @generated
077: */
078: protected EClass eStaticClass() {
079: return WfsPackage.Literals.GET_FEATURE_WITH_LOCK_TYPE;
080: }
081:
082: /**
083: * <!-- begin-user-doc -->
084: * <!-- end-user-doc -->
085: * @generated
086: */
087: public BigInteger getExpiry() {
088: return expiry;
089: }
090:
091: /**
092: * <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: * @generated
095: */
096: public void setExpiry(BigInteger newExpiry) {
097: BigInteger oldExpiry = expiry;
098: expiry = newExpiry;
099: boolean oldExpiryESet = expiryESet;
100: expiryESet = true;
101: if (eNotificationRequired())
102: eNotify(new ENotificationImpl(this , Notification.SET,
103: WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY,
104: oldExpiry, expiry, !oldExpiryESet));
105: }
106:
107: /**
108: * <!-- begin-user-doc -->
109: * <!-- end-user-doc -->
110: * @generated
111: */
112: public void unsetExpiry() {
113: BigInteger oldExpiry = expiry;
114: boolean oldExpiryESet = expiryESet;
115: expiry = EXPIRY_EDEFAULT;
116: expiryESet = false;
117: if (eNotificationRequired())
118: eNotify(new ENotificationImpl(this , Notification.UNSET,
119: WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY,
120: oldExpiry, EXPIRY_EDEFAULT, oldExpiryESet));
121: }
122:
123: /**
124: * <!-- begin-user-doc -->
125: * <!-- end-user-doc -->
126: * @generated
127: */
128: public boolean isSetExpiry() {
129: return expiryESet;
130: }
131:
132: /**
133: * <!-- begin-user-doc -->
134: * <!-- end-user-doc -->
135: * @generated
136: */
137: public Object eGet(int featureID, boolean resolve, boolean coreType) {
138: switch (featureID) {
139: case WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY:
140: return getExpiry();
141: }
142: return super .eGet(featureID, resolve, coreType);
143: }
144:
145: /**
146: * <!-- begin-user-doc -->
147: * <!-- end-user-doc -->
148: * @generated
149: */
150: public void eSet(int featureID, Object newValue) {
151: switch (featureID) {
152: case WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY:
153: setExpiry((BigInteger) newValue);
154: return;
155: }
156: super .eSet(featureID, newValue);
157: }
158:
159: /**
160: * <!-- begin-user-doc -->
161: * <!-- end-user-doc -->
162: * @generated
163: */
164: public void eUnset(int featureID) {
165: switch (featureID) {
166: case WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY:
167: unsetExpiry();
168: return;
169: }
170: super .eUnset(featureID);
171: }
172:
173: /**
174: * <!-- begin-user-doc -->
175: * <!-- end-user-doc -->
176: * @generated
177: */
178: public boolean eIsSet(int featureID) {
179: switch (featureID) {
180: case WfsPackage.GET_FEATURE_WITH_LOCK_TYPE__EXPIRY:
181: return isSetExpiry();
182: }
183: return super .eIsSet(featureID);
184: }
185:
186: /**
187: * <!-- begin-user-doc -->
188: * <!-- end-user-doc -->
189: * @generated
190: */
191: public String toString() {
192: if (eIsProxy())
193: return super .toString();
194:
195: StringBuffer result = new StringBuffer(super .toString());
196: result.append(" (expiry: ");
197: if (expiryESet)
198: result.append(expiry);
199: else
200: result.append("<unset>");
201: result.append(')');
202: return result.toString();
203: }
204:
205: } //GetFeatureWithLockTypeImpl
|