/** * Return true if this update has the same logical set clause. */ public boolean isSameByPlan(OrmUpdateProperties that) { return that.values.size() == values.size() && logicalSetClause().equals(that.logicalSetClause()); }
@Override public UpdateQuery<T> setNull(String property) { values.set(property, null); return this; }
@Override public UpdateQuery<T> setRaw(String propertyExpression, Object... vals) { values.setRaw(propertyExpression, vals); return this; }
private void buildUpdateClause(boolean buildSql, DeployParser deployParser) { if (buildSql) { OrmUpdateProperties updateProperties = query.getUpdateProperties(); if (updateProperties != null) { dbUpdateClause = updateProperties.buildSetClause(deployParser); } } }
if (where != null ? !where.isSameByPlan(that.where) : that.where != null) return false; if (having != null ? !having.isSameByPlan(that.having) : that.having != null) return false; if (updateProperties != null ? !updateProperties.isSameByPlan(that.updateProperties) : that.updateProperties != null) return false; if (rawSqlKey != null ? !rawSqlKey.equals(that.rawSqlKey) : that.rawSqlKey != null) return false;
if (updateProperties != null) { updateProperties.bind(binder, dataBind);
updateProperties.buildQueryPlanHash(builder);
@Override public UpdateQuery<T> setRaw(String propertyExpression) { values.setRaw(propertyExpression); return this; }
@Override public UpdateQuery<T> set(String property, Object value) { values.set(property, value); return this; }
/** * Set a raw expression with many bind values. */ void setRaw(String propertyExpression, Object... vals) { if (vals.length == 0) { setRaw(propertyExpression); } else { values.put(propertyExpression, new RawArrayValue(vals)); } }