[jOOQ/jOOQ#13485] Add a QOM.UOpaque marker interface for non-traversable QueryPart types
This commit is contained in:
parent
bbb2dec695
commit
50bcf05986
@ -45,6 +45,7 @@ import org.jooq.Clause;
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.impl.QOM.UEmptyCondition;
|
||||
import org.jooq.impl.QOM.UOpaque;
|
||||
|
||||
/**
|
||||
* A base class for custom {@link Condition} implementations in client code.
|
||||
@ -59,7 +60,13 @@ import org.jooq.impl.QOM.UEmptyCondition;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public abstract class CustomCondition extends AbstractCondition implements UEmptyCondition {
|
||||
public non-sealed abstract class CustomCondition
|
||||
extends
|
||||
AbstractCondition
|
||||
implements
|
||||
UEmptyCondition,
|
||||
UOpaque
|
||||
{
|
||||
|
||||
private static final Clause[] CLAUSES = { CUSTOM };
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ import org.jooq.DataType;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.impl.QOM.UEmptyField;
|
||||
import org.jooq.impl.QOM.UOpaque;
|
||||
|
||||
/**
|
||||
* A base class for custom {@link Field} implementations in client code.
|
||||
@ -62,7 +63,13 @@ import org.jooq.impl.QOM.UEmptyField;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public abstract class CustomField<T> extends AbstractField<T> implements UEmptyField<T> {
|
||||
public non-sealed abstract class CustomField<T>
|
||||
extends
|
||||
AbstractField<T>
|
||||
implements
|
||||
UEmptyField<T>,
|
||||
UOpaque
|
||||
{
|
||||
|
||||
private static final Clause[] CLAUSES = { CUSTOM };
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ import org.jooq.Condition;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.impl.QOM.UEmpty;
|
||||
import org.jooq.impl.QOM.UOpaque;
|
||||
|
||||
/**
|
||||
* A base class for custom {@link QueryPart} implementations in client code.
|
||||
@ -72,7 +73,7 @@ import org.jooq.impl.QOM.UEmpty;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public abstract class CustomQueryPart extends AbstractQueryPart implements UEmpty {
|
||||
public non-sealed abstract class CustomQueryPart extends AbstractQueryPart implements UOpaque {
|
||||
|
||||
private static final Clause[] CLAUSES = { CUSTOM };
|
||||
|
||||
|
||||
@ -105,6 +105,13 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableRecord;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.QOM.UOpaque;
|
||||
|
||||
/**
|
||||
* A base class for custom {@link Table} implementations in client code.
|
||||
@ -74,7 +75,12 @@ import org.jooq.UniqueKey;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public abstract class CustomTable<R extends TableRecord<R>> extends TableImpl<R> {
|
||||
public non-sealed abstract class CustomTable<R extends TableRecord<R>>
|
||||
extends
|
||||
TableImpl<R>
|
||||
implements
|
||||
UOpaque
|
||||
{
|
||||
|
||||
protected CustomTable(Name name) {
|
||||
super(name);
|
||||
|
||||
@ -6265,6 +6265,24 @@ public final class QOM {
|
||||
*/
|
||||
interface UTransient extends UEmpty {}
|
||||
|
||||
/**
|
||||
* A marker interface for {@link QueryPart} implementations that are mainly
|
||||
* used to render SQL, but unlike {@link UTransient} parts, can also appear
|
||||
* in user expression trees.
|
||||
*/
|
||||
/* sealed */ interface UOpaque
|
||||
extends
|
||||
UEmpty
|
||||
/* permits
|
||||
|
||||
|
||||
|
||||
CustomField,
|
||||
CustomTable,
|
||||
CustomCondition,
|
||||
CustomQueryPart */
|
||||
{}
|
||||
|
||||
/**
|
||||
* A marker interface for {@link QueryPart} implementations whose
|
||||
* {@link QueryPart} semantics has not yet been implemented.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user