All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ehrbase.jooq.pg.tables.TemplateStore 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.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;

import org.ehrbase.jooq.pg.Ehr;
import org.ehrbase.jooq.pg.Indexes;
import org.ehrbase.jooq.pg.Keys;
import org.ehrbase.jooq.pg.tables.CompVersion.CompVersionPath;
import org.ehrbase.jooq.pg.tables.CompVersionHistory.CompVersionHistoryPath;
import org.ehrbase.jooq.pg.tables.records.TemplateStoreRecord;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Index;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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 TemplateStore extends TableImpl {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of ehr.template_store
     */
    public static final TemplateStore TEMPLATE_STORE = new TemplateStore();

    /**
     * The class holding records for this type
     */
    @Override
    public Class getRecordType() {
        return TemplateStoreRecord.class;
    }

    /**
     * The column ehr.template_store.id.
     */
    public final TableField ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column ehr.template_store.template_id.
     */
    public final TableField TEMPLATE_ID = createField(DSL.name("template_id"), SQLDataType.CLOB.nullable(false), this, "");

    /**
     * The column ehr.template_store.content.
     */
    public final TableField CONTENT = createField(DSL.name("content"), SQLDataType.CLOB, this, "");

    /**
     * The column ehr.template_store.creation_time.
     */
    public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMPWITHTIMEZONE(6).nullable(false), this, "");

    private TemplateStore(Name alias, Table aliased) {
        this(alias, aliased, (Field[]) null, null);
    }

    private TemplateStore(Name alias, Table aliased, Field[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased ehr.template_store table reference
     */
    public TemplateStore(String alias) {
        this(DSL.name(alias), TEMPLATE_STORE);
    }

    /**
     * Create an aliased ehr.template_store table reference
     */
    public TemplateStore(Name alias) {
        this(alias, TEMPLATE_STORE);
    }

    /**
     * Create a ehr.template_store table reference
     */
    public TemplateStore() {
        this(DSL.name("template_store"), null);
    }

    public  TemplateStore(Table path, ForeignKey childPath, InverseForeignKey parentPath) {
        super(path, childPath, parentPath, TEMPLATE_STORE);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class TemplateStorePath extends TemplateStore implements Path {

        private static final long serialVersionUID = 1L;
        public  TemplateStorePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) {
            super(path, childPath, parentPath);
        }
        private TemplateStorePath(Name alias, Table aliased) {
            super(alias, aliased);
        }

        @Override
        public TemplateStorePath as(String alias) {
            return new TemplateStorePath(DSL.name(alias), this);
        }

        @Override
        public TemplateStorePath as(Name alias) {
            return new TemplateStorePath(alias, this);
        }

        @Override
        public TemplateStorePath as(Table alias) {
            return new TemplateStorePath(alias.getQualifiedName(), this);
        }
    }

    @Override
    public Schema getSchema() {
        return aliased() ? null : Ehr.EHR;
    }

    @Override
    public List getIndexes() {
        return Arrays.asList(Indexes.TEMPLATE_STORE_ID_UNQ);
    }

    @Override
    public UniqueKey getPrimaryKey() {
        return Keys.TEMPLATE_STORE_PKEY;
    }

    private transient CompVersionHistoryPath _compVersionHistory;

    /**
     * Get the implicit to-many join path to the
     * ehr.comp_version_history table
     */
    public CompVersionHistoryPath compVersionHistory() {
        if (_compVersionHistory == null)
            _compVersionHistory = new CompVersionHistoryPath(this, null, Keys.COMP_VERSION_HISTORY__COMP_VERSION_HISTORY_TEMPLATE_ID_FKEY.getInverseKey());

        return _compVersionHistory;
    }

    private transient CompVersionPath _compVersion;

    /**
     * Get the implicit to-many join path to the ehr.comp_version
     * table
     */
    public CompVersionPath compVersion() {
        if (_compVersion == null)
            _compVersion = new CompVersionPath(this, null, Keys.COMP_VERSION__COMP_VERSION_TEMPLATE_ID_FKEY.getInverseKey());

        return _compVersion;
    }

    @Override
    public TemplateStore as(String alias) {
        return new TemplateStore(DSL.name(alias), this);
    }

    @Override
    public TemplateStore as(Name alias) {
        return new TemplateStore(alias, this);
    }

    @Override
    public TemplateStore as(Table alias) {
        return new TemplateStore(alias.getQualifiedName(), this);
    }

    /**
     * Rename this table
     */
    @Override
    public TemplateStore rename(String name) {
        return new TemplateStore(DSL.name(name), null);
    }

    /**
     * Rename this table
     */
    @Override
    public TemplateStore rename(Name name) {
        return new TemplateStore(name, null);
    }

    /**
     * Rename this table
     */
    @Override
    public TemplateStore rename(Table name) {
        return new TemplateStore(name.getQualifiedName(), null);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore where(Condition condition) {
        return new TemplateStore(getQualifiedName(), aliased() ? this : null, null, condition);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore where(Collection conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore where(Condition... conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore where(Field condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public TemplateStore where(SQL condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public TemplateStore where(@Stringly.SQL String condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public TemplateStore where(@Stringly.SQL String condition, Object... binds) {
        return where(DSL.condition(condition, binds));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public TemplateStore where(@Stringly.SQL String condition, QueryPart... parts) {
        return where(DSL.condition(condition, parts));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore whereExists(Select select) {
        return where(DSL.exists(select));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public TemplateStore whereNotExists(Select select) {
        return where(DSL.notExists(select));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy