001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.period;
005
006
007import com.echothree.model.data.period.common.pk.PeriodDetailPK;
008import com.echothree.model.data.period.common.pk.PeriodKindPK;
009import com.echothree.model.data.period.common.pk.PeriodPK;
010import com.echothree.model.data.period.common.pk.PeriodTypePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.period.PeriodKinds.PeriodKindsPath;
013import com.echothree.model.jooq.server.tables.period.PeriodTypes.PeriodTypesPath;
014import com.echothree.model.jooq.server.tables.period.Periods.PeriodsPath;
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.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class PeriodDetails extends TableImpl<com.echothree.model.jooq.server.records.period.PeriodDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>perioddetails</code>
053     */
054    public static final PeriodDetails PeriodDetails = new PeriodDetails();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.period.PeriodDetails> getRecordType() {
061        return com.echothree.model.jooq.server.records.period.PeriodDetails.class;
062    }
063
064    /**
065     * The column <code>perioddetails.prddt_perioddetailid</code>.
066     */
067    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, PeriodDetailPK> PERIOD_DETAIL = createField(DSL.name("prddt_perioddetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PeriodDetailPK.class, id -> new com.echothree.model.data.period.common.pk.PeriodDetailPK(id), primaryKey -> primaryKey.getEntityId()));
068
069    /**
070     * The column <code>perioddetails.prddt_prd_periodid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, PeriodPK> PERIOD = createField(DSL.name("prddt_prd_periodid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PeriodPK.class, id -> new com.echothree.model.data.period.common.pk.PeriodPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column <code>perioddetails.prddt_prdk_periodkindid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, PeriodKindPK> PERIOD_KIND = createField(DSL.name("prddt_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()));
078
079    /**
080     * The column <code>perioddetails.prddt_periodname</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, String> PERIOD_NAME = createField(DSL.name("prddt_periodname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
083
084    /**
085     * The column <code>perioddetails.prddt_parentperiodid</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, PeriodPK> PARENT_PERIOD = createField(DSL.name("prddt_parentperiodid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PeriodPK.class, id -> new com.echothree.model.data.period.common.pk.PeriodPK(id), primaryKey -> primaryKey.getEntityId()));
088
089    /**
090     * The column <code>perioddetails.prddt_prdt_periodtypeid</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, PeriodTypePK> PERIOD_TYPE = createField(DSL.name("prddt_prdt_periodtypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PeriodTypePK.class, id -> new com.echothree.model.data.period.common.pk.PeriodTypePK(id), primaryKey -> primaryKey.getEntityId()));
093
094    /**
095     * The column <code>perioddetails.prddt_starttime</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, Long> START_TIME = createField(DSL.name("prddt_starttime"), SQLDataType.BIGINT.nullable(false), this, "");
098
099    /**
100     * The column <code>perioddetails.prddt_endtime</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, Long> END_TIME = createField(DSL.name("prddt_endtime"), SQLDataType.BIGINT.nullable(false), this, "");
103
104    /**
105     * The column <code>perioddetails.prddt_fromtime</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, Long> FROM_TIME = createField(DSL.name("prddt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
108
109    /**
110     * The column <code>perioddetails.prddt_thrutime</code>.
111     */
112    public final TableField<com.echothree.model.jooq.server.records.period.PeriodDetails, Long> THRU_TIME = createField(DSL.name("prddt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
113
114    private PeriodDetails(Name alias, Table<com.echothree.model.jooq.server.records.period.PeriodDetails> aliased) {
115        this(alias, aliased, (Field<?>[]) null, null);
116    }
117
118    private PeriodDetails(Name alias, Table<com.echothree.model.jooq.server.records.period.PeriodDetails> aliased, Field<?>[] parameters, Condition where) {
119        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
120    }
121
122    /**
123     * Create an aliased <code>perioddetails</code> table reference
124     */
125    public PeriodDetails(String alias) {
126        this(DSL.name(alias), PeriodDetails);
127    }
128
129    /**
130     * Create an aliased <code>perioddetails</code> table reference
131     */
132    public PeriodDetails(Name alias) {
133        this(alias, PeriodDetails);
134    }
135
136    /**
137     * Create a <code>perioddetails</code> table reference
138     */
139    public PeriodDetails() {
140        this(DSL.name("perioddetails"), null);
141    }
142
143    public <O extends Record> PeriodDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.period.PeriodDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.period.PeriodDetails> parentPath) {
144        super(path, childPath, parentPath, PeriodDetails);
145    }
146
147    /**
148     * A subtype implementing {@link Path} for simplified path-based joins.
149     */
150    public static class PeriodDetailsPath extends PeriodDetails implements Path<com.echothree.model.jooq.server.records.period.PeriodDetails> {
151
152        private static final long serialVersionUID = 1L;
153        public <O extends Record> PeriodDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.period.PeriodDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.period.PeriodDetails> parentPath) {
154            super(path, childPath, parentPath);
155        }
156        private PeriodDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.period.PeriodDetails> aliased) {
157            super(alias, aliased);
158        }
159
160        @Override
161        public PeriodDetailsPath as(String alias) {
162            return new PeriodDetailsPath(DSL.name(alias), this);
163        }
164
165        @Override
166        public PeriodDetailsPath as(Name alias) {
167            return new PeriodDetailsPath(alias, this);
168        }
169
170        @Override
171        public PeriodDetailsPath as(Table<?> alias) {
172            return new PeriodDetailsPath(alias.getQualifiedName(), this);
173        }
174    }
175
176    @Override
177    public UniqueKey<com.echothree.model.jooq.server.records.period.PeriodDetails> getPrimaryKey() {
178        return KeyRegistry.PERIOD_DETAILS_PK;
179    }
180
181    @Override
182    public List<UniqueKey<com.echothree.model.jooq.server.records.period.PeriodDetails>> getUniqueKeys() {
183        return Arrays.asList(KeyRegistry.PERIOD_DETAILS_PERIOD_KIND_AND_PERIOD_NAME_AND_THRU_TIME_UK, KeyRegistry.PERIOD_DETAILS_PERIOD_AND_THRU_TIME_UK);
184    }
185
186    @Override
187    public List<ForeignKey<com.echothree.model.jooq.server.records.period.PeriodDetails, ?>> getReferences() {
188        return Arrays.asList(KeyRegistry.PERIOD_DETAILS_PARENT_PERIOD_FK, KeyRegistry.PERIOD_DETAILS_PERIOD_FK, KeyRegistry.PERIOD_DETAILS_PERIOD_KIND_FK, KeyRegistry.PERIOD_DETAILS_PERIOD_TYPE_FK);
189    }
190
191    private transient PeriodsPath _prddt_parentperiodid_fk;
192
193    /**
194     * Get the implicit join path to the <code>periods</code> table, via the
195     * <code>prddt_parentperiodid_fk</code> key.
196     */
197    public PeriodsPath prddt_parentperiodid_fk() {
198        if (_prddt_parentperiodid_fk == null)
199            _prddt_parentperiodid_fk = new PeriodsPath(this, KeyRegistry.PERIOD_DETAILS_PARENT_PERIOD_FK, null);
200
201        return _prddt_parentperiodid_fk;
202    }
203
204    private transient PeriodsPath _prddt_prd_periodid_fk;
205
206    /**
207     * Get the implicit join path to the <code>periods</code> table, via the
208     * <code>prddt_prd_periodid_fk</code> key.
209     */
210    public PeriodsPath prddt_prd_periodid_fk() {
211        if (_prddt_prd_periodid_fk == null)
212            _prddt_prd_periodid_fk = new PeriodsPath(this, KeyRegistry.PERIOD_DETAILS_PERIOD_FK, null);
213
214        return _prddt_prd_periodid_fk;
215    }
216
217    private transient PeriodKindsPath _prddt_prdk_periodkindid_fk;
218
219    /**
220     * Get the implicit join path to the <code>periodkinds</code> table.
221     */
222    public PeriodKindsPath prddt_prdk_periodkindid_fk() {
223        if (_prddt_prdk_periodkindid_fk == null)
224            _prddt_prdk_periodkindid_fk = new PeriodKindsPath(this, KeyRegistry.PERIOD_DETAILS_PERIOD_KIND_FK, null);
225
226        return _prddt_prdk_periodkindid_fk;
227    }
228
229    private transient PeriodTypesPath _prddt_prdt_periodtypeid_fk;
230
231    /**
232     * Get the implicit join path to the <code>periodtypes</code> table.
233     */
234    public PeriodTypesPath prddt_prdt_periodtypeid_fk() {
235        if (_prddt_prdt_periodtypeid_fk == null)
236            _prddt_prdt_periodtypeid_fk = new PeriodTypesPath(this, KeyRegistry.PERIOD_DETAILS_PERIOD_TYPE_FK, null);
237
238        return _prddt_prdt_periodtypeid_fk;
239    }
240
241    @Override
242    public PeriodDetails as(String alias) {
243        return new PeriodDetails(DSL.name(alias), this);
244    }
245
246    @Override
247    public PeriodDetails as(Name alias) {
248        return new PeriodDetails(alias, this);
249    }
250
251    @Override
252    public PeriodDetails as(Table<?> alias) {
253        return new PeriodDetails(alias.getQualifiedName(), this);
254    }
255
256    /**
257     * Rename this table
258     */
259    @Override
260    public PeriodDetails rename(String name) {
261        return new PeriodDetails(DSL.name(name), null);
262    }
263
264    /**
265     * Rename this table
266     */
267    @Override
268    public PeriodDetails rename(Name name) {
269        return new PeriodDetails(name, null);
270    }
271
272    /**
273     * Rename this table
274     */
275    @Override
276    public PeriodDetails rename(Table<?> name) {
277        return new PeriodDetails(name.getQualifiedName(), null);
278    }
279
280    /**
281     * Create an inline derived table from this table
282     */
283    @Override
284    public PeriodDetails where(Condition condition) {
285        return new PeriodDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
286    }
287
288    /**
289     * Create an inline derived table from this table
290     */
291    @Override
292    public PeriodDetails where(Collection<? extends Condition> conditions) {
293        return where(DSL.and(conditions));
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    public PeriodDetails where(Condition... conditions) {
301        return where(DSL.and(conditions));
302    }
303
304    /**
305     * Create an inline derived table from this table
306     */
307    @Override
308    public PeriodDetails where(Field<Boolean> condition) {
309        return where(DSL.condition(condition));
310    }
311
312    /**
313     * Create an inline derived table from this table
314     */
315    @Override
316    @PlainSQL
317    public PeriodDetails where(SQL condition) {
318        return where(DSL.condition(condition));
319    }
320
321    /**
322     * Create an inline derived table from this table
323     */
324    @Override
325    @PlainSQL
326    public PeriodDetails where(@Stringly.SQL String condition) {
327        return where(DSL.condition(condition));
328    }
329
330    /**
331     * Create an inline derived table from this table
332     */
333    @Override
334    @PlainSQL
335    public PeriodDetails where(@Stringly.SQL String condition, Object... binds) {
336        return where(DSL.condition(condition, binds));
337    }
338
339    /**
340     * Create an inline derived table from this table
341     */
342    @Override
343    @PlainSQL
344    public PeriodDetails where(@Stringly.SQL String condition, QueryPart... parts) {
345        return where(DSL.condition(condition, parts));
346    }
347
348    /**
349     * Create an inline derived table from this table
350     */
351    @Override
352    public PeriodDetails whereExists(TableLike<?> select) {
353        return where(DSL.exists(select));
354    }
355
356    /**
357     * Create an inline derived table from this table
358     */
359    @Override
360    public PeriodDetails whereNotExists(TableLike<?> select) {
361        return where(DSL.notExists(select));
362    }
363}