001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.period;
005
006
007import com.echothree.model.data.party.common.pk.LanguagePK;
008import com.echothree.model.data.period.common.pk.PeriodKindDescriptionPK;
009import com.echothree.model.data.period.common.pk.PeriodKindPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.party.Languages.LanguagesPath;
012import com.echothree.model.jooq.server.tables.period.PeriodKinds.PeriodKindsPath;
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.Name;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.SQL;
026import org.jooq.Stringly;
027import org.jooq.Table;
028import org.jooq.TableField;
029import org.jooq.TableLike;
030import org.jooq.TableOptions;
031import org.jooq.UniqueKey;
032import org.jooq.impl.DSL;
033import org.jooq.impl.Internal;
034import org.jooq.impl.SQLDataType;
035import org.jooq.impl.TableImpl;
036
037
038/**
039 * This class is generated by jOOQ.
040 */
041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
042public class PeriodKindDescriptions extends TableImpl<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>periodkinddescriptions</code>
048     */
049    public static final PeriodKindDescriptions PeriodKindDescriptions = new PeriodKindDescriptions();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions> getRecordType() {
056        return com.echothree.model.jooq.server.records.period.PeriodKindDescriptions.class;
057    }
058
059    /**
060     * The column
061     * <code>periodkinddescriptions.prdkd_periodkinddescriptionid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, PeriodKindDescriptionPK> PERIOD_KIND_DESCRIPTION = createField(DSL.name("prdkd_periodkinddescriptionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PeriodKindDescriptionPK.class, id -> new com.echothree.model.data.period.common.pk.PeriodKindDescriptionPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column <code>periodkinddescriptions.prdkd_prdk_periodkindid</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, PeriodKindPK> PERIOD_KIND = createField(DSL.name("prdkd_prdk_periodkindid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PeriodKindPK.class, id -> new com.echothree.model.data.period.common.pk.PeriodKindPK(id), primaryKey -> primaryKey.getEntityId()));
069
070    /**
071     * The column <code>periodkinddescriptions.prdkd_lang_languageid</code>.
072     */
073    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, LanguagePK> LANGUAGE = createField(DSL.name("prdkd_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()));
074
075    /**
076     * The column <code>periodkinddescriptions.prdkd_description</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, String> DESCRIPTION = createField(DSL.name("prdkd_description"), SQLDataType.VARCHAR(132).nullable(false), this, "");
079
080    /**
081     * The column <code>periodkinddescriptions.prdkd_fromtime</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, Long> FROM_TIME = createField(DSL.name("prdkd_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
084
085    /**
086     * The column <code>periodkinddescriptions.prdkd_thrutime</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, Long> THRU_TIME = createField(DSL.name("prdkd_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
089
090    private PeriodKindDescriptions(Name alias, Table<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions> aliased) {
091        this(alias, aliased, (Field<?>[]) null, null);
092    }
093
094    private PeriodKindDescriptions(Name alias, Table<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions> aliased, Field<?>[] parameters, Condition where) {
095        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
096    }
097
098    /**
099     * Create an aliased <code>periodkinddescriptions</code> table reference
100     */
101    public PeriodKindDescriptions(String alias) {
102        this(DSL.name(alias), PeriodKindDescriptions);
103    }
104
105    /**
106     * Create an aliased <code>periodkinddescriptions</code> table reference
107     */
108    public PeriodKindDescriptions(Name alias) {
109        this(alias, PeriodKindDescriptions);
110    }
111
112    /**
113     * Create a <code>periodkinddescriptions</code> table reference
114     */
115    public PeriodKindDescriptions() {
116        this(DSL.name("periodkinddescriptions"), null);
117    }
118
119    @Override
120    public UniqueKey<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions> getPrimaryKey() {
121        return KeyRegistry.PERIOD_KIND_DESCRIPTIONS_PK;
122    }
123
124    @Override
125    public List<UniqueKey<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions>> getUniqueKeys() {
126        return Arrays.asList(KeyRegistry.PERIOD_KIND_DESCRIPTIONS_PERIOD_KIND_AND_LANGUAGE_AND_THRU_TIME_UK);
127    }
128
129    @Override
130    public List<ForeignKey<com.echothree.model.jooq.server.records.period.PeriodKindDescriptions, ?>> getReferences() {
131        return Arrays.asList(KeyRegistry.PERIOD_KIND_DESCRIPTIONS_LANGUAGE_FK, KeyRegistry.PERIOD_KIND_DESCRIPTIONS_PERIOD_KIND_FK);
132    }
133
134    private transient LanguagesPath _prdkd_lang_languageid_fk;
135
136    /**
137     * Get the implicit join path to the <code>languages</code> table.
138     */
139    public LanguagesPath prdkd_lang_languageid_fk() {
140        if (_prdkd_lang_languageid_fk == null)
141            _prdkd_lang_languageid_fk = new LanguagesPath(this, KeyRegistry.PERIOD_KIND_DESCRIPTIONS_LANGUAGE_FK, null);
142
143        return _prdkd_lang_languageid_fk;
144    }
145
146    private transient PeriodKindsPath _prdkd_prdk_periodkindid_fk;
147
148    /**
149     * Get the implicit join path to the <code>periodkinds</code> table.
150     */
151    public PeriodKindsPath prdkd_prdk_periodkindid_fk() {
152        if (_prdkd_prdk_periodkindid_fk == null)
153            _prdkd_prdk_periodkindid_fk = new PeriodKindsPath(this, KeyRegistry.PERIOD_KIND_DESCRIPTIONS_PERIOD_KIND_FK, null);
154
155        return _prdkd_prdk_periodkindid_fk;
156    }
157
158    @Override
159    public PeriodKindDescriptions as(String alias) {
160        return new PeriodKindDescriptions(DSL.name(alias), this);
161    }
162
163    @Override
164    public PeriodKindDescriptions as(Name alias) {
165        return new PeriodKindDescriptions(alias, this);
166    }
167
168    @Override
169    public PeriodKindDescriptions as(Table<?> alias) {
170        return new PeriodKindDescriptions(alias.getQualifiedName(), this);
171    }
172
173    /**
174     * Rename this table
175     */
176    @Override
177    public PeriodKindDescriptions rename(String name) {
178        return new PeriodKindDescriptions(DSL.name(name), null);
179    }
180
181    /**
182     * Rename this table
183     */
184    @Override
185    public PeriodKindDescriptions rename(Name name) {
186        return new PeriodKindDescriptions(name, null);
187    }
188
189    /**
190     * Rename this table
191     */
192    @Override
193    public PeriodKindDescriptions rename(Table<?> name) {
194        return new PeriodKindDescriptions(name.getQualifiedName(), null);
195    }
196
197    /**
198     * Create an inline derived table from this table
199     */
200    @Override
201    public PeriodKindDescriptions where(Condition condition) {
202        return new PeriodKindDescriptions(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
203    }
204
205    /**
206     * Create an inline derived table from this table
207     */
208    @Override
209    public PeriodKindDescriptions where(Collection<? extends Condition> conditions) {
210        return where(DSL.and(conditions));
211    }
212
213    /**
214     * Create an inline derived table from this table
215     */
216    @Override
217    public PeriodKindDescriptions where(Condition... conditions) {
218        return where(DSL.and(conditions));
219    }
220
221    /**
222     * Create an inline derived table from this table
223     */
224    @Override
225    public PeriodKindDescriptions where(Field<Boolean> condition) {
226        return where(DSL.condition(condition));
227    }
228
229    /**
230     * Create an inline derived table from this table
231     */
232    @Override
233    @PlainSQL
234    public PeriodKindDescriptions where(SQL condition) {
235        return where(DSL.condition(condition));
236    }
237
238    /**
239     * Create an inline derived table from this table
240     */
241    @Override
242    @PlainSQL
243    public PeriodKindDescriptions where(@Stringly.SQL String condition) {
244        return where(DSL.condition(condition));
245    }
246
247    /**
248     * Create an inline derived table from this table
249     */
250    @Override
251    @PlainSQL
252    public PeriodKindDescriptions where(@Stringly.SQL String condition, Object... binds) {
253        return where(DSL.condition(condition, binds));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    @PlainSQL
261    public PeriodKindDescriptions where(@Stringly.SQL String condition, QueryPart... parts) {
262        return where(DSL.condition(condition, parts));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    public PeriodKindDescriptions whereExists(TableLike<?> select) {
270        return where(DSL.exists(select));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    public PeriodKindDescriptions whereNotExists(TableLike<?> select) {
278        return where(DSL.notExists(select));
279    }
280}