1 21 package oracle.toplink.essentials.sessions; 23 24 import java.util.*; 25 import oracle.toplink.essentials.exceptions.*; 26 import oracle.toplink.essentials.changesets.UnitOfWorkChangeSet; 27 28 52 public interface UnitOfWork extends Session { 53 54 59 public void addReadOnlyClass(Class theClass); 60 61 66 public void addReadOnlyClasses(Vector classes); 67 68 75 public void assignSequenceNumber(Object object) throws DatabaseException; 76 77 85 public void assignSequenceNumbers() throws DatabaseException; 86 87 98 public void beginEarlyTransaction() throws DatabaseException; 99 100 116 public void commit() throws DatabaseException, OptimisticLockException; 117 118 134 public void commitAndResume() throws DatabaseException, OptimisticLockException; 135 136 152 public void commitAndResumeOnFailure() throws DatabaseException, OptimisticLockException; 153 154 168 public Object deepMergeClone(Object rmiClone); 169 170 179 public Object deepRevertObject(Object clone); 180 181 188 public void deepUnregisterObject(Object clone); 189 190 195 public void deleteAllObjects(Collection domainObjects); 196 197 202 public void deleteAllObjects(Vector domainObjects); 203 204 209 public Object deleteObject(Object domainObject); 210 211 221 public void dontPerformValidation(); 222 223 236 public void forceUpdateToVersionField(Object cloneFromUOW, boolean shouldModifyVersionField); 237 238 245 public UnitOfWorkChangeSet getCurrentChanges(); 246 247 251 public Object getOriginalVersionOfObject(Object workingClone); 252 253 258 public oracle.toplink.essentials.internal.sessions.AbstractSession getParent(); 259 260 265 public oracle.toplink.essentials.changesets.UnitOfWorkChangeSet getUnitOfWorkChangeSet(); 266 267 277 public int getValidationLevel(); 278 279 284 public boolean hasChanges(); 285 286 290 public boolean isActive(); 291 292 298 public boolean isClassReadOnly(Class theClass); 299 300 304 public boolean isNestedUnitOfWork(); 305 306 320 public Object mergeClone(Object rmiClone); 321 322 337 public Object mergeCloneWithReferences(Object rmiClone); 338 339 344 public Object newInstance(Class theClass); 345 346 356 public void performFullValidation(); 357 358 368 public void performPartialValidation(); 369 370 374 public void printRegisteredObjects(); 375 376 384 public Object refreshAndLockObject(Object object); 385 386 392 public Object refreshAndLockObject(Object object, short lockMode); 393 394 405 public Vector registerAllObjects(Collection domainObjects); 406 407 418 public Vector registerAllObjects(Vector domainObjects); 419 420 429 public Object registerExistingObject(Object existingObject); 430 431 441 public Object registerNewObject(Object newObject); 442 443 455 public Object registerObject(Object domainObject); 456 457 467 public void release(); 468 469 475 public void removeAllReadOnlyClasses(); 476 477 482 public void removeForceUpdateToVersionField(Object cloneFromUOW); 483 484 489 public void removeReadOnlyClass(Class theClass); 490 491 502 public void revertAndResume(); 503 504 513 public Object revertObject(Object clone); 514 515 525 public void setShouldNewObjectsBeCached(boolean shouldNewObjectsBeCached); 526 527 532 public void setShouldPerformDeletesFirst(boolean shouldPerformDeletesFirst); 533 534 542 public void setShouldThrowConformExceptions(int shouldThrowExceptions); 543 544 554 public void setValidationLevel(int validationLevel); 555 556 570 public Object shallowMergeClone(Object rmiClone); 571 572 581 public Object shallowRevertObject(Object clone); 582 583 590 public void shallowUnregisterObject(Object clone); 591 592 602 public boolean shouldNewObjectsBeCached(); 603 604 610 public boolean shouldPerformDeletesFirst(); 611 612 622 public boolean shouldPerformFullValidation(); 623 624 634 public boolean shouldPerformNoValidation(); 635 636 646 public boolean shouldPerformPartialValidation(); 647 648 655 public void unregisterObject(Object clone); 656 657 665 public void validateObjectSpace(); 666 667 685 public void writeChanges(); 686 } 687 | Popular Tags |