001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.workflow;
005
006
007import com.echothree.model.data.security.common.pk.SecurityRoleGroupPK;
008import com.echothree.model.data.selector.common.pk.SelectorTypePK;
009import com.echothree.model.data.workflow.common.pk.WorkflowDetailPK;
010import com.echothree.model.data.workflow.common.pk.WorkflowPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.security.SecurityRoleGroups.SecurityRoleGroupsPath;
013import com.echothree.model.jooq.server.tables.selector.SelectorTypes.SelectorTypesPath;
014import com.echothree.model.jooq.server.tables.workflow.Workflows.WorkflowsPath;
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 WorkflowDetails extends TableImpl<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>workflowdetails</code>
053     */
054    public static final WorkflowDetails WorkflowDetails = new WorkflowDetails();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> getRecordType() {
061        return com.echothree.model.jooq.server.records.workflow.WorkflowDetails.class;
062    }
063
064    /**
065     * The column <code>workflowdetails.wkfldt_workflowdetailid</code>.
066     */
067    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, WorkflowDetailPK> WORKFLOW_DETAIL = createField(DSL.name("wkfldt_workflowdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, WorkflowDetailPK.class, id -> new com.echothree.model.data.workflow.common.pk.WorkflowDetailPK(id), primaryKey -> primaryKey.getEntityId()));
068
069    /**
070     * The column <code>workflowdetails.wkfldt_wkfl_workflowid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, WorkflowPK> WORKFLOW = createField(DSL.name("wkfldt_wkfl_workflowid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, WorkflowPK.class, id -> new com.echothree.model.data.workflow.common.pk.WorkflowPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column <code>workflowdetails.wkfldt_workflowname</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, String> WORKFLOW_NAME = createField(DSL.name("wkfldt_workflowname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
078
079    /**
080     * The column <code>workflowdetails.wkfldt_slt_selectortypeid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, SelectorTypePK> SELECTOR_TYPE = createField(DSL.name("wkfldt_slt_selectortypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorTypePK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorTypePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column <code>workflowdetails.wkfldt_srg_securityrolegroupid</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, SecurityRoleGroupPK> SECURITY_ROLE_GROUP = createField(DSL.name("wkfldt_srg_securityrolegroupid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SecurityRoleGroupPK.class, id -> new com.echothree.model.data.security.common.pk.SecurityRoleGroupPK(id), primaryKey -> primaryKey.getEntityId()));
088
089    /**
090     * The column <code>workflowdetails.wkfldt_sortorder</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, Integer> SORT_ORDER = createField(DSL.name("wkfldt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
093
094    /**
095     * The column <code>workflowdetails.wkfldt_fromtime</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, Long> FROM_TIME = createField(DSL.name("wkfldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
098
099    /**
100     * The column <code>workflowdetails.wkfldt_thrutime</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, Long> THRU_TIME = createField(DSL.name("wkfldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
103
104    private WorkflowDetails(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> aliased) {
105        this(alias, aliased, (Field<?>[]) null, null);
106    }
107
108    private WorkflowDetails(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> aliased, Field<?>[] parameters, Condition where) {
109        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
110    }
111
112    /**
113     * Create an aliased <code>workflowdetails</code> table reference
114     */
115    public WorkflowDetails(String alias) {
116        this(DSL.name(alias), WorkflowDetails);
117    }
118
119    /**
120     * Create an aliased <code>workflowdetails</code> table reference
121     */
122    public WorkflowDetails(Name alias) {
123        this(alias, WorkflowDetails);
124    }
125
126    /**
127     * Create a <code>workflowdetails</code> table reference
128     */
129    public WorkflowDetails() {
130        this(DSL.name("workflowdetails"), null);
131    }
132
133    public <O extends Record> WorkflowDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowDetails> parentPath) {
134        super(path, childPath, parentPath, WorkflowDetails);
135    }
136
137    /**
138     * A subtype implementing {@link Path} for simplified path-based joins.
139     */
140    public static class WorkflowDetailsPath extends WorkflowDetails implements Path<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> {
141
142        private static final long serialVersionUID = 1L;
143        public <O extends Record> WorkflowDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.workflow.WorkflowDetails> parentPath) {
144            super(path, childPath, parentPath);
145        }
146        private WorkflowDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> aliased) {
147            super(alias, aliased);
148        }
149
150        @Override
151        public WorkflowDetailsPath as(String alias) {
152            return new WorkflowDetailsPath(DSL.name(alias), this);
153        }
154
155        @Override
156        public WorkflowDetailsPath as(Name alias) {
157            return new WorkflowDetailsPath(alias, this);
158        }
159
160        @Override
161        public WorkflowDetailsPath as(Table<?> alias) {
162            return new WorkflowDetailsPath(alias.getQualifiedName(), this);
163        }
164    }
165
166    @Override
167    public UniqueKey<com.echothree.model.jooq.server.records.workflow.WorkflowDetails> getPrimaryKey() {
168        return KeyRegistry.WORKFLOW_DETAILS_PK;
169    }
170
171    @Override
172    public List<UniqueKey<com.echothree.model.jooq.server.records.workflow.WorkflowDetails>> getUniqueKeys() {
173        return Arrays.asList(KeyRegistry.WORKFLOW_DETAILS_WORKFLOW_AND_THRU_TIME_UK, KeyRegistry.WORKFLOW_DETAILS_WORKFLOW_NAME_AND_THRU_TIME_UK);
174    }
175
176    @Override
177    public List<ForeignKey<com.echothree.model.jooq.server.records.workflow.WorkflowDetails, ?>> getReferences() {
178        return Arrays.asList(KeyRegistry.WORKFLOW_DETAILS_SELECTOR_TYPE_FK, KeyRegistry.WORKFLOW_DETAILS_SECURITY_ROLE_GROUP_FK, KeyRegistry.WORKFLOW_DETAILS_WORKFLOW_FK);
179    }
180
181    private transient SelectorTypesPath _wkfldt_slt_selectortypeid_fk;
182
183    /**
184     * Get the implicit join path to the <code>selectortypes</code> table.
185     */
186    public SelectorTypesPath wkfldt_slt_selectortypeid_fk() {
187        if (_wkfldt_slt_selectortypeid_fk == null)
188            _wkfldt_slt_selectortypeid_fk = new SelectorTypesPath(this, KeyRegistry.WORKFLOW_DETAILS_SELECTOR_TYPE_FK, null);
189
190        return _wkfldt_slt_selectortypeid_fk;
191    }
192
193    private transient SecurityRoleGroupsPath _wkfldt_srg_securityrolegroupid_fk;
194
195    /**
196     * Get the implicit join path to the <code>securityrolegroups</code> table.
197     */
198    public SecurityRoleGroupsPath wkfldt_srg_securityrolegroupid_fk() {
199        if (_wkfldt_srg_securityrolegroupid_fk == null)
200            _wkfldt_srg_securityrolegroupid_fk = new SecurityRoleGroupsPath(this, KeyRegistry.WORKFLOW_DETAILS_SECURITY_ROLE_GROUP_FK, null);
201
202        return _wkfldt_srg_securityrolegroupid_fk;
203    }
204
205    private transient WorkflowsPath _wkfldt_wkfl_workflowid_fk;
206
207    /**
208     * Get the implicit join path to the <code>workflows</code> table.
209     */
210    public WorkflowsPath wkfldt_wkfl_workflowid_fk() {
211        if (_wkfldt_wkfl_workflowid_fk == null)
212            _wkfldt_wkfl_workflowid_fk = new WorkflowsPath(this, KeyRegistry.WORKFLOW_DETAILS_WORKFLOW_FK, null);
213
214        return _wkfldt_wkfl_workflowid_fk;
215    }
216
217    @Override
218    public WorkflowDetails as(String alias) {
219        return new WorkflowDetails(DSL.name(alias), this);
220    }
221
222    @Override
223    public WorkflowDetails as(Name alias) {
224        return new WorkflowDetails(alias, this);
225    }
226
227    @Override
228    public WorkflowDetails as(Table<?> alias) {
229        return new WorkflowDetails(alias.getQualifiedName(), this);
230    }
231
232    /**
233     * Rename this table
234     */
235    @Override
236    public WorkflowDetails rename(String name) {
237        return new WorkflowDetails(DSL.name(name), null);
238    }
239
240    /**
241     * Rename this table
242     */
243    @Override
244    public WorkflowDetails rename(Name name) {
245        return new WorkflowDetails(name, null);
246    }
247
248    /**
249     * Rename this table
250     */
251    @Override
252    public WorkflowDetails rename(Table<?> name) {
253        return new WorkflowDetails(name.getQualifiedName(), null);
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    public WorkflowDetails where(Condition condition) {
261        return new WorkflowDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    public WorkflowDetails where(Collection<? extends Condition> conditions) {
269        return where(DSL.and(conditions));
270    }
271
272    /**
273     * Create an inline derived table from this table
274     */
275    @Override
276    public WorkflowDetails where(Condition... conditions) {
277        return where(DSL.and(conditions));
278    }
279
280    /**
281     * Create an inline derived table from this table
282     */
283    @Override
284    public WorkflowDetails where(Field<Boolean> condition) {
285        return where(DSL.condition(condition));
286    }
287
288    /**
289     * Create an inline derived table from this table
290     */
291    @Override
292    @PlainSQL
293    public WorkflowDetails where(SQL condition) {
294        return where(DSL.condition(condition));
295    }
296
297    /**
298     * Create an inline derived table from this table
299     */
300    @Override
301    @PlainSQL
302    public WorkflowDetails where(@Stringly.SQL String condition) {
303        return where(DSL.condition(condition));
304    }
305
306    /**
307     * Create an inline derived table from this table
308     */
309    @Override
310    @PlainSQL
311    public WorkflowDetails where(@Stringly.SQL String condition, Object... binds) {
312        return where(DSL.condition(condition, binds));
313    }
314
315    /**
316     * Create an inline derived table from this table
317     */
318    @Override
319    @PlainSQL
320    public WorkflowDetails where(@Stringly.SQL String condition, QueryPart... parts) {
321        return where(DSL.condition(condition, parts));
322    }
323
324    /**
325     * Create an inline derived table from this table
326     */
327    @Override
328    public WorkflowDetails whereExists(TableLike<?> select) {
329        return where(DSL.exists(select));
330    }
331
332    /**
333     * Create an inline derived table from this table
334     */
335    @Override
336    public WorkflowDetails whereNotExists(TableLike<?> select) {
337        return where(DSL.notExists(select));
338    }
339}