001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.core;
005
006
007import com.echothree.model.data.core.common.pk.ComponentPK;
008import com.echothree.model.data.core.common.pk.ComponentStagePK;
009import com.echothree.model.data.core.common.pk.ComponentVersionPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.core.ComponentStages.ComponentStagesPath;
012import com.echothree.model.jooq.server.tables.core.Components.ComponentsPath;
013
014import java.util.Arrays;
015import java.util.Collection;
016import java.util.List;
017
018import org.jooq.Condition;
019import org.jooq.Converter;
020import org.jooq.Field;
021import org.jooq.ForeignKey;
022import org.jooq.Name;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.SQL;
026import org.jooq.Stringly;
027import org.jooq.Table;
028import org.jooq.TableField;
029import org.jooq.TableLike;
030import org.jooq.TableOptions;
031import org.jooq.UniqueKey;
032import org.jooq.impl.DSL;
033import org.jooq.impl.Internal;
034import org.jooq.impl.SQLDataType;
035import org.jooq.impl.TableImpl;
036
037
038/**
039 * This class is generated by jOOQ.
040 */
041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
042public class ComponentVersions extends TableImpl<com.echothree.model.jooq.server.records.core.ComponentVersions> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>componentversions</code>
048     */
049    public static final ComponentVersions ComponentVersions = new ComponentVersions();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.core.ComponentVersions> getRecordType() {
056        return com.echothree.model.jooq.server.records.core.ComponentVersions.class;
057    }
058
059    /**
060     * The column <code>componentversions.cvrs_componentversionid</code>.
061     */
062    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, ComponentVersionPK> COMPONENT_VERSION = createField(DSL.name("cvrs_componentversionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ComponentVersionPK.class, id -> new com.echothree.model.data.core.common.pk.ComponentVersionPK(id), primaryKey -> primaryKey.getEntityId()));
063
064    /**
065     * The column <code>componentversions.cvrs_cpnt_componentid</code>.
066     */
067    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, ComponentPK> COMPONENT = createField(DSL.name("cvrs_cpnt_componentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ComponentPK.class, id -> new com.echothree.model.data.core.common.pk.ComponentPK(id), primaryKey -> primaryKey.getEntityId()));
068
069    /**
070     * The column <code>componentversions.cvrs_majorrevision</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, Integer> MAJOR_REVISION = createField(DSL.name("cvrs_majorrevision"), SQLDataType.INTEGER.nullable(false), this, "");
073
074    /**
075     * The column <code>componentversions.cvrs_minorrevision</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, Integer> MINOR_REVISION = createField(DSL.name("cvrs_minorrevision"), SQLDataType.INTEGER.nullable(false), this, "");
078
079    /**
080     * The column <code>componentversions.cvrs_cstg_componentstageid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, ComponentStagePK> COMPONENT_STAGE = createField(DSL.name("cvrs_cstg_componentstageid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ComponentStagePK.class, id -> new com.echothree.model.data.core.common.pk.ComponentStagePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column <code>componentversions.cvrs_buildnumber</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, Integer> BUILD_NUMBER = createField(DSL.name("cvrs_buildnumber"), SQLDataType.INTEGER.nullable(false), this, "");
088
089    /**
090     * The column <code>componentversions.cvrs_fromtime</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, Long> FROM_TIME = createField(DSL.name("cvrs_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
093
094    /**
095     * The column <code>componentversions.cvrs_thrutime</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.core.ComponentVersions, Long> THRU_TIME = createField(DSL.name("cvrs_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
098
099    private ComponentVersions(Name alias, Table<com.echothree.model.jooq.server.records.core.ComponentVersions> aliased) {
100        this(alias, aliased, (Field<?>[]) null, null);
101    }
102
103    private ComponentVersions(Name alias, Table<com.echothree.model.jooq.server.records.core.ComponentVersions> aliased, Field<?>[] parameters, Condition where) {
104        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
105    }
106
107    /**
108     * Create an aliased <code>componentversions</code> table reference
109     */
110    public ComponentVersions(String alias) {
111        this(DSL.name(alias), ComponentVersions);
112    }
113
114    /**
115     * Create an aliased <code>componentversions</code> table reference
116     */
117    public ComponentVersions(Name alias) {
118        this(alias, ComponentVersions);
119    }
120
121    /**
122     * Create a <code>componentversions</code> table reference
123     */
124    public ComponentVersions() {
125        this(DSL.name("componentversions"), null);
126    }
127
128    @Override
129    public UniqueKey<com.echothree.model.jooq.server.records.core.ComponentVersions> getPrimaryKey() {
130        return KeyRegistry.COMPONENT_VERSIONS_PK;
131    }
132
133    @Override
134    public List<UniqueKey<com.echothree.model.jooq.server.records.core.ComponentVersions>> getUniqueKeys() {
135        return Arrays.asList(KeyRegistry.COMPONENT_VERSIONS_COMPONENT_AND_THRU_TIME_UK, KeyRegistry.COMPONENT_VERSIONS_COMPONENT_AND_MAJOR_REVISION_AND_MINOR_REVISION_AND_COMPONENT_STAGE_AND_BUILD_NUMBER_UK);
136    }
137
138    @Override
139    public List<ForeignKey<com.echothree.model.jooq.server.records.core.ComponentVersions, ?>> getReferences() {
140        return Arrays.asList(KeyRegistry.COMPONENT_VERSIONS_COMPONENT_FK, KeyRegistry.COMPONENT_VERSIONS_COMPONENT_STAGE_FK);
141    }
142
143    private transient ComponentsPath _cvrs_cpnt_componentid_fk;
144
145    /**
146     * Get the implicit join path to the <code>components</code> table.
147     */
148    public ComponentsPath cvrs_cpnt_componentid_fk() {
149        if (_cvrs_cpnt_componentid_fk == null)
150            _cvrs_cpnt_componentid_fk = new ComponentsPath(this, KeyRegistry.COMPONENT_VERSIONS_COMPONENT_FK, null);
151
152        return _cvrs_cpnt_componentid_fk;
153    }
154
155    private transient ComponentStagesPath _cvrs_cstg_componentstageid_fk;
156
157    /**
158     * Get the implicit join path to the <code>componentstages</code> table.
159     */
160    public ComponentStagesPath cvrs_cstg_componentstageid_fk() {
161        if (_cvrs_cstg_componentstageid_fk == null)
162            _cvrs_cstg_componentstageid_fk = new ComponentStagesPath(this, KeyRegistry.COMPONENT_VERSIONS_COMPONENT_STAGE_FK, null);
163
164        return _cvrs_cstg_componentstageid_fk;
165    }
166
167    @Override
168    public ComponentVersions as(String alias) {
169        return new ComponentVersions(DSL.name(alias), this);
170    }
171
172    @Override
173    public ComponentVersions as(Name alias) {
174        return new ComponentVersions(alias, this);
175    }
176
177    @Override
178    public ComponentVersions as(Table<?> alias) {
179        return new ComponentVersions(alias.getQualifiedName(), this);
180    }
181
182    /**
183     * Rename this table
184     */
185    @Override
186    public ComponentVersions rename(String name) {
187        return new ComponentVersions(DSL.name(name), null);
188    }
189
190    /**
191     * Rename this table
192     */
193    @Override
194    public ComponentVersions rename(Name name) {
195        return new ComponentVersions(name, null);
196    }
197
198    /**
199     * Rename this table
200     */
201    @Override
202    public ComponentVersions rename(Table<?> name) {
203        return new ComponentVersions(name.getQualifiedName(), null);
204    }
205
206    /**
207     * Create an inline derived table from this table
208     */
209    @Override
210    public ComponentVersions where(Condition condition) {
211        return new ComponentVersions(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
212    }
213
214    /**
215     * Create an inline derived table from this table
216     */
217    @Override
218    public ComponentVersions where(Collection<? extends Condition> conditions) {
219        return where(DSL.and(conditions));
220    }
221
222    /**
223     * Create an inline derived table from this table
224     */
225    @Override
226    public ComponentVersions where(Condition... conditions) {
227        return where(DSL.and(conditions));
228    }
229
230    /**
231     * Create an inline derived table from this table
232     */
233    @Override
234    public ComponentVersions where(Field<Boolean> condition) {
235        return where(DSL.condition(condition));
236    }
237
238    /**
239     * Create an inline derived table from this table
240     */
241    @Override
242    @PlainSQL
243    public ComponentVersions where(SQL condition) {
244        return where(DSL.condition(condition));
245    }
246
247    /**
248     * Create an inline derived table from this table
249     */
250    @Override
251    @PlainSQL
252    public ComponentVersions where(@Stringly.SQL String condition) {
253        return where(DSL.condition(condition));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    @PlainSQL
261    public ComponentVersions where(@Stringly.SQL String condition, Object... binds) {
262        return where(DSL.condition(condition, binds));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    @PlainSQL
270    public ComponentVersions where(@Stringly.SQL String condition, QueryPart... parts) {
271        return where(DSL.condition(condition, parts));
272    }
273
274    /**
275     * Create an inline derived table from this table
276     */
277    @Override
278    public ComponentVersions whereExists(TableLike<?> select) {
279        return where(DSL.exists(select));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    public ComponentVersions whereNotExists(TableLike<?> select) {
287        return where(DSL.notExists(select));
288    }
289}