/** * INTERNAL: * Prepare the receiver for execution in a session. */ protected void prepare() { super.prepare(); getQueryMechanism().prepareUpdateObject(); }
/** * INTERNAL: * Prepare the receiver for execution in a session. */ protected void prepare() { super.prepare(); if (this.name == null) { this.name = "update" + this.descriptor.getJavaClass().getSimpleName(); } getQueryMechanism().prepareUpdateObject(); }
/** * INTERNAL: * Prepare the receiver for execution in a session. */ protected void prepare() { super.prepare(); if (this.name == null) { this.name = "update" + this.descriptor.getJavaClass().getSimpleName(); } getQueryMechanism().prepareUpdateObject(); }
/** * INTERNAL: * Perform an update. */ public void executeCommit() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirectorForQuery(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWrite(); }
/** * INTERNAL: * Perform an update. */ public void executeCommit() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirectorForQuery(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWrite(); }
/** * INTERNAL: * Perform an update. */ public void executeCommitWithChangeSet() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirectorForQuery(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWriteWithChangeSet(); }
/** * INTERNAL: * Perform an update. */ public void executeCommitWithChangeSet() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirectorForQuery(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWriteWithChangeSet(); }
/** * INTERNAL: * Perform an update. */ public void executeCommit() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirector(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWrite(); }
/** * INTERNAL: * Perform an update. */ public void executeCommitWithChangeSet() throws DatabaseException, OptimisticLockException { // Check for redirection. QueryRedirector localRedirector = getRedirector(); // refactored redirection for bug 3241138 if ( localRedirector!= null) { redirectQuery(localRedirector, this, session, translationRow); return; } getQueryMechanism().updateObjectForWriteWithChangeSet(); }
/** * Update the foreign key fields when resolving a bi-directional reference in a UOW. * This is rare to occur for non-relational, however if it does each of the calls must be re-executed. */ protected void updateForeignKeyFieldAfterInsert(WriteObjectQuery writeQuery) { writeQuery.setModifyRow(this.getDescriptor().getObjectBuilder().buildRow(writeQuery.getObject(), this.getSession(), WriteType.INSERT)); // For CR 2923 must move to session we will execute call on now // so correct DatasourcePlatform used by translate. AbstractSession sessionToUse = this.query.getExecutionSession(); // yes - this is a bit ugly... Vector calls = ((DatasourceCallQueryMechanism)this.getDescriptor().getQueryManager().getUpdateQuery().getQueryMechanism()).getCalls(); for (Enumeration stream = calls.elements(); stream.hasMoreElements();) { DatasourceCall call = (DatasourceCall)((DatasourceCall)stream.nextElement()).clone(); call.setQuery(writeQuery); sessionToUse.executeCall(call, this.getTranslationRow(), writeQuery); } } }
/** * Update the foreign key fields when resolving a bi-directional reference in a UOW. * This is rare to occur for non-relational, however if it does each of the calls must be re-executed. */ protected void updateForeignKeyFieldAfterInsert(WriteObjectQuery writeQuery) { writeQuery.setModifyRow(this.getDescriptor().getObjectBuilder().buildRow(writeQuery.getObject(), this.getSession(), WriteType.INSERT)); // For CR 2923 must move to session we will execute call on now // so correct DatasourcePlatform used by translate. AbstractSession sessionToUse = this.query.getExecutionSession(); // yes - this is a bit ugly... Vector calls = ((DatasourceCallQueryMechanism)this.getDescriptor().getQueryManager().getUpdateQuery().getQueryMechanism()).getCalls(); for (Enumeration stream = calls.elements(); stream.hasMoreElements();) { DatasourceCall call = (DatasourceCall)((DatasourceCall)stream.nextElement()).clone(); call.setQuery(writeQuery); sessionToUse.executeCall(call, this.getTranslationRow(), writeQuery); } } }
/** * Update the foreign key fields when resolving a bi-directonal reference in a UOW. * This is rare to occur for non-relational, however if it does each of the calls must be re-executed. */ protected void updateForeignKeyFieldAfterInsert(WriteObjectQuery writeQuery) { writeQuery.setModifyRow(this.getDescriptor().getObjectBuilder().buildRow(writeQuery.getObject(), this.getSession())); // For CR 2923 must move to session we will execute call on now // so correct DatasourcePlatform used by translate. AbstractSession sessionToUse = this.query.getExecutionSession(); // yes - this is a bit ugly... Vector calls = ((DatasourceCallQueryMechanism)this.getDescriptor().getQueryManager().getUpdateQuery().getQueryMechanism()).getCalls(); for (Enumeration stream = calls.elements(); stream.hasMoreElements();) { DatasourceCall call = (DatasourceCall)((DatasourceCall)stream.nextElement()).clone(); call.setQuery(writeQuery); sessionToUse.executeCall(call, this.getTranslationRow(), writeQuery); } } }