Please wait. This can take some minutes ...
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.
org.jooq.impl.RowImpl6 Maven / Gradle / Ivy
/*
* 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
*
* https://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
* Apache-2.0 license and offer limited warranties, support, maintenance, and
* commercial database integrations.
*
* For more information, please visit: https://www.jooq.org/legal/licensing
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
import static org.jooq.impl.DSL.row;
import java.util.Arrays;
import java.util.Collection;
import org.jooq.BetweenAndStep6;
import org.jooq.Comparator;
import org.jooq.Condition;
import org.jooq.DataType;
import org.jooq.Field;
import org.jooq.Function6;
import org.jooq.QuantifiedSelect;
import org.jooq.Record;
import org.jooq.Record6;
import org.jooq.Records;
import org.jooq.Result;
import org.jooq.Row;
import org.jooq.Row6;
import org.jooq.Select;
import org.jooq.SelectField;
import org.jooq.Statement;
import org.jetbrains.annotations.NotNull;
/**
* @author Lukas Eder
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
final class RowImpl6
extends
AbstractRow>
implements
Row6 {
RowImpl6(SelectField field1, SelectField field2, SelectField field3, SelectField field4, SelectField field5, SelectField field6) {
super(field1, field2, field3, field4, field5, field6);
}
RowImpl6(FieldsImpl> fields) {
super((FieldsImpl) fields);
}
// ------------------------------------------------------------------------
// Mapping convenience methods
// ------------------------------------------------------------------------
@Override
public final SelectField mapping(Function6 super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends U> function) {
return convertFrom(r -> r == null ? null : function.apply(r.value1(), r.value2(), r.value3(), r.value4(), r.value5(), r.value6()));
}
@Override
public final SelectField mapping(Class uType, Function6 super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends U> function) {
return convertFrom(uType, r -> r == null ? null : function.apply(r.value1(), r.value2(), r.value3(), r.value4(), r.value5(), r.value6()));
}
// ------------------------------------------------------------------------
// XXX: Row accessor API
// ------------------------------------------------------------------------
@Override
public final Field field1() {
return (@NotNull Field) fields.field(0);
}
@Override
public final Field field2() {
return (@NotNull Field) fields.field(1);
}
@Override
public final Field field3() {
return (@NotNull Field) fields.field(2);
}
@Override
public final Field field4() {
return (@NotNull Field) fields.field(3);
}
@Override
public final Field field5() {
return (@NotNull Field) fields.field(4);
}
@Override
public final Field field6() {
return (@NotNull Field) fields.field(5);
}
// ------------------------------------------------------------------------
// Generic comparison predicates
// ------------------------------------------------------------------------
@Override
public final Condition compare(Comparator comparator, Row6 row) {
return compare(this, comparator, row);
}
@Override
public final Condition compare(Comparator comparator, Record6 record) {
return compare(this, comparator, record.valuesRow());
}
@Override
public final Condition compare(Comparator comparator, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(comparator, row(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5))));
}
@Override
public final Condition compare(Comparator comparator, Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(comparator, row(Tools.nullSafe(t1, dataType(0)), Tools.nullSafe(t2, dataType(1)), Tools.nullSafe(t3, dataType(2)), Tools.nullSafe(t4, dataType(3)), Tools.nullSafe(t5, dataType(4)), Tools.nullSafe(t6, dataType(5))));
}
@Override
public final Condition compare(Comparator comparator, Select extends Record6> select) {
return new RowSubqueryCondition(this, select, comparator);
}
@Override
public final Condition compare(Comparator comparator, QuantifiedSelect extends Record6> select) {
return new RowSubqueryCondition(this, select, comparator);
}
// ------------------------------------------------------------------------
// Equal / Not equal comparison predicates
// ------------------------------------------------------------------------
@Override
public final Condition equal(Row6 row) {
return compare(Comparator.EQUALS, row);
}
@Override
public final Condition equal(Record6 record) {
return compare(Comparator.EQUALS, record);
}
@Override
public final Condition equal(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.EQUALS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition equal(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.EQUALS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition eq(Row6 row) {
return equal(row);
}
@Override
public final Condition eq(Record6 record) {
return equal(record);
}
@Override
public final Condition eq(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return equal(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition eq(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return equal(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition notEqual(Row6 row) {
return compare(Comparator.NOT_EQUALS, row);
}
@Override
public final Condition notEqual(Record6 record) {
return compare(Comparator.NOT_EQUALS, record);
}
@Override
public final Condition notEqual(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.NOT_EQUALS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition notEqual(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.NOT_EQUALS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition ne(Row6 row) {
return notEqual(row);
}
@Override
public final Condition ne(Record6 record) {
return notEqual(record);
}
@Override
public final Condition ne(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return notEqual(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition ne(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return notEqual(t1, t2, t3, t4, t5, t6);
}
// ------------------------------------------------------------------------
// Ordering comparison predicates
// ------------------------------------------------------------------------
@Override
public final Condition lessThan(Row6 row) {
return compare(Comparator.LESS, row);
}
@Override
public final Condition lessThan(Record6 record) {
return compare(Comparator.LESS, record);
}
@Override
public final Condition lessThan(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.LESS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition lessThan(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.LESS, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition lt(Row6 row) {
return lessThan(row);
}
@Override
public final Condition lt(Record6 record) {
return lessThan(record);
}
@Override
public final Condition lt(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return lessThan(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition lt(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return lessThan(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition lessOrEqual(Row6 row) {
return compare(Comparator.LESS_OR_EQUAL, row);
}
@Override
public final Condition lessOrEqual(Record6 record) {
return compare(Comparator.LESS_OR_EQUAL, record);
}
@Override
public final Condition lessOrEqual(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.LESS_OR_EQUAL, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition lessOrEqual(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.LESS_OR_EQUAL, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition le(Row6 row) {
return lessOrEqual(row);
}
@Override
public final Condition le(Record6 record) {
return lessOrEqual(record);
}
@Override
public final Condition le(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return lessOrEqual(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition le(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return lessOrEqual(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition greaterThan(Row6 row) {
return compare(Comparator.GREATER, row);
}
@Override
public final Condition greaterThan(Record6 record) {
return compare(Comparator.GREATER, record);
}
@Override
public final Condition greaterThan(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.GREATER, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition greaterThan(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.GREATER, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition gt(Row6 row) {
return greaterThan(row);
}
@Override
public final Condition gt(Record6 record) {
return greaterThan(record);
}
@Override
public final Condition gt(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return greaterThan(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition gt(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return greaterThan(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition greaterOrEqual(Row6 row) {
return compare(Comparator.GREATER_OR_EQUAL, row);
}
@Override
public final Condition greaterOrEqual(Record6 record) {
return compare(Comparator.GREATER_OR_EQUAL, record);
}
@Override
public final Condition greaterOrEqual(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return compare(Comparator.GREATER_OR_EQUAL, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition greaterOrEqual(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return compare(Comparator.GREATER_OR_EQUAL, t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition ge(Row6 row) {
return greaterOrEqual(row);
}
@Override
public final Condition ge(Record6 record) {
return greaterOrEqual(record);
}
@Override
public final Condition ge(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return greaterOrEqual(t1, t2, t3, t4, t5, t6);
}
@Override
public final Condition ge(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return greaterOrEqual(t1, t2, t3, t4, t5, t6);
}
// ------------------------------------------------------------------------
// [NOT] BETWEEN predicates
// ------------------------------------------------------------------------
@Override
public final BetweenAndStep6 between(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return between(row(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5))));
}
@Override
public final BetweenAndStep6 between(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return between(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final BetweenAndStep6 between(Row6 row) {
return new RowBetweenCondition<>(this, row, false, false);
}
@Override
public final BetweenAndStep6 between(Record6 record) {
return between(record.valuesRow());
}
@Override
public final Condition between(Row6 minValue, Row6 maxValue) {
return between(minValue).and(maxValue);
}
@Override
public final Condition between(Record6 minValue, Record6 maxValue) {
return between(minValue).and(maxValue);
}
@Override
public final BetweenAndStep6 betweenSymmetric(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return betweenSymmetric(row(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5))));
}
@Override
public final BetweenAndStep6 betweenSymmetric(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return betweenSymmetric(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final BetweenAndStep6 betweenSymmetric(Row6 row) {
return new RowBetweenCondition<>(this, row, false, true);
}
@Override
public final BetweenAndStep6 betweenSymmetric(Record6 record) {
return betweenSymmetric(record.valuesRow());
}
@Override
public final Condition betweenSymmetric(Row6 minValue, Row6 maxValue) {
return betweenSymmetric(minValue).and(maxValue);
}
@Override
public final Condition betweenSymmetric(Record6 minValue, Record6 maxValue) {
return betweenSymmetric(minValue).and(maxValue);
}
@Override
public final BetweenAndStep6 notBetween(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return notBetween(row(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5))));
}
@Override
public final BetweenAndStep6 notBetween(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return notBetween(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final BetweenAndStep6 notBetween(Row6 row) {
return new RowBetweenCondition<>(this, row, true, false);
}
@Override
public final BetweenAndStep6 notBetween(Record6 record) {
return notBetween(record.valuesRow());
}
@Override
public final Condition notBetween(Row6 minValue, Row6 maxValue) {
return notBetween(minValue).and(maxValue);
}
@Override
public final Condition notBetween(Record6 minValue, Record6 maxValue) {
return notBetween(minValue).and(maxValue);
}
@Override
public final BetweenAndStep6 notBetweenSymmetric(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return notBetweenSymmetric(row(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5))));
}
@Override
public final BetweenAndStep6 notBetweenSymmetric(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return notBetweenSymmetric(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final BetweenAndStep6 notBetweenSymmetric(Row6 row) {
return new RowBetweenCondition<>(this, row, true, true);
}
@Override
public final BetweenAndStep6 notBetweenSymmetric(Record6 record) {
return notBetweenSymmetric(record.valuesRow());
}
@Override
public final Condition notBetweenSymmetric(Row6 minValue, Row6 maxValue) {
return notBetweenSymmetric(minValue).and(maxValue);
}
@Override
public final Condition notBetweenSymmetric(Record6 minValue, Record6 maxValue) {
return notBetweenSymmetric(minValue).and(maxValue);
}
// ------------------------------------------------------------------------
// [NOT] DISTINCT predicates
// ------------------------------------------------------------------------
@Override
public final Condition isNotDistinctFrom(Row6 row) {
return new RowIsDistinctFrom(this, row, true);
}
@Override
public final Condition isNotDistinctFrom(Record6 record) {
return isNotDistinctFrom(record.valuesRow());
}
@Override
public final Condition isNotDistinctFrom(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return isNotDistinctFrom(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5)));
}
@Override
public final Condition isNotDistinctFrom(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return isNotDistinctFrom(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final Condition isNotDistinctFrom(Select extends Record6> select) {
return new RowIsDistinctFrom(this, select, true);
}
@Override
public final Condition isDistinctFrom(Row6 row) {
return new RowIsDistinctFrom(this, row, false);
}
@Override
public final Condition isDistinctFrom(Record6 record) {
return isDistinctFrom(record.valuesRow());
}
@Override
public final Condition isDistinctFrom(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {
return isDistinctFrom(Tools.field(t1, (DataType) dataType(0)), Tools.field(t2, (DataType) dataType(1)), Tools.field(t3, (DataType) dataType(2)), Tools.field(t4, (DataType) dataType(3)), Tools.field(t5, (DataType) dataType(4)), Tools.field(t6, (DataType) dataType(5)));
}
@Override
public final Condition isDistinctFrom(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) {
return isDistinctFrom(row(t1, t2, t3, t4, t5, t6));
}
@Override
public final Condition isDistinctFrom(Select extends Record6> select) {
return new RowIsDistinctFrom(this, select, false);
}
// ------------------------------------------------------------------------
// [NOT] IN predicates
// ------------------------------------------------------------------------
@Override
public final Condition in(Row6... rows) {
return in(Arrays.asList(rows));
}
@Override
public final Condition in(Record6... records) {
QueryPartList rows = new QueryPartList<>();
for (Record record : records)
rows.add(record.valuesRow());
return new RowInCondition(this, rows, false);
}
@Override
public final Condition notIn(Row6... rows) {
return notIn(Arrays.asList(rows));
}
@Override
public final Condition notIn(Record6... records) {
QueryPartList rows = new QueryPartList<>();
for (Record record : records)
rows.add(record.valuesRow());
return new RowInCondition(this, rows, true);
}
@Override
public final Condition in(Collection extends Row6> rows) {
return new RowInCondition(this, new QueryPartList(rows), false);
}
@Override
public final Condition in(Result extends Record6> result) {
return new RowInCondition(this, new QueryPartList(Tools.rows(result)), false);
}
@Override
public final Condition notIn(Collection extends Row6> rows) {
return new RowInCondition(this, new QueryPartList(rows), true);
}
@Override
public final Condition notIn(Result extends Record6> result) {
return new RowInCondition(this, new QueryPartList(Tools.rows(result)), true);
}
// ------------------------------------------------------------------------
// Predicates involving subqueries
// ------------------------------------------------------------------------
@Override
public final Condition equal(Select extends Record6> select) {
return compare(Comparator.EQUALS, select);
}
@Override
public final Condition equal(QuantifiedSelect extends Record6> select) {
return compare(Comparator.EQUALS, select);
}
@Override
public final Condition eq(Select extends Record6> select) {
return equal(select);
}
@Override
public final Condition eq(QuantifiedSelect extends Record6> select) {
return equal(select);
}
@Override
public final Condition notEqual(Select extends Record6> select) {
return compare(Comparator.NOT_EQUALS, select);
}
@Override
public final Condition notEqual(QuantifiedSelect extends Record6> select) {
return compare(Comparator.NOT_EQUALS, select);
}
@Override
public final Condition ne(Select extends Record6> select) {
return notEqual(select);
}
@Override
public final Condition ne(QuantifiedSelect extends Record6> select) {
return notEqual(select);
}
@Override
public final Condition greaterThan(Select extends Record6> select) {
return compare(Comparator.GREATER, select);
}
@Override
public final Condition greaterThan(QuantifiedSelect extends Record6> select) {
return compare(Comparator.GREATER, select);
}
@Override
public final Condition gt(Select extends Record6> select) {
return greaterThan(select);
}
@Override
public final Condition gt(QuantifiedSelect extends Record6> select) {
return greaterThan(select);
}
@Override
public final Condition greaterOrEqual(Select extends Record6> select) {
return compare(Comparator.GREATER_OR_EQUAL, select);
}
@Override
public final Condition greaterOrEqual(QuantifiedSelect extends Record6> select) {
return compare(Comparator.GREATER_OR_EQUAL, select);
}
@Override
public final Condition ge(Select extends Record6> select) {
return greaterOrEqual(select);
}
@Override
public final Condition ge(QuantifiedSelect extends Record6> select) {
return greaterOrEqual(select);
}
@Override
public final Condition lessThan(Select extends Record6> select) {
return compare(Comparator.LESS, select);
}
@Override
public final Condition lessThan(QuantifiedSelect extends Record6