001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.workflow;
005
006
007import com.echothree.model.data.core.common.pk.EntityInstancePK;
008import com.echothree.model.data.workeffort.common.pk.WorkEffortScopePK;
009import com.echothree.model.data.workflow.common.pk.WorkflowEntityStatusPK;
010import com.echothree.model.data.workflow.common.pk.WorkflowStepPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath;
013import com.echothree.model.jooq.server.tables.workeffort.WorkEffortScopes.WorkEffortScopesPath;
014import com.echothree.model.jooq.server.tables.workflow.WorkflowSteps.WorkflowStepsPath;
015
016import java.util.Arrays;
017import java.util.Collection;
018import java.util.List;
019
020import org.jooq.Condition;
021import org.jooq.Converter;
022import org.jooq.Field;
023import org.jooq.ForeignKey;
024import org.jooq.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class WorkflowEntityStatuses extends TableImpl<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>workflowentitystatuses</code>
053     */
054    public static final WorkflowEntityStatuses WorkflowEntityStatuses = new WorkflowEntityStatuses();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> getRecordType() {
061        return com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses.class;
062    }
063
064    /**
065     * The column
066     * <code>workflowentitystatuses.wkfles_workflowentitystatusid</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, WorkflowEntityStatusPK> WORKFLOW_ENTITY_STATUS = createField(DSL.name("wkfles_workflowentitystatusid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, WorkflowEntityStatusPK.class, id -> new com.echothree.model.data.workflow.common.pk.WorkflowEntityStatusPK(id), primaryKey -> primaryKey.getEntityId()));
069
070    /**
071     * The column
072     * <code>workflowentitystatuses.wkfles_eni_entityinstanceid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("wkfles_eni_entityinstanceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column
078     * <code>workflowentitystatuses.wkfles_wkfls_workflowstepid</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, WorkflowStepPK> WORKFLOW_STEP = createField(DSL.name("wkfles_wkfls_workflowstepid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, WorkflowStepPK.class, id -> new com.echothree.model.data.workflow.common.pk.WorkflowStepPK(id), primaryKey -> primaryKey.getEntityId()));
081
082    /**
083     * The column
084     * <code>workflowentitystatuses.wkfles_wes_workeffortscopeid</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, WorkEffortScopePK> WORK_EFFORT_SCOPE = createField(DSL.name("wkfles_wes_workeffortscopeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, WorkEffortScopePK.class, id -> new com.echothree.model.data.workeffort.common.pk.WorkEffortScopePK(id), primaryKey -> primaryKey.getEntityId()));
087
088    /**
089     * The column <code>workflowentitystatuses.wkfles_fromtime</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, Long> FROM_TIME = createField(DSL.name("wkfles_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
092
093    /**
094     * The column <code>workflowentitystatuses.wkfles_thrutime</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, Long> THRU_TIME = createField(DSL.name("wkfles_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
097
098    private WorkflowEntityStatuses(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> aliased) {
099        this(alias, aliased, (Field<?>[]) null, null);
100    }
101
102    private WorkflowEntityStatuses(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> aliased, Field<?>[] parameters, Condition where) {
103        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
104    }
105
106    /**
107     * Create an aliased <code>workflowentitystatuses</code> table reference
108     */
109    public WorkflowEntityStatuses(String alias) {
110        this(DSL.name(alias), WorkflowEntityStatuses);
111    }
112
113    /**
114     * Create an aliased <code>workflowentitystatuses</code> table reference
115     */
116    public WorkflowEntityStatuses(Name alias) {
117        this(alias, WorkflowEntityStatuses);
118    }
119
120    /**
121     * Create a <code>workflowentitystatuses</code> table reference
122     */
123    public WorkflowEntityStatuses() {
124        this(DSL.name("workflowentitystatuses"), null);
125    }
126
127    public <O extends Record> WorkflowEntityStatuses(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> parentPath) {
128        super(path, childPath, parentPath, WorkflowEntityStatuses);
129    }
130
131    /**
132     * A subtype implementing {@link Path} for simplified path-based joins.
133     */
134    public static class WorkflowEntityStatusesPath extends WorkflowEntityStatuses implements Path<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> {
135
136        private static final long serialVersionUID = 1L;
137        public <O extends Record> WorkflowEntityStatusesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> parentPath) {
138            super(path, childPath, parentPath);
139        }
140        private WorkflowEntityStatusesPath(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> aliased) {
141            super(alias, aliased);
142        }
143
144        @Override
145        public WorkflowEntityStatusesPath as(String alias) {
146            return new WorkflowEntityStatusesPath(DSL.name(alias), this);
147        }
148
149        @Override
150        public WorkflowEntityStatusesPath as(Name alias) {
151            return new WorkflowEntityStatusesPath(alias, this);
152        }
153
154        @Override
155        public WorkflowEntityStatusesPath as(Table<?> alias) {
156            return new WorkflowEntityStatusesPath(alias.getQualifiedName(), this);
157        }
158    }
159
160    @Override
161    public UniqueKey<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses> getPrimaryKey() {
162        return KeyRegistry.WORKFLOW_ENTITY_STATUSES_PK;
163    }
164
165    @Override
166    public List<UniqueKey<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses>> getUniqueKeys() {
167        return Arrays.asList(KeyRegistry.WORKFLOW_ENTITY_STATUSES_ENTITY_INSTANCE_AND_WORKFLOW_STEP_AND_THRU_TIME_UK);
168    }
169
170    @Override
171    public List<ForeignKey<com.echothree.model.jooq.server.records.workflow.WorkflowEntityStatuses, ?>> getReferences() {
172        return Arrays.asList(KeyRegistry.WORKFLOW_ENTITY_STATUSES_ENTITY_INSTANCE_FK, KeyRegistry.WORKFLOW_ENTITY_STATUSES_WORK_EFFORT_SCOPE_FK, KeyRegistry.WORKFLOW_ENTITY_STATUSES_WORKFLOW_STEP_FK);
173    }
174
175    private transient EntityInstancesPath _wkfles_eni_entityinstanceid_fk;
176
177    /**
178     * Get the implicit join path to the <code>entityinstances</code> table.
179     */
180    public EntityInstancesPath wkfles_eni_entityinstanceid_fk() {
181        if (_wkfles_eni_entityinstanceid_fk == null)
182            _wkfles_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.WORKFLOW_ENTITY_STATUSES_ENTITY_INSTANCE_FK, null);
183
184        return _wkfles_eni_entityinstanceid_fk;
185    }
186
187    private transient WorkEffortScopesPath _wkfles_wes_workeffortscopeid_fk;
188
189    /**
190     * Get the implicit join path to the <code>workeffortscopes</code> table.
191     */
192    public WorkEffortScopesPath wkfles_wes_workeffortscopeid_fk() {
193        if (_wkfles_wes_workeffortscopeid_fk == null)
194            _wkfles_wes_workeffortscopeid_fk = new WorkEffortScopesPath(this, KeyRegistry.WORKFLOW_ENTITY_STATUSES_WORK_EFFORT_SCOPE_FK, null);
195
196        return _wkfles_wes_workeffortscopeid_fk;
197    }
198
199    private transient WorkflowStepsPath _wkfles_wkfls_workflowstepid_fk;
200
201    /**
202     * Get the implicit join path to the <code>workflowsteps</code> table.
203     */
204    public WorkflowStepsPath wkfles_wkfls_workflowstepid_fk() {
205        if (_wkfles_wkfls_workflowstepid_fk == null)
206            _wkfles_wkfls_workflowstepid_fk = new WorkflowStepsPath(this, KeyRegistry.WORKFLOW_ENTITY_STATUSES_WORKFLOW_STEP_FK, null);
207
208        return _wkfles_wkfls_workflowstepid_fk;
209    }
210
211    @Override
212    public WorkflowEntityStatuses as(String alias) {
213        return new WorkflowEntityStatuses(DSL.name(alias), this);
214    }
215
216    @Override
217    public WorkflowEntityStatuses as(Name alias) {
218        return new WorkflowEntityStatuses(alias, this);
219    }
220
221    @Override
222    public WorkflowEntityStatuses as(Table<?> alias) {
223        return new WorkflowEntityStatuses(alias.getQualifiedName(), this);
224    }
225
226    /**
227     * Rename this table
228     */
229    @Override
230    public WorkflowEntityStatuses rename(String name) {
231        return new WorkflowEntityStatuses(DSL.name(name), null);
232    }
233
234    /**
235     * Rename this table
236     */
237    @Override
238    public WorkflowEntityStatuses rename(Name name) {
239        return new WorkflowEntityStatuses(name, null);
240    }
241
242    /**
243     * Rename this table
244     */
245    @Override
246    public WorkflowEntityStatuses rename(Table<?> name) {
247        return new WorkflowEntityStatuses(name.getQualifiedName(), null);
248    }
249
250    /**
251     * Create an inline derived table from this table
252     */
253    @Override
254    public WorkflowEntityStatuses where(Condition condition) {
255        return new WorkflowEntityStatuses(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
256    }
257
258    /**
259     * Create an inline derived table from this table
260     */
261    @Override
262    public WorkflowEntityStatuses where(Collection<? extends Condition> conditions) {
263        return where(DSL.and(conditions));
264    }
265
266    /**
267     * Create an inline derived table from this table
268     */
269    @Override
270    public WorkflowEntityStatuses where(Condition... conditions) {
271        return where(DSL.and(conditions));
272    }
273
274    /**
275     * Create an inline derived table from this table
276     */
277    @Override
278    public WorkflowEntityStatuses where(Field<Boolean> condition) {
279        return where(DSL.condition(condition));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    @PlainSQL
287    public WorkflowEntityStatuses where(SQL condition) {
288        return where(DSL.condition(condition));
289    }
290
291    /**
292     * Create an inline derived table from this table
293     */
294    @Override
295    @PlainSQL
296    public WorkflowEntityStatuses where(@Stringly.SQL String condition) {
297        return where(DSL.condition(condition));
298    }
299
300    /**
301     * Create an inline derived table from this table
302     */
303    @Override
304    @PlainSQL
305    public WorkflowEntityStatuses where(@Stringly.SQL String condition, Object... binds) {
306        return where(DSL.condition(condition, binds));
307    }
308
309    /**
310     * Create an inline derived table from this table
311     */
312    @Override
313    @PlainSQL
314    public WorkflowEntityStatuses where(@Stringly.SQL String condition, QueryPart... parts) {
315        return where(DSL.condition(condition, parts));
316    }
317
318    /**
319     * Create an inline derived table from this table
320     */
321    @Override
322    public WorkflowEntityStatuses whereExists(TableLike<?> select) {
323        return where(DSL.exists(select));
324    }
325
326    /**
327     * Create an inline derived table from this table
328     */
329    @Override
330    public WorkflowEntityStatuses whereNotExists(TableLike<?> select) {
331        return where(DSL.notExists(select));
332    }
333}