Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.0:
* -----------------------------------------------------------------------------
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq.impl;
import static org.jooq.impl.DSL.condition;
import static org.jooq.impl.DSL.exists;
import static org.jooq.impl.DSL.notExists;
import static org.jooq.impl.DSL.table;
import java.util.Collection;
import java.util.Map;
import javax.annotation.Generated;
import org.jooq.Condition;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Operator;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.Record1;
import org.jooq.Record10;
import org.jooq.Record11;
import org.jooq.Record12;
import org.jooq.Record13;
import org.jooq.Record14;
import org.jooq.Record15;
import org.jooq.Record16;
import org.jooq.Record17;
import org.jooq.Record18;
import org.jooq.Record19;
import org.jooq.Record2;
import org.jooq.Record20;
import org.jooq.Record21;
import org.jooq.Record22;
import org.jooq.Record3;
import org.jooq.Record4;
import org.jooq.Record5;
import org.jooq.Record6;
import org.jooq.Record7;
import org.jooq.Record8;
import org.jooq.Record9;
import org.jooq.Result;
import org.jooq.Row1;
import org.jooq.Row10;
import org.jooq.Row11;
import org.jooq.Row12;
import org.jooq.Row13;
import org.jooq.Row14;
import org.jooq.Row15;
import org.jooq.Row16;
import org.jooq.Row17;
import org.jooq.Row18;
import org.jooq.Row19;
import org.jooq.Row2;
import org.jooq.Row20;
import org.jooq.Row21;
import org.jooq.Row22;
import org.jooq.Row3;
import org.jooq.Row4;
import org.jooq.Row5;
import org.jooq.Row6;
import org.jooq.Row7;
import org.jooq.Row8;
import org.jooq.Row9;
import org.jooq.Select;
import org.jooq.Table;
import org.jooq.TableLike;
import org.jooq.UpdateConditionStep;
import org.jooq.UpdateFromStep;
import org.jooq.UpdateQuery;
import org.jooq.UpdateResultStep;
import org.jooq.UpdateSetFirstStep;
import org.jooq.UpdateSetMoreStep;
import org.jooq.UpdateWhereStep;
/**
* A wrapper for an {@link UpdateQuery}
*
* @author Lukas Eder
*/
final class UpdateImpl
extends AbstractDelegatingQuery>
implements
// Cascading interface implementations for Update behaviour
UpdateSetFirstStep,
UpdateSetMoreStep,
UpdateConditionStep,
UpdateResultStep {
/**
* Generated UID
*/
private static final long serialVersionUID = -2444876472650065331L;
UpdateImpl(Configuration configuration, Table table) {
super(new UpdateQueryImpl(configuration, table));
}
@Override
public final UpdateImpl set(Field field, T value) {
getDelegate().addValue(field, value);
return this;
}
@Override
public final UpdateImpl set(Field field, Field value) {
getDelegate().addValue(field, value);
return this;
}
@Override
public final UpdateImpl set(Field field, Select extends Record1> value) {
return set(field, value.asField());
}
@Override
public final UpdateImpl set(Map extends Field>, ?> map) {
getDelegate().addValues(map);
return this;
}
@Override
public final UpdateImpl set(Record record) {
return set(Utils.map(record));
}
// [jooq-tools] START [set]
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row1 row, Row1 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row2 row, Row2 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row3 row, Row3 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row4 row, Row4 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row5 row, Row5 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row6 row, Row6 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row7 row, Row7 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row8 row, Row8 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row9 row, Row9 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row10 row, Row10 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row11 row, Row11 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row12 row, Row12 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row13 row, Row13 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row14 row, Row14 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row15 row, Row15 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row16 row, Row16 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row17 row, Row17 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row18 row, Row18 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row19 row, Row19 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row20 row, Row20 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row21 row, Row21 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row22 row, Row22 value) {
getDelegate().addValues(row, value);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row1 row, Select extends Record1> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row2 row, Select extends Record2> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row3 row, Select extends Record3> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row4 row, Select extends Record4> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row5 row, Select extends Record5> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row6 row, Select extends Record6> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row7 row, Select extends Record7> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row8 row, Select extends Record8> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row9 row, Select extends Record9> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row10 row, Select extends Record10> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row11 row, Select extends Record11> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row12 row, Select extends Record12> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row13 row, Select extends Record13> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row14 row, Select extends Record14> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row15 row, Select extends Record15> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row16 row, Select extends Record16> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row17 row, Select extends Record17> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row18 row, Select extends Record18> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row19 row, Select extends Record19> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row20 row, Select extends Record20> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row21 row, Select extends Record21> select) {
getDelegate().addValues(row, select);
return this;
}
@Generated("This method was generated using jOOQ-tools")
@Override
public final UpdateFromStep set(Row22 row, Select extends Record22> select) {
getDelegate().addValues(row, select);
return this;
}
// [jooq-tools] END [set]
@Override
public final UpdateWhereStep from(TableLike> table) {
getDelegate().addFrom(table);
return this;
}
@Override
public final UpdateWhereStep from(TableLike>... tables) {
getDelegate().addFrom(tables);
return this;
}
@Override
public final UpdateWhereStep from(Collection extends TableLike>> tables) {
getDelegate().addFrom(tables);
return this;
}
@Override
public final UpdateWhereStep from(String sql) {
return from(table(sql));
}
@Override
public final UpdateWhereStep from(String sql, Object... bindings) {
return from(table(sql, bindings));
}
@Override
public final UpdateWhereStep from(String sql, QueryPart... parts) {
return from(table(sql, parts));
}
@Override
public final UpdateImpl where(Condition... conditions) {
getDelegate().addConditions(conditions);
return this;
}
@Override
public final UpdateImpl where(Collection extends Condition> conditions) {
getDelegate().addConditions(conditions);
return this;
}
@Override
public final UpdateImpl where(Field condition) {
return where(condition(condition));
}
@Override
public final UpdateImpl where(String sql) {
return where(condition(sql));
}
@Override
public final UpdateImpl where(String sql, Object... bindings) {
return where(condition(sql, bindings));
}
@Override
public final UpdateImpl where(String sql, QueryPart... parts) {
return where(condition(sql, parts));
}
@Override
public final UpdateImpl whereExists(Select> select) {
return andExists(select);
}
@Override
public final UpdateImpl whereNotExists(Select> select) {
return andNotExists(select);
}
@Override
public final UpdateImpl and(Condition condition) {
getDelegate().addConditions(condition);
return this;
}
@Override
public final UpdateImpl and(Field condition) {
return and(condition(condition));
}
@Override
public final UpdateImpl and(String sql) {
return and(condition(sql));
}
@Override
public final UpdateImpl and(String sql, Object... bindings) {
return and(condition(sql, bindings));
}
@Override
public final UpdateImpl and(String sql, QueryPart... parts) {
return and(condition(sql, parts));
}
@Override
public final UpdateImpl andNot(Condition condition) {
return and(condition.not());
}
@Override
public final UpdateImpl andNot(Field condition) {
return andNot(condition(condition));
}
@Override
public final UpdateImpl andExists(Select> select) {
return and(exists(select));
}
@Override
public final UpdateImpl andNotExists(Select> select) {
return and(notExists(select));
}
@Override
public final UpdateImpl or(Condition condition) {
getDelegate().addConditions(Operator.OR, condition);
return this;
}
@Override
public final UpdateImpl or(Field condition) {
return or(condition(condition));
}
@Override
public final UpdateImpl or(String sql) {
return or(condition(sql));
}
@Override
public final UpdateImpl or(String sql, Object... bindings) {
return or(condition(sql, bindings));
}
@Override
public final UpdateImpl or(String sql, QueryPart... parts) {
return or(condition(sql, parts));
}
@Override
public final UpdateImpl orNot(Condition condition) {
return or(condition.not());
}
@Override
public final UpdateImpl orNot(Field condition) {
return orNot(condition(condition));
}
@Override
public final UpdateImpl orExists(Select> select) {
return or(exists(select));
}
@Override
public final UpdateImpl orNotExists(Select> select) {
return or(notExists(select));
}
@Override
public final UpdateImpl returning() {
getDelegate().setReturning();
return this;
}
@Override
public final UpdateImpl returning(Field>... f) {
getDelegate().setReturning(f);
return this;
}
@Override
public final UpdateImpl returning(Collection extends Field>> f) {
getDelegate().setReturning(f);
return this;
}
@Override
public final Result fetch() {
getDelegate().execute();
return getDelegate().getReturnedRecords();
}
@Override
public final R fetchOne() {
getDelegate().execute();
return getDelegate().getReturnedRecord();
}
}