1 64 65 66 package com.jcorporate.expresso.core.dataobjects; 67 68 69 import com.jcorporate.expresso.core.db.DBException; 70 import org.apache.oro.text.regex.Pattern; 71 72 import java.util.ArrayList ; 73 import java.util.Iterator ; 74 import java.util.Map ; 75 76 91 92 public class SynchronizedDataObject implements DataObject { 93 DataObject target; 94 95 SynchronizedDataObject(DataObject _target) { 96 target = _target; 97 } 98 99 105 public static synchronized DataObject newInstance(DataObject wrappedObject) { 106 return new SynchronizedDataObject(wrappedObject); 107 } 108 109 117 public synchronized DataField getDataField(String fieldName) throws DBException { 118 return target.getDataField(fieldName); 119 } 120 121 122 127 public synchronized Iterator getFieldListIterator() { 128 return (new ArrayList (target.getMetaData().getFieldListArray())).iterator(); 129 } 130 131 139 public synchronized Iterator getKeyFieldListIterator() throws DBException { 140 return (new ArrayList (target.getMetaData().getKeyFieldListArray())).iterator(); 141 } 142 143 144 154 public synchronized DataObjectMetaData getMetaData() { 155 return target.getMetaData(); 156 } 157 158 166 public synchronized DataFieldMetaData getFieldMetaData(String fieldName) { 167 return target.getFieldMetaData(fieldName); 168 } 169 170 176 public synchronized void set(String fieldName, Object o) throws DataException { 177 target.set(fieldName, o); 178 } 179 180 187 public synchronized boolean equals(Object otherObject) { 188 return target.equals(otherObject); 189 } 190 191 194 public synchronized void add() throws DBException { 195 target.add(); 196 } 197 198 199 202 public synchronized void update() throws DBException { 203 target.update(); 204 } 205 206 209 public synchronized void delete() throws DBException { 210 target.delete(); 211 } 212 213 214 217 public synchronized void clear() throws DBException { 218 target.clear(); 219 } 220 221 222 229 public synchronized void setDataContext(String newContext) { 230 target.setDataContext(newContext); 231 } 232 233 238 public synchronized String getDataContext() { 239 return target.getDataContext(); 240 } 241 242 247 public synchronized void setFieldsWithDefaults() throws DataException { 248 target.setFieldsWithDefaults(); 249 } 250 251 259 public synchronized String getMappedDataContext() { 260 return target.getMappedDataContext(); 261 } 262 263 264 271 public synchronized void setAttribute(String attributeName, Object attributeValue) { 272 target.setAttribute(attributeName, attributeValue); 273 } 274 275 282 public synchronized Object getAttribute(String attributeName) { 283 return target.getAttribute(attributeName); 284 } 285 286 292 public synchronized Map getAllAttributes() { 293 return java.util.Collections.unmodifiableMap(target.getAllAttributes()); 294 } 295 296 297 304 public synchronized DataExecutorInterface getExecutor() { 305 return target.getExecutor(); 306 } 307 308 315 public synchronized DataQueryInterface getQueryInterface() { 316 return target.getQueryInterface(); 317 } 318 319 330 public synchronized void checkField(String fieldName, String fieldValue) throws DBException { 331 target.checkField(fieldName, fieldValue); 332 } 333 334 335 340 public synchronized String getStatus() { 341 return target.getStatus(); 342 } 343 344 345 352 public synchronized java.util.List getValidValuesList(String fieldName) throws DBException { 353 return java.util.Collections.unmodifiableList(target.getValidValuesList(fieldName)); 354 } 355 356 357 362 public synchronized void setLocale(java.util.Locale newLocale) { 363 target.setLocale(newLocale); 364 } 365 366 371 public synchronized java.util.Locale getLocale() { 372 return target.getLocale(); 373 } 374 375 376 386 public synchronized void setMaxRecords(int newMax) throws DBException { 387 target.setMaxRecords(newMax); 388 } 389 390 391 398 public synchronized int getMaxRecords() { 399 return target.getMaxRecords(); 400 } 401 402 403 418 public synchronized void setOffsetRecord(int newOffset) throws DBException { 419 target.setOffsetRecord(newOffset); 420 } 421 422 423 434 public synchronized int getOffsetRecord() { 435 return target.getOffsetRecord(); 436 } 437 438 451 public ArrayList searchAndRetrieveList(String sortOrder) throws DBException { 452 return new ArrayList (target.searchAndRetrieveList(sortOrder)); 453 } 454 455 466 public ArrayList searchAndRetrieveList() throws DBException { 467 return new ArrayList (target.searchAndRetrieveList()); 468 } 469 470 471 478 public synchronized boolean find() throws DBException { 479 return target.find(); 480 } 481 482 488 public synchronized int count() throws DBException { 489 return target.count(); 490 } 491 492 498 public String getKey() { 499 return target.getKey(); 500 } 501 502 503 508 public synchronized void setStatus(String statusValue) { 509 target.setStatus(statusValue); 510 } 511 512 520 public synchronized Object get(String fieldName) throws DataException { 521 return target.get(fieldName); 522 } 523 524 525 533 public synchronized String getField(String fieldName) throws DBException { 534 return target.getField(fieldName); 535 } 536 537 544 public void setGlobalMask(Pattern newMask) { 545 target.setGlobalMask(newMask); 546 } 547 548 553 public Pattern getGlobalMask() { 554 return target.getGlobalMask(); 555 } 556 557 558 563 public boolean isGlobalMasked() { 564 return target.isGlobalMasked(); 565 } 566 567 573 public int hashCode() { 574 return target.hashCode(); 575 } 576 577 } 578 | Popular Tags |