org.ehrbase.jooq.pg.tables.StoredQuery Maven / Gradle / Ivy
The newest version!
/*
* This file is generated by jOOQ.
*/
package org.ehrbase.jooq.pg.tables;
import java.time.OffsetDateTime;
import java.util.Collection;
import org.ehrbase.jooq.pg.Ehr;
import org.ehrbase.jooq.pg.Keys;
import org.ehrbase.jooq.pg.tables.records.StoredQueryRecord;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.Stringly;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
public class StoredQuery extends TableImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of ehr.stored_query
*/
public static final StoredQuery STORED_QUERY = new StoredQuery();
/**
* The class holding records for this type
*/
@Override
public Class getRecordType() {
return StoredQueryRecord.class;
}
/**
* The column ehr.stored_query.reverse_domain_name
.
*/
public final TableField REVERSE_DOMAIN_NAME = createField(DSL.name("reverse_domain_name"), SQLDataType.VARCHAR.nullable(false), this, "");
/**
* The column ehr.stored_query.semantic_id
.
*/
public final TableField SEMANTIC_ID = createField(DSL.name("semantic_id"), SQLDataType.VARCHAR.nullable(false), this, "");
/**
* The column ehr.stored_query.semver
.
*/
public final TableField SEMVER = createField(DSL.name("semver"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field(DSL.raw("'0.0.0'::character varying"), SQLDataType.VARCHAR)), this, "");
/**
* The column ehr.stored_query.query_text
.
*/
public final TableField QUERY_TEXT = createField(DSL.name("query_text"), SQLDataType.VARCHAR.nullable(false), this, "");
/**
* The column ehr.stored_query.type
.
*/
public final TableField TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR.defaultValue(DSL.field(DSL.raw("'AQL'::character varying"), SQLDataType.VARCHAR)), this, "");
/**
* The column ehr.stored_query.creation_date
.
*/
public final TableField CREATION_DATE = createField(DSL.name("creation_date"), SQLDataType.TIMESTAMPWITHTIMEZONE(6).nullable(false), this, "");
private StoredQuery(Name alias, Table aliased) {
this(alias, aliased, (Field>[]) null, null);
}
private StoredQuery(Name alias, Table aliased, Field>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
}
/**
* Create an aliased ehr.stored_query
table reference
*/
public StoredQuery(String alias) {
this(DSL.name(alias), STORED_QUERY);
}
/**
* Create an aliased ehr.stored_query
table reference
*/
public StoredQuery(Name alias) {
this(alias, STORED_QUERY);
}
/**
* Create a ehr.stored_query
table reference
*/
public StoredQuery() {
this(DSL.name("stored_query"), null);
}
@Override
public Schema getSchema() {
return aliased() ? null : Ehr.EHR;
}
@Override
public UniqueKey getPrimaryKey() {
return Keys.STORED_QUERY_PKEY;
}
@Override
public StoredQuery as(String alias) {
return new StoredQuery(DSL.name(alias), this);
}
@Override
public StoredQuery as(Name alias) {
return new StoredQuery(alias, this);
}
@Override
public StoredQuery as(Table> alias) {
return new StoredQuery(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public StoredQuery rename(String name) {
return new StoredQuery(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public StoredQuery rename(Name name) {
return new StoredQuery(name, null);
}
/**
* Rename this table
*/
@Override
public StoredQuery rename(Table> name) {
return new StoredQuery(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery where(Condition condition) {
return new StoredQuery(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery where(Collection extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery where(Field condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public StoredQuery where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public StoredQuery where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public StoredQuery where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public StoredQuery where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery whereExists(Select> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public StoredQuery whereNotExists(Select> select) {
return where(DSL.notExists(select));
}
}