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