1 21 package oracle.toplink.essentials.queryframework; 23 24 import oracle.toplink.essentials.exceptions.*; 25 26 35 public class UpdateObjectQuery extends WriteObjectQuery { 36 37 41 public UpdateObjectQuery() { 42 super(); 43 } 44 45 49 public UpdateObjectQuery(Object objectToUpdate) { 50 this(); 51 setObject(objectToUpdate); 52 } 53 54 58 public UpdateObjectQuery(Call call) { 59 this(); 60 setCall(call); 61 } 62 63 67 public void executeCommit() throws DatabaseException, OptimisticLockException { 68 getQueryMechanism().updateObjectForWrite(); 69 } 70 71 75 public void executeCommitWithChangeSet() throws DatabaseException, OptimisticLockException { 76 getQueryMechanism().updateObjectForWriteWithChangeSet(); 77 } 78 79 83 protected void prepare() { 84 super.prepare(); 85 86 getQueryMechanism().prepareUpdateObject(); 87 } 88 89 93 public boolean isUpdateObjectQuery() { 94 return true; 95 } 96 } 97 | Popular Tags |