io.ebeaninternal.server.querydefn.DefaultUpdateQuery Maven / Gradle / Ivy
package io.ebeaninternal.server.querydefn;
import io.ebean.ExpressionList;
import io.ebean.ProfileLocation;
import io.ebean.Query;
import io.ebean.UpdateQuery;
import io.ebean.core.type.ScalarType;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeaninternal.server.deploy.BeanProperty;
/**
* Default implementation of UpdateQuery.
*/
public final class DefaultUpdateQuery implements UpdateQuery {
private final OrmUpdateProperties values = new OrmUpdateProperties();
private final DefaultOrmQuery query;
private final BeanDescriptor descriptor;
public DefaultUpdateQuery(DefaultOrmQuery query) {
this.query = query;
this.descriptor = query.descriptor();
query.setUpdateProperties(values);
}
@Override
public UpdateQuery set(String property, Object value) {
if (value == null) {
values.setNull(property);
} else {
final BeanProperty beanProperty = descriptor.beanProperty(property);
final ScalarType
© 2015 - 2024 Weber Informatics LLC | Privacy Policy