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.TrainingClassAnswerDetailPK;
008import com.echothree.model.data.training.common.pk.TrainingClassAnswerPK;
009import com.echothree.model.data.training.common.pk.TrainingClassQuestionPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.training.TrainingClassAnswers.TrainingClassAnswersPath;
012import com.echothree.model.jooq.server.tables.training.TrainingClassQuestions.TrainingClassQuestionsPath;
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 TrainingClassAnswerDetails extends TableImpl<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>trainingclassanswerdetails</code>
051     */
052    public static final TrainingClassAnswerDetails TrainingClassAnswerDetails = new TrainingClassAnswerDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>trainingclassanswerdetails.trnclsansdt_trainingclassanswerdetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, TrainingClassAnswerDetailPK> TRAINING_CLASS_ANSWER_DETAIL = createField(DSL.name("trnclsansdt_trainingclassanswerdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassAnswerDetailPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassAnswerDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>trainingclassanswerdetails.trnclsansdt_trnclsans_trainingclassanswerid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, TrainingClassAnswerPK> TRAINING_CLASS_ANSWER = createField(DSL.name("trnclsansdt_trnclsans_trainingclassanswerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassAnswerPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassAnswerPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column
076     * <code>trainingclassanswerdetails.trnclsansdt_trnclsqus_trainingclassquestionid</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, TrainingClassQuestionPK> TRAINING_CLASS_QUESTION = createField(DSL.name("trnclsansdt_trnclsqus_trainingclassquestionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassQuestionPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassQuestionPK(id), primaryKey -> primaryKey.getEntityId()));
079
080    /**
081     * The column
082     * <code>trainingclassanswerdetails.trnclsansdt_trainingclassanswername</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, String> TRAINING_CLASS_ANSWER_NAME = createField(DSL.name("trnclsansdt_trainingclassanswername"), SQLDataType.VARCHAR(40).nullable(false), this, "");
085
086    /**
087     * The column <code>trainingclassanswerdetails.trnclsansdt_iscorrect</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, Boolean> IS_CORRECT = createField(DSL.name("trnclsansdt_iscorrect"), SQLDataType.BIT.nullable(false), this, "");
090
091    /**
092     * The column <code>trainingclassanswerdetails.trnclsansdt_sortorder</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, Integer> SORT_ORDER = createField(DSL.name("trnclsansdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
095
096    /**
097     * The column <code>trainingclassanswerdetails.trnclsansdt_fromtime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, Long> FROM_TIME = createField(DSL.name("trnclsansdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    /**
102     * The column <code>trainingclassanswerdetails.trnclsansdt_thrutime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, Long> THRU_TIME = createField(DSL.name("trnclsansdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    private TrainingClassAnswerDetails(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> aliased) {
107        this(alias, aliased, (Field<?>[]) null, null);
108    }
109
110    private TrainingClassAnswerDetails(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> aliased, Field<?>[] parameters, Condition where) {
111        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
112    }
113
114    /**
115     * Create an aliased <code>trainingclassanswerdetails</code> table reference
116     */
117    public TrainingClassAnswerDetails(String alias) {
118        this(DSL.name(alias), TrainingClassAnswerDetails);
119    }
120
121    /**
122     * Create an aliased <code>trainingclassanswerdetails</code> table reference
123     */
124    public TrainingClassAnswerDetails(Name alias) {
125        this(alias, TrainingClassAnswerDetails);
126    }
127
128    /**
129     * Create a <code>trainingclassanswerdetails</code> table reference
130     */
131    public TrainingClassAnswerDetails() {
132        this(DSL.name("trainingclassanswerdetails"), null);
133    }
134
135    public <O extends Record> TrainingClassAnswerDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> parentPath) {
136        super(path, childPath, parentPath, TrainingClassAnswerDetails);
137    }
138
139    /**
140     * A subtype implementing {@link Path} for simplified path-based joins.
141     */
142    public static class TrainingClassAnswerDetailsPath extends TrainingClassAnswerDetails implements Path<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> {
143
144        private static final long serialVersionUID = 1L;
145        public <O extends Record> TrainingClassAnswerDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> parentPath) {
146            super(path, childPath, parentPath);
147        }
148        private TrainingClassAnswerDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> aliased) {
149            super(alias, aliased);
150        }
151
152        @Override
153        public TrainingClassAnswerDetailsPath as(String alias) {
154            return new TrainingClassAnswerDetailsPath(DSL.name(alias), this);
155        }
156
157        @Override
158        public TrainingClassAnswerDetailsPath as(Name alias) {
159            return new TrainingClassAnswerDetailsPath(alias, this);
160        }
161
162        @Override
163        public TrainingClassAnswerDetailsPath as(Table<?> alias) {
164            return new TrainingClassAnswerDetailsPath(alias.getQualifiedName(), this);
165        }
166    }
167
168    @Override
169    public UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails> getPrimaryKey() {
170        return KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_PK;
171    }
172
173    @Override
174    public List<UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails>> getUniqueKeys() {
175        return Arrays.asList(KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_ANSWER_AND_THRU_TIME_UK, KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_QUESTION_AND_TRAINING_CLASS_ANSWER_NAME_AND_THRU_TIME_UK);
176    }
177
178    @Override
179    public List<ForeignKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerDetails, ?>> getReferences() {
180        return Arrays.asList(KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_ANSWER_FK, KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_QUESTION_FK);
181    }
182
183    private transient TrainingClassAnswersPath _trnclsansdt_trnclsans_trainingclassanswerid_fk;
184
185    /**
186     * Get the implicit join path to the <code>trainingclassanswers</code>
187     * table.
188     */
189    public TrainingClassAnswersPath trnclsansdt_trnclsans_trainingclassanswerid_fk() {
190        if (_trnclsansdt_trnclsans_trainingclassanswerid_fk == null)
191            _trnclsansdt_trnclsans_trainingclassanswerid_fk = new TrainingClassAnswersPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_ANSWER_FK, null);
192
193        return _trnclsansdt_trnclsans_trainingclassanswerid_fk;
194    }
195
196    private transient TrainingClassQuestionsPath _trnclsansdt_trnclsqus_trainingclassquestionid_fk;
197
198    /**
199     * Get the implicit join path to the <code>trainingclassquestions</code>
200     * table.
201     */
202    public TrainingClassQuestionsPath trnclsansdt_trnclsqus_trainingclassquestionid_fk() {
203        if (_trnclsansdt_trnclsqus_trainingclassquestionid_fk == null)
204            _trnclsansdt_trnclsqus_trainingclassquestionid_fk = new TrainingClassQuestionsPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_DETAILS_TRAINING_CLASS_QUESTION_FK, null);
205
206        return _trnclsansdt_trnclsqus_trainingclassquestionid_fk;
207    }
208
209    @Override
210    public TrainingClassAnswerDetails as(String alias) {
211        return new TrainingClassAnswerDetails(DSL.name(alias), this);
212    }
213
214    @Override
215    public TrainingClassAnswerDetails as(Name alias) {
216        return new TrainingClassAnswerDetails(alias, this);
217    }
218
219    @Override
220    public TrainingClassAnswerDetails as(Table<?> alias) {
221        return new TrainingClassAnswerDetails(alias.getQualifiedName(), this);
222    }
223
224    /**
225     * Rename this table
226     */
227    @Override
228    public TrainingClassAnswerDetails rename(String name) {
229        return new TrainingClassAnswerDetails(DSL.name(name), null);
230    }
231
232    /**
233     * Rename this table
234     */
235    @Override
236    public TrainingClassAnswerDetails rename(Name name) {
237        return new TrainingClassAnswerDetails(name, null);
238    }
239
240    /**
241     * Rename this table
242     */
243    @Override
244    public TrainingClassAnswerDetails rename(Table<?> name) {
245        return new TrainingClassAnswerDetails(name.getQualifiedName(), null);
246    }
247
248    /**
249     * Create an inline derived table from this table
250     */
251    @Override
252    public TrainingClassAnswerDetails where(Condition condition) {
253        return new TrainingClassAnswerDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    public TrainingClassAnswerDetails where(Collection<? extends Condition> conditions) {
261        return where(DSL.and(conditions));
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    public TrainingClassAnswerDetails where(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 TrainingClassAnswerDetails where(Field<Boolean> condition) {
277        return where(DSL.condition(condition));
278    }
279
280    /**
281     * Create an inline derived table from this table
282     */
283    @Override
284    @PlainSQL
285    public TrainingClassAnswerDetails where(SQL condition) {
286        return where(DSL.condition(condition));
287    }
288
289    /**
290     * Create an inline derived table from this table
291     */
292    @Override
293    @PlainSQL
294    public TrainingClassAnswerDetails where(@Stringly.SQL String condition) {
295        return where(DSL.condition(condition));
296    }
297
298    /**
299     * Create an inline derived table from this table
300     */
301    @Override
302    @PlainSQL
303    public TrainingClassAnswerDetails where(@Stringly.SQL String condition, Object... binds) {
304        return where(DSL.condition(condition, binds));
305    }
306
307    /**
308     * Create an inline derived table from this table
309     */
310    @Override
311    @PlainSQL
312    public TrainingClassAnswerDetails where(@Stringly.SQL String condition, QueryPart... parts) {
313        return where(DSL.condition(condition, parts));
314    }
315
316    /**
317     * Create an inline derived table from this table
318     */
319    @Override
320    public TrainingClassAnswerDetails whereExists(TableLike<?> select) {
321        return where(DSL.exists(select));
322    }
323
324    /**
325     * Create an inline derived table from this table
326     */
327    @Override
328    public TrainingClassAnswerDetails whereNotExists(TableLike<?> select) {
329        return where(DSL.notExists(select));
330    }
331}