1 21 package oracle.toplink.essentials.sessions; 23 24 import java.util.*; 25 import java.io.*; 26 import oracle.toplink.essentials.descriptors.ClassDescriptor; 27 import oracle.toplink.essentials.expressions.*; 28 import oracle.toplink.essentials.queryframework.*; 29 import oracle.toplink.essentials.exceptions.*; 30 import oracle.toplink.essentials.logging.SessionLog; 31 import oracle.toplink.essentials.logging.SessionLogEntry; 32 import oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform; 33 import oracle.toplink.essentials.internal.databaseaccess.Platform; 34 35 55 public interface Session { 56 57 68 public UnitOfWork acquireUnitOfWork(); 69 70 75 public void addQuery(String name, DatabaseQuery query); 76 77 83 public void addEjbqlPlaceHolderQuery(DatabaseQuery query); 84 85 89 public void clearIntegrityChecker(); 90 91 95 public void clearProfile(); 96 97 101 public boolean containsQuery(String queryName); 102 103 112 public Object copyObject(Object original); 113 114 121 public Object copyObject(Object original, ObjectCopyingPolicy policy); 122 123 128 public boolean doesObjectExist(Object object) throws DatabaseException; 129 130 134 public void dontLogMessages(); 135 136 146 public int executeNonSelectingCall(Call call); 147 148 152 public void executeNonSelectingSQL(String sqlString); 153 154 161 public Object executeQuery(String queryName); 162 163 171 public Object executeQuery(String queryName, Class domainClass); 172 173 181 public Object executeQuery(String queryName, Class domainClass, Object arg1); 182 183 191 public Object executeQuery(String queryName, Class domainClass, Object arg1, Object arg2); 192 193 201 public Object executeQuery(String queryName, Class domainClass, Object arg1, Object arg2, Object arg3); 202 203 211 public Object executeQuery(String queryName, Class domainClass, Vector argumentValues); 212 213 220 public Object executeQuery(String queryName, Object arg1); 221 222 229 public Object executeQuery(String queryName, Object arg1, Object arg2); 230 231 238 public Object executeQuery(String queryName, Object arg1, Object arg2, Object arg3); 239 240 247 public Object executeQuery(String queryName, Vector argumentValues); 248 249 258 public Object executeQuery(DatabaseQuery query) throws TopLinkException; 259 260 265 public Object executeQuery(DatabaseQuery query, Vector argumentValues); 266 267 278 public Vector executeSelectingCall(Call call); 279 280 285 public Vector executeSQL(String sqlString); 286 287 292 public Session getActiveSession(); 293 294 299 public UnitOfWork getActiveUnitOfWork(); 300 301 308 public ClassDescriptor getClassDescriptor(Class theClass); 309 310 314 public ClassDescriptor getClassDescriptor(Object domainObject); 315 316 320 public ClassDescriptor getClassDescriptorForAlias(String alias); 321 322 326 public ClassDescriptor getDescriptor(Class theClass); 327 328 332 public ClassDescriptor getDescriptor(Object domainObject); 333 334 338 public ClassDescriptor getDescriptorForAlias(String alias); 339 340 344 public Map getDescriptors(); 345 346 351 public List getEjbqlPlaceHolderQueries(); 352 353 358 public SessionEventManager getEventManager(); 359 360 364 public ExceptionHandler getExceptionHandler(); 365 366 372 public ExternalTransactionController getExternalTransactionController(); 373 374 380 public IdentityMapAccessor getIdentityMapAccessor(); 381 382 386 public IntegrityChecker getIntegrityChecker(); 387 388 393 public Writer getLog(); 394 395 402 public DatabasePlatform getPlatform(); 403 404 409 public Platform getDatasourcePlatform(); 410 411 418 public DatabaseLogin getLogin(); 419 420 425 public Login getDatasourceLogin(); 426 427 432 public String getName(); 433 434 438 public Number getNextSequenceNumberValue(Class domainClass); 439 440 446 public SessionProfiler getProfiler(); 447 448 453 public oracle.toplink.essentials.sessions.Project getProject(); 454 455 459 public Map getProperties(); 460 461 465 public Object getProperty(String name); 466 467 471 public Map getQueries(); 472 473 478 public DatabaseQuery getQuery(String name); 479 480 485 public DatabaseQuery getQuery(String name, Vector arguments); 486 487 492 public SessionLog getSessionLog(); 493 494 498 public Object handleException(RuntimeException exception) throws RuntimeException ; 499 500 504 public boolean hasDescriptor(Class theClass); 505 506 510 public boolean hasExceptionHandler(); 511 512 518 public boolean hasExternalTransactionController(); 519 520 524 public boolean isClientSession(); 525 526 530 public boolean isConnected(); 531 532 536 public boolean isDatabaseSession(); 537 538 542 public boolean isDistributedSession(); 543 544 548 public boolean isInProfile(); 549 550 554 public boolean isRemoteSession(); 555 556 560 public boolean isServerSession(); 561 562 566 public boolean isSessionBroker(); 567 568 572 public boolean isUnitOfWork(); 573 574 578 public boolean isRemoteUnitOfWork(); 579 580 584 public Vector keyFromObject(Object domainObject) throws ValidationException; 585 586 590 public void log(SessionLogEntry entry); 591 592 595 public void logMessage(String message); 596 597 610 public void log(int level, String category, String message); 611 612 625 public void logThrowable(int level, String category, Throwable throwable); 626 627 636 public Vector readAllObjects(Class domainClass) throws DatabaseException; 637 638 647 public Vector readAllObjects(Class domainClass, Call aCall) throws DatabaseException; 648 649 656 public Vector readAllObjects(Class domainClass, Expression selectionCriteria) throws DatabaseException; 657 658 672 public Object readObject(Class domainClass) throws DatabaseException; 673 674 683 public Object readObject(Class domainClass, Call aCall) throws DatabaseException; 684 685 692 public Object readObject(Class domainClass, Expression selectionCriteria) throws DatabaseException; 693 694 700 public Object readObject(Object object) throws DatabaseException; 701 702 709 public Object refreshObject(Object object); 710 711 716 public void release(); 717 718 722 public void removeProperty(String property); 723 724 728 public void removeQuery(String queryName); 729 730 735 public void setExceptionHandler(ExceptionHandler exceptionHandler); 736 737 740 public void setExternalTransactionController(ExternalTransactionController externalTransactionController); 741 742 746 public void setIntegrityChecker(IntegrityChecker integrityChecker); 747 748 753 public void setLog(Writer log); 754 755 760 public void setName(String name); 761 762 767 public void setProfiler(SessionProfiler profiler); 768 769 773 public void setProperty(String propertyName, Object propertyValue); 774 775 781 public void setSessionLog(SessionLog sessionLog); 782 783 787 public boolean shouldLogMessages(); 788 789 793 public int getLogLevel(String category); 794 795 799 public int getLogLevel(); 800 801 805 public void setLogLevel(int level); 806 807 811 public boolean shouldLog(int Level, String category); 812 813 817 public Object handleSevere(RuntimeException exception) throws RuntimeException ; 818 } 819 | Popular Tags |