/** * ADVANCED: * Set the receiver's update call. * This allows the user to override the update operation. */ public void setUpdateCall(Call call) { if (call == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setCall(call); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update call. * This allows the user to override the update operation. */ public void setUpdateCall(Call call) { if (call == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setCall(call); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update call. * This allows the user to override the update operation. */ public void setUpdateCall(Call call) { if (call == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setCall(call); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }
manager.setUpdateQuery((UpdateObjectQuery)getUpdateQuery().clone());
manager.setUpdateQuery((UpdateObjectQuery)getUpdateQuery().clone());
/** * INTERNAL: * Initialize the CMPPolicy settings. */ public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException { // updateAllFields is true so set custom query in DescriptorQueryManager // to force full SQL. Don't overwrite a user defined query if (this.getUpdateAllFields() && !descriptor.getQueryManager().hasUpdateQuery()) { descriptor.getQueryManager().setUpdateQuery(new UpdateObjectQuery()); } // make sure updateAllFields is set if forceUpdate is true if (this.getForceUpdate() && !this.getUpdateAllFields()) { throw DescriptorException.updateAllFieldsNotSet(descriptor); } }
/** * INTERNAL: * Initialize the CMPPolicy settings. */ public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException { // updateAllFields is true so set custom query in DescriptorQueryManager // to force full SQL. Don't overwrite a user defined query if (this.getUpdateAllFields() && !descriptor.getQueryManager().hasUpdateQuery()) { descriptor.getQueryManager().setUpdateQuery(new UpdateObjectQuery()); } // make sure updateAllFields is set if forceUpdate is true if (this.getForceUpdate() && !this.getUpdateAllFields()) { throw DescriptorException.updateAllFieldsNotSet(descriptor); } }
/** * INTERNAL: * Initialize the CMPPolicy settings. */ public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException { // updateAllFields is true so set custom query in DescriptorQueryManager // to force full SQL. Don't overwrite a user defined query if (this.getUpdateAllFields() && !descriptor.getQueryManager().hasUpdateQuery()) { descriptor.getQueryManager().setUpdateQuery(new UpdateObjectQuery()); } // make sure updateAllFields is set if forceUpdate is true if (this.getForceUpdate() && !this.getUpdateAllFields()) { throw DescriptorException.updateAllFieldsNotSet(descriptor); } }
manager.setUpdateQuery((UpdateObjectQuery)getUpdateQuery().clone());
setUpdateQuery((UpdateObjectQuery)parentQueryManager.getUpdateQuery().clone());
setUpdateQuery((UpdateObjectQuery)parentQueryManager.getUpdateQuery().clone());
setUpdateQuery((UpdateObjectQuery)parentQueryManager.getUpdateQuery().clone());