org.jooq.impl.InsertImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payment-retries-plugin Show documentation
Show all versions of payment-retries-plugin Show documentation
Kill Bill Payment Retries plugin
The newest version!
/*
* Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* 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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
import static org.jooq.impl.Tools.EMPTY_FIELD;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.FieldLike;
import org.jooq.InsertOnConflictDoUpdateStep;
import org.jooq.InsertOnDuplicateSetMoreStep;
import org.jooq.InsertQuery;
import org.jooq.InsertResultStep;
import org.jooq.InsertSetMoreStep;
import org.jooq.InsertSetStep;
import org.jooq.InsertValuesStep1;
import org.jooq.InsertValuesStep10;
import org.jooq.InsertValuesStep11;
import org.jooq.InsertValuesStep12;
import org.jooq.InsertValuesStep13;
import org.jooq.InsertValuesStep14;
import org.jooq.InsertValuesStep15;
import org.jooq.InsertValuesStep16;
import org.jooq.InsertValuesStep17;
import org.jooq.InsertValuesStep18;
import org.jooq.InsertValuesStep19;
import org.jooq.InsertValuesStep2;
import org.jooq.InsertValuesStep20;
import org.jooq.InsertValuesStep21;
import org.jooq.InsertValuesStep22;
import org.jooq.InsertValuesStep3;
import org.jooq.InsertValuesStep4;
import org.jooq.InsertValuesStep5;
import org.jooq.InsertValuesStep6;
import org.jooq.InsertValuesStep7;
import org.jooq.InsertValuesStep8;
import org.jooq.InsertValuesStep9;
import org.jooq.InsertValuesStepN;
import org.jooq.Record;
import org.jooq.Record1;
import org.jooq.Result;
import org.jooq.Select;
import org.jooq.Table;
/**
* @author Lukas Eder
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@Generated("This class was generated using jOOQ-tools")
class InsertImpl
extends AbstractDelegatingQuery>
implements
// Cascading interface implementations for Insert behaviour
InsertValuesStep1,
InsertValuesStep2,
InsertValuesStep3,
InsertValuesStep4,
InsertValuesStep5,
InsertValuesStep6,
InsertValuesStep7,
InsertValuesStep8,
InsertValuesStep9,
InsertValuesStep10,
InsertValuesStep11,
InsertValuesStep12,
InsertValuesStep13,
InsertValuesStep14,
InsertValuesStep15,
InsertValuesStep16,
InsertValuesStep17,
InsertValuesStep18,
InsertValuesStep19,
InsertValuesStep20,
InsertValuesStep21,
InsertValuesStep22,
InsertValuesStepN,
InsertSetStep,
InsertSetMoreStep,
InsertOnDuplicateSetMoreStep,
InsertOnConflictDoUpdateStep,
InsertResultStep {
/**
* Generated UID
*/
private static final long serialVersionUID = 4222898879771679107L;
private final Table into;
private Field>[] fields;
private boolean onDuplicateKeyUpdate;
InsertImpl(Configuration configuration, WithImpl with, Table into) {
super(new InsertQueryImpl(configuration, with, into));
this.into = into;
}
InsertImpl(Configuration configuration, WithImpl with, Table into, Collection extends Field>> fields) {
this(configuration, with, into);
columns(fields);
}
// -------------------------------------------------------------------------
// The DSL API
// -------------------------------------------------------------------------
@Override
public final InsertImpl select(Select select) {
getDelegate().setSelect(fields, select);
return this;
}
@Override
public final InsertImpl values(T1 value1) {
return values(new Object[] { value1 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2) {
return values(new Object[] { value1, value2 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3) {
return values(new Object[] { value1, value2, value3 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4) {
return values(new Object[] { value1, value2, value3, value4 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5) {
return values(new Object[] { value1, value2, value3, value4, value5 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6) {
return values(new Object[] { value1, value2, value3, value4, value5, value6 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19, T20 value20) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19, value20 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19, T20 value20, T21 value21) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19, value20, value21 });
}
@Override
public final InsertImpl values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19, T20 value20, T21 value21, T22 value22) {
return values(new Object[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19, value20, value21, value22 });
}
@Override
public final InsertImpl values(Object... values) {
if (fields.length != values.length) {
throw new IllegalArgumentException("The number of values must match the number of fields");
}
getDelegate().newRecord();
for (int i = 0; i < fields.length; i++) {
addValue(getDelegate(), fields[i], values[i]);
}
return this;
}
@Override
public final InsertImpl values(Collection> values) {
return values(values.toArray());
}
private void addValue(InsertQuery delegate, Field field, Object object) {
// [#1343] Only convert non-jOOQ objects
if (object instanceof Field) {
delegate.addValue(field, (Field) object);
}
else if (object instanceof FieldLike) {
delegate.addValue(field, ((FieldLike) object).asField());
}
else {
delegate.addValue(field, field.getDataType().convert(object));
}
}
@Override
public final InsertImpl values(Field value1) {
return values(new Field[] { value1 });
}
@Override
public final InsertImpl values(Field value1, Field value2) {
return values(new Field[] { value1, value2 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3) {
return values(new Field[] { value1, value2, value3 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4) {
return values(new Field[] { value1, value2, value3, value4 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5) {
return values(new Field[] { value1, value2, value3, value4, value5 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6) {
return values(new Field[] { value1, value2, value3, value4, value5, value6 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15, Field value16) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15, Field value16, Field value17) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15, Field value16, Field value17, Field value18) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15, Field value16, Field value17, Field value18, Field value19) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field value3, Field value4, Field value5, Field value6, Field value7, Field value8, Field value9, Field value10, Field value11, Field value12, Field value13, Field value14, Field value15, Field value16, Field value17, Field value18, Field value19, Field value20) {
return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19, value20 });
}
@Override
public final InsertImpl values(Field value1, Field value2, Field