001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.training;
005
006
007import com.echothree.model.data.core.common.pk.MimeTypePK;
008import com.echothree.model.data.party.common.pk.LanguagePK;
009import com.echothree.model.data.training.common.pk.TrainingClassAnswerPK;
010import com.echothree.model.data.training.common.pk.TrainingClassAnswerTranslationPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.core.MimeTypes.MimeTypesPath;
013import com.echothree.model.jooq.server.tables.party.Languages.LanguagesPath;
014import com.echothree.model.jooq.server.tables.training.TrainingClassAnswers.TrainingClassAnswersPath;
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.Name;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.SQL;
028import org.jooq.Stringly;
029import org.jooq.Table;
030import org.jooq.TableField;
031import org.jooq.TableLike;
032import org.jooq.TableOptions;
033import org.jooq.UniqueKey;
034import org.jooq.impl.DSL;
035import org.jooq.impl.Internal;
036import org.jooq.impl.SQLDataType;
037import org.jooq.impl.TableImpl;
038
039
040/**
041 * This class is generated by jOOQ.
042 */
043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
044public class TrainingClassAnswerTranslations extends TableImpl<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>trainingclassanswertranslations</code>
050     */
051    public static final TrainingClassAnswerTranslations TrainingClassAnswerTranslations = new TrainingClassAnswerTranslations();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations> getRecordType() {
058        return com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations.class;
059    }
060
061    /**
062     * The column
063     * <code>trainingclassanswertranslations.trnclsanstr_trainingclassanswertranslationid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, TrainingClassAnswerTranslationPK> TRAINING_CLASS_ANSWER_TRANSLATION = createField(DSL.name("trnclsanstr_trainingclassanswertranslationid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TrainingClassAnswerTranslationPK.class, id -> new com.echothree.model.data.training.common.pk.TrainingClassAnswerTranslationPK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>trainingclassanswertranslations.trnclsanstr_trnclsans_trainingclassanswerid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, TrainingClassAnswerPK> TRAINING_CLASS_ANSWER = createField(DSL.name("trnclsanstr_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()));
072
073    /**
074     * The column
075     * <code>trainingclassanswertranslations.trnclsanstr_lang_languageid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, LanguagePK> LANGUAGE = createField(DSL.name("trnclsanstr_lang_languageid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LanguagePK.class, id -> new com.echothree.model.data.party.common.pk.LanguagePK(id), primaryKey -> primaryKey.getEntityId()));
078
079    /**
080     * The column
081     * <code>trainingclassanswertranslations.trnclsanstr_answermimetypeid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, MimeTypePK> ANSWER_MIME_TYPE = createField(DSL.name("trnclsanstr_answermimetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, MimeTypePK.class, id -> new com.echothree.model.data.core.common.pk.MimeTypePK(id), primaryKey -> primaryKey.getEntityId()));
084
085    /**
086     * The column
087     * <code>trainingclassanswertranslations.trnclsanstr_answer</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, String> ANSWER = createField(DSL.name("trnclsanstr_answer"), SQLDataType.CLOB.nullable(false), this, "");
090
091    /**
092     * The column
093     * <code>trainingclassanswertranslations.trnclsanstr_selectedmimetypeid</code>.
094     */
095    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, MimeTypePK> SELECTED_MIME_TYPE = createField(DSL.name("trnclsanstr_selectedmimetypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, MimeTypePK.class, id -> new com.echothree.model.data.core.common.pk.MimeTypePK(id), primaryKey -> primaryKey.getEntityId()));
096
097    /**
098     * The column
099     * <code>trainingclassanswertranslations.trnclsanstr_selected</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, String> SELECTED = createField(DSL.name("trnclsanstr_selected"), SQLDataType.CLOB, this, "");
102
103    /**
104     * The column
105     * <code>trainingclassanswertranslations.trnclsanstr_fromtime</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, Long> FROM_TIME = createField(DSL.name("trnclsanstr_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
108
109    /**
110     * The column
111     * <code>trainingclassanswertranslations.trnclsanstr_thrutime</code>.
112     */
113    public final TableField<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, Long> THRU_TIME = createField(DSL.name("trnclsanstr_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
114
115    private TrainingClassAnswerTranslations(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations> aliased) {
116        this(alias, aliased, (Field<?>[]) null, null);
117    }
118
119    private TrainingClassAnswerTranslations(Name alias, Table<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations> aliased, Field<?>[] parameters, Condition where) {
120        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
121    }
122
123    /**
124     * Create an aliased <code>trainingclassanswertranslations</code> table
125     * reference
126     */
127    public TrainingClassAnswerTranslations(String alias) {
128        this(DSL.name(alias), TrainingClassAnswerTranslations);
129    }
130
131    /**
132     * Create an aliased <code>trainingclassanswertranslations</code> table
133     * reference
134     */
135    public TrainingClassAnswerTranslations(Name alias) {
136        this(alias, TrainingClassAnswerTranslations);
137    }
138
139    /**
140     * Create a <code>trainingclassanswertranslations</code> table reference
141     */
142    public TrainingClassAnswerTranslations() {
143        this(DSL.name("trainingclassanswertranslations"), null);
144    }
145
146    @Override
147    public UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations> getPrimaryKey() {
148        return KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_PK;
149    }
150
151    @Override
152    public List<UniqueKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations>> getUniqueKeys() {
153        return Arrays.asList(KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_TRAINING_CLASS_ANSWER_AND_LANGUAGE_AND_THRU_TIME_UK);
154    }
155
156    @Override
157    public List<ForeignKey<com.echothree.model.jooq.server.records.training.TrainingClassAnswerTranslations, ?>> getReferences() {
158        return Arrays.asList(KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_ANSWER_MIME_TYPE_FK, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_LANGUAGE_FK, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_SELECTED_MIME_TYPE_FK, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_TRAINING_CLASS_ANSWER_FK);
159    }
160
161    private transient MimeTypesPath _trnclsanstr_answermimetypeid_fk;
162
163    /**
164     * Get the implicit join path to the <code>mimetypes</code> table, via the
165     * <code>trnclsanstr_answermimetypeid_fk</code> key.
166     */
167    public MimeTypesPath trnclsanstr_answermimetypeid_fk() {
168        if (_trnclsanstr_answermimetypeid_fk == null)
169            _trnclsanstr_answermimetypeid_fk = new MimeTypesPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_ANSWER_MIME_TYPE_FK, null);
170
171        return _trnclsanstr_answermimetypeid_fk;
172    }
173
174    private transient LanguagesPath _trnclsanstr_lang_languageid_fk;
175
176    /**
177     * Get the implicit join path to the <code>languages</code> table.
178     */
179    public LanguagesPath trnclsanstr_lang_languageid_fk() {
180        if (_trnclsanstr_lang_languageid_fk == null)
181            _trnclsanstr_lang_languageid_fk = new LanguagesPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_LANGUAGE_FK, null);
182
183        return _trnclsanstr_lang_languageid_fk;
184    }
185
186    private transient MimeTypesPath _trnclsanstr_selectedmimetypeid_fk;
187
188    /**
189     * Get the implicit join path to the <code>mimetypes</code> table, via the
190     * <code>trnclsanstr_selectedmimetypeid_fk</code> key.
191     */
192    public MimeTypesPath trnclsanstr_selectedmimetypeid_fk() {
193        if (_trnclsanstr_selectedmimetypeid_fk == null)
194            _trnclsanstr_selectedmimetypeid_fk = new MimeTypesPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_SELECTED_MIME_TYPE_FK, null);
195
196        return _trnclsanstr_selectedmimetypeid_fk;
197    }
198
199    private transient TrainingClassAnswersPath _trnclsanstr_trnclsans_trainingclassanswerid_fk;
200
201    /**
202     * Get the implicit join path to the <code>trainingclassanswers</code>
203     * table.
204     */
205    public TrainingClassAnswersPath trnclsanstr_trnclsans_trainingclassanswerid_fk() {
206        if (_trnclsanstr_trnclsans_trainingclassanswerid_fk == null)
207            _trnclsanstr_trnclsans_trainingclassanswerid_fk = new TrainingClassAnswersPath(this, KeyRegistry.TRAINING_CLASS_ANSWER_TRANSLATIONS_TRAINING_CLASS_ANSWER_FK, null);
208
209        return _trnclsanstr_trnclsans_trainingclassanswerid_fk;
210    }
211
212    @Override
213    public TrainingClassAnswerTranslations as(String alias) {
214        return new TrainingClassAnswerTranslations(DSL.name(alias), this);
215    }
216
217    @Override
218    public TrainingClassAnswerTranslations as(Name alias) {
219        return new TrainingClassAnswerTranslations(alias, this);
220    }
221
222    @Override
223    public TrainingClassAnswerTranslations as(Table<?> alias) {
224        return new TrainingClassAnswerTranslations(alias.getQualifiedName(), this);
225    }
226
227    /**
228     * Rename this table
229     */
230    @Override
231    public TrainingClassAnswerTranslations rename(String name) {
232        return new TrainingClassAnswerTranslations(DSL.name(name), null);
233    }
234
235    /**
236     * Rename this table
237     */
238    @Override
239    public TrainingClassAnswerTranslations rename(Name name) {
240        return new TrainingClassAnswerTranslations(name, null);
241    }
242
243    /**
244     * Rename this table
245     */
246    @Override
247    public TrainingClassAnswerTranslations rename(Table<?> name) {
248        return new TrainingClassAnswerTranslations(name.getQualifiedName(), null);
249    }
250
251    /**
252     * Create an inline derived table from this table
253     */
254    @Override
255    public TrainingClassAnswerTranslations where(Condition condition) {
256        return new TrainingClassAnswerTranslations(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
257    }
258
259    /**
260     * Create an inline derived table from this table
261     */
262    @Override
263    public TrainingClassAnswerTranslations where(Collection<? extends Condition> conditions) {
264        return where(DSL.and(conditions));
265    }
266
267    /**
268     * Create an inline derived table from this table
269     */
270    @Override
271    public TrainingClassAnswerTranslations where(Condition... conditions) {
272        return where(DSL.and(conditions));
273    }
274
275    /**
276     * Create an inline derived table from this table
277     */
278    @Override
279    public TrainingClassAnswerTranslations where(Field<Boolean> condition) {
280        return where(DSL.condition(condition));
281    }
282
283    /**
284     * Create an inline derived table from this table
285     */
286    @Override
287    @PlainSQL
288    public TrainingClassAnswerTranslations where(SQL condition) {
289        return where(DSL.condition(condition));
290    }
291
292    /**
293     * Create an inline derived table from this table
294     */
295    @Override
296    @PlainSQL
297    public TrainingClassAnswerTranslations where(@Stringly.SQL String condition) {
298        return where(DSL.condition(condition));
299    }
300
301    /**
302     * Create an inline derived table from this table
303     */
304    @Override
305    @PlainSQL
306    public TrainingClassAnswerTranslations where(@Stringly.SQL String condition, Object... binds) {
307        return where(DSL.condition(condition, binds));
308    }
309
310    /**
311     * Create an inline derived table from this table
312     */
313    @Override
314    @PlainSQL
315    public TrainingClassAnswerTranslations where(@Stringly.SQL String condition, QueryPart... parts) {
316        return where(DSL.condition(condition, parts));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    public TrainingClassAnswerTranslations whereExists(TableLike<?> select) {
324        return where(DSL.exists(select));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    public TrainingClassAnswerTranslations whereNotExists(TableLike<?> select) {
332        return where(DSL.notExists(select));
333    }
334}