All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avaje.ebeaninternal.server.querydefn.DefaultUpdateQuery Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy