[jOOQ/jOOQ#13640] Added QOM.JoinTable etc

This commit is contained in:
Lukas Eder 2022-11-15 15:18:37 +01:00
parent 4cf7d3844c
commit 8d110ef117
14 changed files with 1104 additions and 0 deletions

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class CrossApply
extends
JoinTable<CrossApply>
implements
QOM.CrossApply<Record>
{
CrossApply(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.CROSS_APPLY);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
CrossApply construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return new CrossApply(table1, table2);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class CrossJoin
extends
JoinTable<CrossJoin>
implements
QOM.CrossJoin<Record>
{
CrossJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.CROSS_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
CrossJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return new CrossJoin(table1, table2);
}
}

View File

@ -0,0 +1,79 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class FullJoin
extends
JoinTable<FullJoin>
implements
QOM.FullJoin<Record>
{
FullJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.FULL_OUTER_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
FullJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return o != null ? new FullJoin(table1, table2).on(o) : new FullJoin(table1, table2).using(u);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class Join
extends
JoinTable<Join>
implements
QOM.Join<Record>
{
Join(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
Join construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return o != null ? new Join(table1, table2).on(o) : new Join(table1, table2).using(u);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class LeftAntiJoin
extends
JoinTable<LeftAntiJoin>
implements
QOM.LeftAntiJoin<Record>
{
LeftAntiJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.LEFT_ANTI_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
LeftAntiJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return o != null ? new LeftAntiJoin(table1, table2).on(o) : new LeftAntiJoin(table1, table2).using(u);
}
}

View File

@ -0,0 +1,79 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class LeftJoin
extends
JoinTable<LeftJoin>
implements
QOM.LeftJoin<Record>
{
LeftJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.LEFT_OUTER_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
LeftJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return o != null ? new LeftJoin(table1, table2).on(o) : new LeftJoin(table1, table2).using(u);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class LeftSemiJoin
extends
JoinTable<LeftSemiJoin>
implements
QOM.LeftSemiJoin<Record>
{
LeftSemiJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.LEFT_SEMI_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
LeftSemiJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return o != null ? new LeftSemiJoin(table1, table2).on(o) : new LeftSemiJoin(table1, table2).using(u);
}
}

View File

@ -0,0 +1,81 @@
/*
* 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
* ASL 2.0 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 java.util.Collections.emptyList;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class NaturalFullJoin
extends
JoinTable<NaturalFullJoin>
implements
QOM.NaturalFullJoin<Record>
{
NaturalFullJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.NATURAL_FULL_OUTER_JOIN, emptyList());
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
NaturalFullJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return new NaturalFullJoin(table1, table2);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class NaturalJoin
extends
JoinTable<NaturalJoin>
implements
QOM.NaturalJoin<Record>
{
NaturalJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.NATURAL_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
NaturalJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return new NaturalJoin(table1, table2);
}
}

View File

@ -0,0 +1,81 @@
/*
* 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
* ASL 2.0 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 java.util.Collections.emptyList;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class NaturalLeftJoin
extends
JoinTable<NaturalLeftJoin>
implements
QOM.NaturalLeftJoin<Record>
{
NaturalLeftJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.NATURAL_LEFT_OUTER_JOIN, emptyList());
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
NaturalLeftJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return new NaturalLeftJoin(table1, table2);
}
}

View File

@ -0,0 +1,81 @@
/*
* 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
* ASL 2.0 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 java.util.Collections.emptyList;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class NaturalRightJoin
extends
JoinTable<NaturalRightJoin>
implements
QOM.NaturalRightJoin<Record>
{
NaturalRightJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.NATURAL_RIGHT_OUTER_JOIN, emptyList());
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
NaturalRightJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return new NaturalRightJoin(table1, table2);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class OuterApply
extends
JoinTable<OuterApply>
implements
QOM.OuterApply<Record>
{
OuterApply(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.OUTER_APPLY);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
OuterApply construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return new OuterApply(table1, table2);
}
}

View File

@ -0,0 +1,79 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class RightJoin
extends
JoinTable<RightJoin>
implements
QOM.RightJoin<Record>
{
RightJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.RIGHT_OUTER_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
RightJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
// [#6116] [#11687] TODO: Partition by clauses
return o != null ? new RightJoin(table1, table2).on(o) : new RightJoin(table1, table2).using(u);
}
}

View File

@ -0,0 +1,78 @@
/*
* 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
* ASL 2.0 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 java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.JoinType;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableLike;
/**
* @author Lukas Eder
*/
final class StraightJoin
extends
JoinTable<StraightJoin>
implements
QOM.StraightJoin<Record>
{
StraightJoin(TableLike<?> lhs, TableLike<?> rhs) {
super(lhs, rhs, JoinType.STRAIGHT_JOIN);
}
// -------------------------------------------------------------------------
// XXX: Query Object Model
// -------------------------------------------------------------------------
@Override
StraightJoin construct(
Table<?> table1,
Collection<? extends Field<?>> partitionBy1,
Collection<? extends Field<?>> partitionBy2,
Table<?> table2,
Condition o,
Collection<? extends Field<?>> u
) {
return o != null ? new StraightJoin(table1, table2).on(o) : new StraightJoin(table1, table2).using(u);
}
}