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

org.ehrbase.jooq.pg.tables.CompVersion 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.AuditDetails.AuditDetailsPath;
import org.ehrbase.jooq.pg.tables.CompData.CompDataPath;
import org.ehrbase.jooq.pg.tables.Contribution.ContributionPath;
import org.ehrbase.jooq.pg.tables.Ehr.EhrPath;
import org.ehrbase.jooq.pg.tables.TemplateStore.TemplateStorePath;
import org.ehrbase.jooq.pg.tables.records.CompVersionRecord;
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 CompVersion extends TableImpl {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of ehr.comp_version
     */
    public static final CompVersion COMP_VERSION = new CompVersion();

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

    /**
     * The column ehr.comp_version.vo_id.
     */
    public final TableField VO_ID = createField(DSL.name("vo_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column ehr.comp_version.ehr_id.
     */
    public final TableField EHR_ID = createField(DSL.name("ehr_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column ehr.comp_version.contribution_id.
     */
    public final TableField CONTRIBUTION_ID = createField(DSL.name("contribution_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column ehr.comp_version.audit_id.
     */
    public final TableField AUDIT_ID = createField(DSL.name("audit_id"), SQLDataType.UUID.nullable(false), this, "");

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

    /**
     * The column ehr.comp_version.sys_version.
     */
    public final TableField SYS_VERSION = createField(DSL.name("sys_version"), SQLDataType.INTEGER.nullable(false), this, "");

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

    /**
     * The column ehr.comp_version.root_concept.
     */
    public final TableField ROOT_CONCEPT = createField(DSL.name("root_concept"), SQLDataType.CLOB.nullable(false), this, "");

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

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

    /**
     * Create an aliased ehr.comp_version table reference
     */
    public CompVersion(String alias) {
        this(DSL.name(alias), COMP_VERSION);
    }

    /**
     * Create an aliased ehr.comp_version table reference
     */
    public CompVersion(Name alias) {
        this(alias, COMP_VERSION);
    }

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

    public  CompVersion(Table path, ForeignKey childPath, InverseForeignKey parentPath) {
        super(path, childPath, parentPath, COMP_VERSION);
    }

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

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

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

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

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

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

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

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

    @Override
    public List> getReferences() {
        return Arrays.asList(Keys.COMP_VERSION__COMP_VERSION_AUDIT_ID_FKEY, Keys.COMP_VERSION__COMP_VERSION_CONTRIBUTION_ID_FKEY, Keys.COMP_VERSION__COMP_VERSION_EHR_ID_FKEY, Keys.COMP_VERSION__COMP_VERSION_TEMPLATE_ID_FKEY);
    }

    private transient AuditDetailsPath _auditDetails;

    /**
     * Get the implicit join path to the ehr.audit_details table.
     */
    public AuditDetailsPath auditDetails() {
        if (_auditDetails == null)
            _auditDetails = new AuditDetailsPath(this, Keys.COMP_VERSION__COMP_VERSION_AUDIT_ID_FKEY, null);

        return _auditDetails;
    }

    private transient ContributionPath _contribution;

    /**
     * Get the implicit join path to the ehr.contribution table.
     */
    public ContributionPath contribution() {
        if (_contribution == null)
            _contribution = new ContributionPath(this, Keys.COMP_VERSION__COMP_VERSION_CONTRIBUTION_ID_FKEY, null);

        return _contribution;
    }

    private transient EhrPath _ehr;

    /**
     * Get the implicit join path to the ehr.ehr table.
     */
    public EhrPath ehr() {
        if (_ehr == null)
            _ehr = new EhrPath(this, Keys.COMP_VERSION__COMP_VERSION_EHR_ID_FKEY, null);

        return _ehr;
    }

    private transient TemplateStorePath _templateStore;

    /**
     * Get the implicit join path to the ehr.template_store table.
     */
    public TemplateStorePath templateStore() {
        if (_templateStore == null)
            _templateStore = new TemplateStorePath(this, Keys.COMP_VERSION__COMP_VERSION_TEMPLATE_ID_FKEY, null);

        return _templateStore;
    }

    private transient CompDataPath _compData;

    /**
     * Get the implicit to-many join path to the ehr.comp_data
     * table
     */
    public CompDataPath compData() {
        if (_compData == null)
            _compData = new CompDataPath(this, null, Keys.COMP_DATA__COMP_DATA_VO_ID_FKEY.getInverseKey());

        return _compData;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy