1 21 package oracle.toplink.essentials.sessions; 23 24 import java.util.*; 25 import oracle.toplink.essentials.exceptions.*; 26 import oracle.toplink.essentials.descriptors.ClassDescriptor; 27 import oracle.toplink.essentials.platform.server.ServerPlatform; 28 import oracle.toplink.essentials.sequencing.SequencingControl; 29 30 36 public interface DatabaseSession extends Session { 37 38 49 public void addDescriptor(ClassDescriptor descriptor); 50 51 58 public void addDescriptors(Vector descriptors); 59 60 66 public void addDescriptors(oracle.toplink.essentials.sessions.Project project); 67 68 80 public void beginTransaction() throws DatabaseException; 81 82 94 public void commitTransaction() throws DatabaseException; 95 96 107 public void deleteAllObjects(Collection domainObjects); 108 109 120 public void deleteAllObjects(Vector domainObjects); 121 122 129 public Object deleteObject(Object domainObject) throws DatabaseException, OptimisticLockException; 130 131 141 public Object insertObject(Object domainObject) throws DatabaseException; 142 143 148 public boolean isInTransaction(); 149 150 169 public void setServerPlatform(ServerPlatform newServerPlatform); 170 171 188 public ServerPlatform getServerPlatform(); 189 190 195 public SequencingControl getSequencingControl(); 196 197 204 public void login() throws DatabaseException; 205 206 214 public void login(String userName, String password) throws DatabaseException; 215 216 223 public void login(Login login) throws DatabaseException; 224 225 233 public void logout() throws DatabaseException; 234 235 243 public Object refreshAndLockObject(Object object); 244 245 251 public Object refreshAndLockObject(Object object, short lockMode); 252 253 264 public void rollbackTransaction() throws DatabaseException; 265 266 273 public void setExternalTransactionController(ExternalTransactionController etc); 274 275 279 public void setLogin(Login login); 280 281 285 public void setDatasourceLogin(Login login); 286 287 297 public Object updateObject(Object domainObject) throws DatabaseException, OptimisticLockException; 298 299 310 public void writeAllObjects(Collection domainObjects); 311 312 323 public void writeAllObjects(Vector domainObjects); 324 325 336 public Object writeObject(Object domainObject) throws DatabaseException, OptimisticLockException; 337 } 338 | Popular Tags |