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