com.avaje.ebeaninternal.server.querydefn.DefaultUpdateQuery Maven / Gradle / Ivy
package com.avaje.ebeaninternal.server.querydefn;
import com.avaje.ebean.ExpressionList;
import com.avaje.ebean.UpdateQuery;
/**
* Default implementation of UpdateQuery.
*/
public class DefaultUpdateQuery implements UpdateQuery {
private final OrmUpdateProperties values = new OrmUpdateProperties();
private final DefaultOrmQuery query;
public DefaultUpdateQuery(DefaultOrmQuery query) {
this.query = query;
query.setUpdateProperties(values);
}
@Override
public UpdateQuery set(String property, Object value) {
values.set(property, value);
return this;
}
@Override
public UpdateQuery setNull(String property) {
values.set(property, null);
return this;
}
@Override
public UpdateQuery setRaw(String propertyExpression) {
values.setRaw(propertyExpression);
return this;
}
@Override
public UpdateQuery setRaw(String propertyExpression, Object... vals) {
values.setRaw(propertyExpression, vals);
return this;
}
@Override
public ExpressionList where() {
return query.where();
}
}