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

org.ehrbase.jooq.pg.tables.Contribution Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
/*
 * This file is generated by jOOQ.
 */
package org.ehrbase.jooq.pg.tables;


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.enums.ContributionDataType;
import org.ehrbase.jooq.pg.tables.AuditDetails.AuditDetailsPath;
import org.ehrbase.jooq.pg.tables.CompVersion.CompVersionPath;
import org.ehrbase.jooq.pg.tables.CompVersionHistory.CompVersionHistoryPath;
import org.ehrbase.jooq.pg.tables.Ehr.EhrPath;
import org.ehrbase.jooq.pg.tables.EhrFolderVersion.EhrFolderVersionPath;
import org.ehrbase.jooq.pg.tables.EhrFolderVersionHistory.EhrFolderVersionHistoryPath;
import org.ehrbase.jooq.pg.tables.EhrStatusVersion.EhrStatusVersionPath;
import org.ehrbase.jooq.pg.tables.EhrStatusVersionHistory.EhrStatusVersionHistoryPath;
import org.ehrbase.jooq.pg.tables.records.ContributionRecord;
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 Contribution extends TableImpl {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of ehr.contribution
     */
    public static final Contribution CONTRIBUTION = new Contribution();

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

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

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

    /**
     * The column ehr.contribution.contribution_type.
     */
    public final TableField CONTRIBUTION_TYPE = createField(DSL.name("contribution_type"), SQLDataType.VARCHAR.asEnumDataType(ContributionDataType.class), this, "");

    /**
     * The column ehr.contribution.signature.
     */
    public final TableField SIGNATURE = createField(DSL.name("signature"), SQLDataType.CLOB, this, "");

    /**
     * The column ehr.contribution.has_audit.
     */
    public final TableField HAS_AUDIT = createField(DSL.name("has_audit"), SQLDataType.UUID, this, "");

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

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

    /**
     * Create an aliased ehr.contribution table reference
     */
    public Contribution(String alias) {
        this(DSL.name(alias), CONTRIBUTION);
    }

    /**
     * Create an aliased ehr.contribution table reference
     */
    public Contribution(Name alias) {
        this(alias, CONTRIBUTION);
    }

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

    public  Contribution(Table path, ForeignKey childPath, InverseForeignKey parentPath) {
        super(path, childPath, parentPath, CONTRIBUTION);
    }

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

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

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

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

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

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

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

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

    @Override
    public List> getReferences() {
        return Arrays.asList(Keys.CONTRIBUTION__CONTRIBUTION_EHR_ID_FKEY, Keys.CONTRIBUTION__CONTRIBUTION_HAS_AUDIT_FKEY);
    }

    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.CONTRIBUTION__CONTRIBUTION_EHR_ID_FKEY, null);

        return _ehr;
    }

    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.CONTRIBUTION__CONTRIBUTION_HAS_AUDIT_FKEY, null);

        return _auditDetails;
    }

    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_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _compVersion;
    }

    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_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _compVersionHistory;
    }

    private transient EhrFolderVersionPath _ehrFolderVersion;

    /**
     * Get the implicit to-many join path to the
     * ehr.ehr_folder_version table
     */
    public EhrFolderVersionPath ehrFolderVersion() {
        if (_ehrFolderVersion == null)
            _ehrFolderVersion = new EhrFolderVersionPath(this, null, Keys.EHR_FOLDER_VERSION__EHR_FOLDER_VERSION_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _ehrFolderVersion;
    }

    private transient EhrFolderVersionHistoryPath _ehrFolderVersionHistory;

    /**
     * Get the implicit to-many join path to the
     * ehr.ehr_folder_version_history table
     */
    public EhrFolderVersionHistoryPath ehrFolderVersionHistory() {
        if (_ehrFolderVersionHistory == null)
            _ehrFolderVersionHistory = new EhrFolderVersionHistoryPath(this, null, Keys.EHR_FOLDER_VERSION_HISTORY__EHR_FOLDER_VERSION_HISTORY_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _ehrFolderVersionHistory;
    }

    private transient EhrStatusVersionPath _ehrStatusVersion;

    /**
     * Get the implicit to-many join path to the
     * ehr.ehr_status_version table
     */
    public EhrStatusVersionPath ehrStatusVersion() {
        if (_ehrStatusVersion == null)
            _ehrStatusVersion = new EhrStatusVersionPath(this, null, Keys.EHR_STATUS_VERSION__EHR_STATUS_VERSION_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _ehrStatusVersion;
    }

    private transient EhrStatusVersionHistoryPath _ehrStatusVersionHistory;

    /**
     * Get the implicit to-many join path to the
     * ehr.ehr_status_version_history table
     */
    public EhrStatusVersionHistoryPath ehrStatusVersionHistory() {
        if (_ehrStatusVersionHistory == null)
            _ehrStatusVersionHistory = new EhrStatusVersionHistoryPath(this, null, Keys.EHR_STATUS_VERSION_HISTORY__EHR_STATUS_VERSION_HISTORY_CONTRIBUTION_ID_FKEY.getInverseKey());

        return _ehrStatusVersionHistory;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy