001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: TransactionSummaryTypeImpl.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.TransactionSummaryType;
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: import org.eclipse.emf.ecore.impl.EObjectImpl;
019:
020: /**
021: * <!-- begin-user-doc -->
022: * An implementation of the model object '<em><b>Transaction Summary Type</b></em>'.
023: * <!-- end-user-doc -->
024: * <p>
025: * The following features are implemented:
026: * <ul>
027: * <li>{@link net.opengis.wfs.impl.TransactionSummaryTypeImpl#getTotalInserted <em>Total Inserted</em>}</li>
028: * <li>{@link net.opengis.wfs.impl.TransactionSummaryTypeImpl#getTotalUpdated <em>Total Updated</em>}</li>
029: * <li>{@link net.opengis.wfs.impl.TransactionSummaryTypeImpl#getTotalDeleted <em>Total Deleted</em>}</li>
030: * </ul>
031: * </p>
032: *
033: * @generated
034: */
035: public class TransactionSummaryTypeImpl extends EObjectImpl implements
036: TransactionSummaryType {
037: /**
038: * The default value of the '{@link #getTotalInserted() <em>Total Inserted</em>}' attribute.
039: * <!-- begin-user-doc -->
040: * <!-- end-user-doc -->
041: * @see #getTotalInserted()
042: * @generated
043: * @ordered
044: */
045: protected static final BigInteger TOTAL_INSERTED_EDEFAULT = null;
046:
047: /**
048: * The cached value of the '{@link #getTotalInserted() <em>Total Inserted</em>}' attribute.
049: * <!-- begin-user-doc -->
050: * <!-- end-user-doc -->
051: * @see #getTotalInserted()
052: * @generated
053: * @ordered
054: */
055: protected BigInteger totalInserted = TOTAL_INSERTED_EDEFAULT;
056:
057: /**
058: * The default value of the '{@link #getTotalUpdated() <em>Total Updated</em>}' attribute.
059: * <!-- begin-user-doc -->
060: * <!-- end-user-doc -->
061: * @see #getTotalUpdated()
062: * @generated
063: * @ordered
064: */
065: protected static final BigInteger TOTAL_UPDATED_EDEFAULT = null;
066:
067: /**
068: * The cached value of the '{@link #getTotalUpdated() <em>Total Updated</em>}' attribute.
069: * <!-- begin-user-doc -->
070: * <!-- end-user-doc -->
071: * @see #getTotalUpdated()
072: * @generated
073: * @ordered
074: */
075: protected BigInteger totalUpdated = TOTAL_UPDATED_EDEFAULT;
076:
077: /**
078: * The default value of the '{@link #getTotalDeleted() <em>Total Deleted</em>}' attribute.
079: * <!-- begin-user-doc -->
080: * <!-- end-user-doc -->
081: * @see #getTotalDeleted()
082: * @generated
083: * @ordered
084: */
085: protected static final BigInteger TOTAL_DELETED_EDEFAULT = null;
086:
087: /**
088: * The cached value of the '{@link #getTotalDeleted() <em>Total Deleted</em>}' attribute.
089: * <!-- begin-user-doc -->
090: * <!-- end-user-doc -->
091: * @see #getTotalDeleted()
092: * @generated
093: * @ordered
094: */
095: protected BigInteger totalDeleted = TOTAL_DELETED_EDEFAULT;
096:
097: /**
098: * <!-- begin-user-doc -->
099: * <!-- end-user-doc -->
100: * @generated
101: */
102: protected TransactionSummaryTypeImpl() {
103: super ();
104: }
105:
106: /**
107: * <!-- begin-user-doc -->
108: * <!-- end-user-doc -->
109: * @generated
110: */
111: protected EClass eStaticClass() {
112: return WfsPackage.Literals.TRANSACTION_SUMMARY_TYPE;
113: }
114:
115: /**
116: * <!-- begin-user-doc -->
117: * <!-- end-user-doc -->
118: * @generated
119: */
120: public BigInteger getTotalInserted() {
121: return totalInserted;
122: }
123:
124: /**
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @generated
128: */
129: public void setTotalInserted(BigInteger newTotalInserted) {
130: BigInteger oldTotalInserted = totalInserted;
131: totalInserted = newTotalInserted;
132: if (eNotificationRequired())
133: eNotify(new ENotificationImpl(
134: this ,
135: Notification.SET,
136: WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_INSERTED,
137: oldTotalInserted, totalInserted));
138: }
139:
140: /**
141: * <!-- begin-user-doc -->
142: * <!-- end-user-doc -->
143: * @generated
144: */
145: public BigInteger getTotalUpdated() {
146: return totalUpdated;
147: }
148:
149: /**
150: * <!-- begin-user-doc -->
151: * <!-- end-user-doc -->
152: * @generated
153: */
154: public void setTotalUpdated(BigInteger newTotalUpdated) {
155: BigInteger oldTotalUpdated = totalUpdated;
156: totalUpdated = newTotalUpdated;
157: if (eNotificationRequired())
158: eNotify(new ENotificationImpl(this , Notification.SET,
159: WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_UPDATED,
160: oldTotalUpdated, totalUpdated));
161: }
162:
163: /**
164: * <!-- begin-user-doc -->
165: * <!-- end-user-doc -->
166: * @generated
167: */
168: public BigInteger getTotalDeleted() {
169: return totalDeleted;
170: }
171:
172: /**
173: * <!-- begin-user-doc -->
174: * <!-- end-user-doc -->
175: * @generated
176: */
177: public void setTotalDeleted(BigInteger newTotalDeleted) {
178: BigInteger oldTotalDeleted = totalDeleted;
179: totalDeleted = newTotalDeleted;
180: if (eNotificationRequired())
181: eNotify(new ENotificationImpl(this , Notification.SET,
182: WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_DELETED,
183: oldTotalDeleted, totalDeleted));
184: }
185:
186: /**
187: * <!-- begin-user-doc -->
188: * <!-- end-user-doc -->
189: * @generated
190: */
191: public Object eGet(int featureID, boolean resolve, boolean coreType) {
192: switch (featureID) {
193: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_INSERTED:
194: return getTotalInserted();
195: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_UPDATED:
196: return getTotalUpdated();
197: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_DELETED:
198: return getTotalDeleted();
199: }
200: return super .eGet(featureID, resolve, coreType);
201: }
202:
203: /**
204: * <!-- begin-user-doc -->
205: * <!-- end-user-doc -->
206: * @generated
207: */
208: public void eSet(int featureID, Object newValue) {
209: switch (featureID) {
210: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_INSERTED:
211: setTotalInserted((BigInteger) newValue);
212: return;
213: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_UPDATED:
214: setTotalUpdated((BigInteger) newValue);
215: return;
216: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_DELETED:
217: setTotalDeleted((BigInteger) newValue);
218: return;
219: }
220: super .eSet(featureID, newValue);
221: }
222:
223: /**
224: * <!-- begin-user-doc -->
225: * <!-- end-user-doc -->
226: * @generated
227: */
228: public void eUnset(int featureID) {
229: switch (featureID) {
230: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_INSERTED:
231: setTotalInserted(TOTAL_INSERTED_EDEFAULT);
232: return;
233: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_UPDATED:
234: setTotalUpdated(TOTAL_UPDATED_EDEFAULT);
235: return;
236: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_DELETED:
237: setTotalDeleted(TOTAL_DELETED_EDEFAULT);
238: return;
239: }
240: super .eUnset(featureID);
241: }
242:
243: /**
244: * <!-- begin-user-doc -->
245: * <!-- end-user-doc -->
246: * @generated
247: */
248: public boolean eIsSet(int featureID) {
249: switch (featureID) {
250: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_INSERTED:
251: return TOTAL_INSERTED_EDEFAULT == null ? totalInserted != null
252: : !TOTAL_INSERTED_EDEFAULT.equals(totalInserted);
253: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_UPDATED:
254: return TOTAL_UPDATED_EDEFAULT == null ? totalUpdated != null
255: : !TOTAL_UPDATED_EDEFAULT.equals(totalUpdated);
256: case WfsPackage.TRANSACTION_SUMMARY_TYPE__TOTAL_DELETED:
257: return TOTAL_DELETED_EDEFAULT == null ? totalDeleted != null
258: : !TOTAL_DELETED_EDEFAULT.equals(totalDeleted);
259: }
260: return super .eIsSet(featureID);
261: }
262:
263: /**
264: * <!-- begin-user-doc -->
265: * <!-- end-user-doc -->
266: * @generated
267: */
268: public String toString() {
269: if (eIsProxy())
270: return super .toString();
271:
272: StringBuffer result = new StringBuffer(super .toString());
273: result.append(" (totalInserted: ");
274: result.append(totalInserted);
275: result.append(", totalUpdated: ");
276: result.append(totalUpdated);
277: result.append(", totalDeleted: ");
278: result.append(totalDeleted);
279: result.append(')');
280: return result.toString();
281: }
282:
283: } //TransactionSummaryTypeImpl
|