001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.training;
005
006
007import com.echothree.model.data.training.common.pk.TrainingClassDetailPK;
008import com.echothree.model.data.training.common.pk.TrainingClassPK;
009import com.echothree.model.data.workeffort.common.pk.WorkEffortScopePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.training.TrainingClasses.TrainingClassesPath;
012import com.echothree.model.jooq.server.tables.workeffort.WorkEffortScopes.WorkEffortScopesPath;
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 TrainingClassDetails extends TableImpl<com.echothree.model.jooq.server.records.training.TrainingClassDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>trainingclassdetails</code>
051     */
052    public static final TrainingClassDetails TrainingClassDetails = new TrainingClassDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.training.TrainingClassDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.training.TrainingClassDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>trainingclassdetails.trnclsdt_trainingclassdetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, TrainingClassDetailPK> TRAINING_CLASS_DETAIL = createField(DSL.name("trnclsdt_trainingclassdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassDetailPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>trainingclassdetails.trnclsdt_trncls_trainingclassid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, TrainingClassPK> TRAINING_CLASS = createField(DSL.name("trnclsdt_trncls_trainingclassid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column <code>trainingclassdetails.trnclsdt_trainingclassname</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, String> TRAINING_CLASS_NAME = createField(DSL.name("trnclsdt_trainingclassname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
078
079    /**
080     * The column
081     * <code>trainingclassdetails.trnclsdt_estimatedreadingtime</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> ESTIMATED_READING_TIME = createField(DSL.name("trnclsdt_estimatedreadingtime"), SQLDataType.BIGINT, this, "");
084
085    /**
086     * The column <code>trainingclassdetails.trnclsdt_readingtimeallowed</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> READING_TIME_ALLOWED = createField(DSL.name("trnclsdt_readingtimeallowed"), SQLDataType.BIGINT, this, "");
089
090    /**
091     * The column
092     * <code>trainingclassdetails.trnclsdt_estimatedtestingtime</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> ESTIMATED_TESTING_TIME = createField(DSL.name("trnclsdt_estimatedtestingtime"), SQLDataType.BIGINT, this, "");
095
096    /**
097     * The column <code>trainingclassdetails.trnclsdt_testingtimeallowed</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> TESTING_TIME_ALLOWED = createField(DSL.name("trnclsdt_testingtimeallowed"), SQLDataType.BIGINT, this, "");
100
101    /**
102     * The column
103     * <code>trainingclassdetails.trnclsdt_requiredcompletiontime</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> REQUIRED_COMPLETION_TIME = createField(DSL.name("trnclsdt_requiredcompletiontime"), SQLDataType.BIGINT, this, "");
106
107    /**
108     * The column
109     * <code>trainingclassdetails.trnclsdt_wes_workeffortscopeid</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, WorkEffortScopePK> WORK_EFFORT_SCOPE = createField(DSL.name("trnclsdt_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()));
112
113    /**
114     * The column
115     * <code>trainingclassdetails.trnclsdt_defaultpercentagetopass</code>.
116     */
117    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Integer> DEFAULT_PERCENTAGE_TO_PASS = createField(DSL.name("trnclsdt_defaultpercentagetopass"), SQLDataType.INTEGER, this, "");
118
119    /**
120     * The column
121     * <code>trainingclassdetails.trnclsdt_overallquestioncount</code>.
122     */
123    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Integer> OVERALL_QUESTION_COUNT = createField(DSL.name("trnclsdt_overallquestioncount"), SQLDataType.INTEGER, this, "");
124
125    /**
126     * The column
127     * <code>trainingclassdetails.trnclsdt_testingvaliditytime</code>.
128     */
129    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> TESTING_VALIDITY_TIME = createField(DSL.name("trnclsdt_testingvaliditytime"), SQLDataType.BIGINT, this, "");
130
131    /**
132     * The column
133     * <code>trainingclassdetails.trnclsdt_expiredretentiontime</code>.
134     */
135    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> EXPIRED_RETENTION_TIME = createField(DSL.name("trnclsdt_expiredretentiontime"), SQLDataType.BIGINT, this, "");
136
137    /**
138     * The column
139     * <code>trainingclassdetails.trnclsdt_alwaysreassignonexpiration</code>.
140     */
141    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Boolean> ALWAYS_REASSIGN_ON_EXPIRATION = createField(DSL.name("trnclsdt_alwaysreassignonexpiration"), SQLDataType.BIT.nullable(false), this, "");
142
143    /**
144     * The column <code>trainingclassdetails.trnclsdt_isdefault</code>.
145     */
146    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Boolean> IS_DEFAULT = createField(DSL.name("trnclsdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
147
148    /**
149     * The column <code>trainingclassdetails.trnclsdt_sortorder</code>.
150     */
151    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Integer> SORT_ORDER = createField(DSL.name("trnclsdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
152
153    /**
154     * The column <code>trainingclassdetails.trnclsdt_fromtime</code>.
155     */
156    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> FROM_TIME = createField(DSL.name("trnclsdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
157
158    /**
159     * The column <code>trainingclassdetails.trnclsdt_thrutime</code>.
160     */
161    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassDetails, Long> THRU_TIME = createField(DSL.name("trnclsdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
162
163    private TrainingClassDetails(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassDetails> aliased) {
164        this(alias, aliased, (Field<?>[]) null, null);
165    }
166
167    private TrainingClassDetails(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassDetails> aliased, Field<?>[] parameters, Condition where) {
168        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
169    }
170
171    /**
172     * Create an aliased <code>trainingclassdetails</code> table reference
173     */
174    public TrainingClassDetails(String alias) {
175        this(DSL.name(alias), TrainingClassDetails);
176    }
177
178    /**
179     * Create an aliased <code>trainingclassdetails</code> table reference
180     */
181    public TrainingClassDetails(Name alias) {
182        this(alias, TrainingClassDetails);
183    }
184
185    /**
186     * Create a <code>trainingclassdetails</code> table reference
187     */
188    public TrainingClassDetails() {
189        this(DSL.name("trainingclassdetails"), null);
190    }
191
192    public <O extends Record> TrainingClassDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassDetails> parentPath) {
193        super(path, childPath, parentPath, TrainingClassDetails);
194    }
195
196    /**
197     * A subtype implementing {@link Path} for simplified path-based joins.
198     */
199    public static class TrainingClassDetailsPath extends TrainingClassDetails implements Path<com.echothree.model.jooq.server.records.training.TrainingClassDetails> {
200
201        private static final long serialVersionUID = 1L;
202        public <O extends Record> TrainingClassDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassDetails> parentPath) {
203            super(path, childPath, parentPath);
204        }
205        private TrainingClassDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassDetails> aliased) {
206            super(alias, aliased);
207        }
208
209        @Override
210        public TrainingClassDetailsPath as(String alias) {
211            return new TrainingClassDetailsPath(DSL.name(alias), this);
212        }
213
214        @Override
215        public TrainingClassDetailsPath as(Name alias) {
216            return new TrainingClassDetailsPath(alias, this);
217        }
218
219        @Override
220        public TrainingClassDetailsPath as(Table<?> alias) {
221            return new TrainingClassDetailsPath(alias.getQualifiedName(), this);
222        }
223    }
224
225    @Override
226    public UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassDetails> getPrimaryKey() {
227        return KeyRegistry.TRAINING_CLASS_DETAILS_PK;
228    }
229
230    @Override
231    public List<UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassDetails>> getUniqueKeys() {
232        return Arrays.asList(KeyRegistry.TRAINING_CLASS_DETAILS_TRAINING_CLASS_AND_THRU_TIME_UK, KeyRegistry.TRAINING_CLASS_DETAILS_TRAINING_CLASS_NAME_AND_THRU_TIME_UK);
233    }
234
235    @Override
236    public List<ForeignKey<com.echothree.model.jooq.server.records.training.TrainingClassDetails, ?>> getReferences() {
237        return Arrays.asList(KeyRegistry.TRAINING_CLASS_DETAILS_TRAINING_CLASS_FK, KeyRegistry.TRAINING_CLASS_DETAILS_WORK_EFFORT_SCOPE_FK);
238    }
239
240    private transient TrainingClassesPath _trnclsdt_trncls_trainingclassid_fk;
241
242    /**
243     * Get the implicit join path to the <code>trainingclasses</code> table.
244     */
245    public TrainingClassesPath trnclsdt_trncls_trainingclassid_fk() {
246        if (_trnclsdt_trncls_trainingclassid_fk == null)
247            _trnclsdt_trncls_trainingclassid_fk = new TrainingClassesPath(this, KeyRegistry.TRAINING_CLASS_DETAILS_TRAINING_CLASS_FK, null);
248
249        return _trnclsdt_trncls_trainingclassid_fk;
250    }
251
252    private transient WorkEffortScopesPath _trnclsdt_wes_workeffortscopeid_fk;
253
254    /**
255     * Get the implicit join path to the <code>workeffortscopes</code> table.
256     */
257    public WorkEffortScopesPath trnclsdt_wes_workeffortscopeid_fk() {
258        if (_trnclsdt_wes_workeffortscopeid_fk == null)
259            _trnclsdt_wes_workeffortscopeid_fk = new WorkEffortScopesPath(this, KeyRegistry.TRAINING_CLASS_DETAILS_WORK_EFFORT_SCOPE_FK, null);
260
261        return _trnclsdt_wes_workeffortscopeid_fk;
262    }
263
264    @Override
265    public TrainingClassDetails as(String alias) {
266        return new TrainingClassDetails(DSL.name(alias), this);
267    }
268
269    @Override
270    public TrainingClassDetails as(Name alias) {
271        return new TrainingClassDetails(alias, this);
272    }
273
274    @Override
275    public TrainingClassDetails as(Table<?> alias) {
276        return new TrainingClassDetails(alias.getQualifiedName(), this);
277    }
278
279    /**
280     * Rename this table
281     */
282    @Override
283    public TrainingClassDetails rename(String name) {
284        return new TrainingClassDetails(DSL.name(name), null);
285    }
286
287    /**
288     * Rename this table
289     */
290    @Override
291    public TrainingClassDetails rename(Name name) {
292        return new TrainingClassDetails(name, null);
293    }
294
295    /**
296     * Rename this table
297     */
298    @Override
299    public TrainingClassDetails rename(Table<?> name) {
300        return new TrainingClassDetails(name.getQualifiedName(), null);
301    }
302
303    /**
304     * Create an inline derived table from this table
305     */
306    @Override
307    public TrainingClassDetails where(Condition condition) {
308        return new TrainingClassDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    public TrainingClassDetails where(Collection<? extends Condition> conditions) {
316        return where(DSL.and(conditions));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    public TrainingClassDetails where(Condition... conditions) {
324        return where(DSL.and(conditions));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    public TrainingClassDetails where(Field<Boolean> condition) {
332        return where(DSL.condition(condition));
333    }
334
335    /**
336     * Create an inline derived table from this table
337     */
338    @Override
339    @PlainSQL
340    public TrainingClassDetails where(SQL condition) {
341        return where(DSL.condition(condition));
342    }
343
344    /**
345     * Create an inline derived table from this table
346     */
347    @Override
348    @PlainSQL
349    public TrainingClassDetails where(@Stringly.SQL String condition) {
350        return where(DSL.condition(condition));
351    }
352
353    /**
354     * Create an inline derived table from this table
355     */
356    @Override
357    @PlainSQL
358    public TrainingClassDetails where(@Stringly.SQL String condition, Object... binds) {
359        return where(DSL.condition(condition, binds));
360    }
361
362    /**
363     * Create an inline derived table from this table
364     */
365    @Override
366    @PlainSQL
367    public TrainingClassDetails where(@Stringly.SQL String condition, QueryPart... parts) {
368        return where(DSL.condition(condition, parts));
369    }
370
371    /**
372     * Create an inline derived table from this table
373     */
374    @Override
375    public TrainingClassDetails whereExists(TableLike<?> select) {
376        return where(DSL.exists(select));
377    }
378
379    /**
380     * Create an inline derived table from this table
381     */
382    @Override
383    public TrainingClassDetails whereNotExists(TableLike<?> select) {
384        return where(DSL.notExists(select));
385    }
386}