001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.employee;
005
006
007import com.echothree.model.data.employee.common.pk.EmploymentDetailPK;
008import com.echothree.model.data.employee.common.pk.EmploymentPK;
009import com.echothree.model.data.employee.common.pk.TerminationReasonPK;
010import com.echothree.model.data.employee.common.pk.TerminationTypePK;
011import com.echothree.model.data.party.common.pk.PartyPK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.employee.Employments.EmploymentsPath;
014import com.echothree.model.jooq.server.tables.employee.TerminationReasons.TerminationReasonsPath;
015import com.echothree.model.jooq.server.tables.employee.TerminationTypes.TerminationTypesPath;
016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
017
018import java.util.Arrays;
019import java.util.Collection;
020import java.util.List;
021
022import org.jooq.Condition;
023import org.jooq.Converter;
024import org.jooq.Field;
025import org.jooq.ForeignKey;
026import org.jooq.InverseForeignKey;
027import org.jooq.Name;
028import org.jooq.Path;
029import org.jooq.PlainSQL;
030import org.jooq.QueryPart;
031import org.jooq.Record;
032import org.jooq.SQL;
033import org.jooq.Stringly;
034import org.jooq.Table;
035import org.jooq.TableField;
036import org.jooq.TableLike;
037import org.jooq.TableOptions;
038import org.jooq.UniqueKey;
039import org.jooq.impl.DSL;
040import org.jooq.impl.Internal;
041import org.jooq.impl.SQLDataType;
042import org.jooq.impl.TableImpl;
043
044
045/**
046 * This class is generated by jOOQ.
047 */
048@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
049public class EmploymentDetails extends TableImpl<com.echothree.model.jooq.server.records.employee.EmploymentDetails> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>employmentdetails</code>
055     */
056    public static final EmploymentDetails EmploymentDetails = new EmploymentDetails();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.employee.EmploymentDetails> getRecordType() {
063        return com.echothree.model.jooq.server.records.employee.EmploymentDetails.class;
064    }
065
066    /**
067     * The column <code>employmentdetails.empmntdt_employmentdetailid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, EmploymentDetailPK> EMPLOYMENT_DETAIL = createField(DSL.name("empmntdt_employmentdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EmploymentDetailPK.class, id -> new com.echothree.model.data.employee.common.pk.EmploymentDetailPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column <code>employmentdetails.empmntdt_empmnt_employmentid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, EmploymentPK> EMPLOYMENT = createField(DSL.name("empmntdt_empmnt_employmentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EmploymentPK.class, id -> new com.echothree.model.data.employee.common.pk.EmploymentPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column <code>employmentdetails.empmntdt_employmentname</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, String> EMPLOYMENT_NAME = createField(DSL.name("empmntdt_employmentname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
080
081    /**
082     * The column <code>employmentdetails.empmntdt_par_partyid</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, PartyPK> PARTY = createField(DSL.name("empmntdt_par_partyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId()));
085
086    /**
087     * The column <code>employmentdetails.empmntdt_companypartyid</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, PartyPK> COMPANY_PARTY = createField(DSL.name("empmntdt_companypartyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId()));
090
091    /**
092     * The column <code>employmentdetails.empmntdt_starttime</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, Long> START_TIME = createField(DSL.name("empmntdt_starttime"), SQLDataType.BIGINT.nullable(false), this, "");
095
096    /**
097     * The column <code>employmentdetails.empmntdt_endtime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, Long> END_TIME = createField(DSL.name("empmntdt_endtime"), SQLDataType.BIGINT, this, "");
100
101    /**
102     * The column
103     * <code>employmentdetails.empmntdt_trmntyp_terminationtypeid</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, TerminationTypePK> TERMINATION_TYPE = createField(DSL.name("empmntdt_trmntyp_terminationtypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, TerminationTypePK.class, id -> new com.echothree.model.data.employee.common.pk.TerminationTypePK(id), primaryKey -> primaryKey.getEntityId()));
106
107    /**
108     * The column
109     * <code>employmentdetails.empmntdt_trmnrsn_terminationreasonid</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, TerminationReasonPK> TERMINATION_REASON = createField(DSL.name("empmntdt_trmnrsn_terminationreasonid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, TerminationReasonPK.class, id -> new com.echothree.model.data.employee.common.pk.TerminationReasonPK(id), primaryKey -> primaryKey.getEntityId()));
112
113    /**
114     * The column <code>employmentdetails.empmntdt_fromtime</code>.
115     */
116    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, Long> FROM_TIME = createField(DSL.name("empmntdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
117
118    /**
119     * The column <code>employmentdetails.empmntdt_thrutime</code>.
120     */
121    public final TableField<com.echothree.model.jooq.server.records.employee.EmploymentDetails, Long> THRU_TIME = createField(DSL.name("empmntdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
122
123    private EmploymentDetails(Name alias, Table<com.echothree.model.jooq.server.records.employee.EmploymentDetails> aliased) {
124        this(alias, aliased, (Field<?>[]) null, null);
125    }
126
127    private EmploymentDetails(Name alias, Table<com.echothree.model.jooq.server.records.employee.EmploymentDetails> aliased, Field<?>[] parameters, Condition where) {
128        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
129    }
130
131    /**
132     * Create an aliased <code>employmentdetails</code> table reference
133     */
134    public EmploymentDetails(String alias) {
135        this(DSL.name(alias), EmploymentDetails);
136    }
137
138    /**
139     * Create an aliased <code>employmentdetails</code> table reference
140     */
141    public EmploymentDetails(Name alias) {
142        this(alias, EmploymentDetails);
143    }
144
145    /**
146     * Create a <code>employmentdetails</code> table reference
147     */
148    public EmploymentDetails() {
149        this(DSL.name("employmentdetails"), null);
150    }
151
152    public <O extends Record> EmploymentDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.EmploymentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.EmploymentDetails> parentPath) {
153        super(path, childPath, parentPath, EmploymentDetails);
154    }
155
156    /**
157     * A subtype implementing {@link Path} for simplified path-based joins.
158     */
159    public static class EmploymentDetailsPath extends EmploymentDetails implements Path<com.echothree.model.jooq.server.records.employee.EmploymentDetails> {
160
161        private static final long serialVersionUID = 1L;
162        public <O extends Record> EmploymentDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.EmploymentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.EmploymentDetails> parentPath) {
163            super(path, childPath, parentPath);
164        }
165        private EmploymentDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.employee.EmploymentDetails> aliased) {
166            super(alias, aliased);
167        }
168
169        @Override
170        public EmploymentDetailsPath as(String alias) {
171            return new EmploymentDetailsPath(DSL.name(alias), this);
172        }
173
174        @Override
175        public EmploymentDetailsPath as(Name alias) {
176            return new EmploymentDetailsPath(alias, this);
177        }
178
179        @Override
180        public EmploymentDetailsPath as(Table<?> alias) {
181            return new EmploymentDetailsPath(alias.getQualifiedName(), this);
182        }
183    }
184
185    @Override
186    public UniqueKey<com.echothree.model.jooq.server.records.employee.EmploymentDetails> getPrimaryKey() {
187        return KeyRegistry.EMPLOYMENT_DETAILS_PK;
188    }
189
190    @Override
191    public List<UniqueKey<com.echothree.model.jooq.server.records.employee.EmploymentDetails>> getUniqueKeys() {
192        return Arrays.asList(KeyRegistry.EMPLOYMENT_DETAILS_EMPLOYMENT_AND_THRU_TIME_UK, KeyRegistry.EMPLOYMENT_DETAILS_EMPLOYMENT_NAME_AND_THRU_TIME_UK);
193    }
194
195    @Override
196    public List<ForeignKey<com.echothree.model.jooq.server.records.employee.EmploymentDetails, ?>> getReferences() {
197        return Arrays.asList(KeyRegistry.EMPLOYMENT_DETAILS_COMPANY_PARTY_FK, KeyRegistry.EMPLOYMENT_DETAILS_EMPLOYMENT_FK, KeyRegistry.EMPLOYMENT_DETAILS_PARTY_FK, KeyRegistry.EMPLOYMENT_DETAILS_TERMINATION_REASON_FK, KeyRegistry.EMPLOYMENT_DETAILS_TERMINATION_TYPE_FK);
198    }
199
200    private transient PartiesPath _empmntdt_companypartyid_fk;
201
202    /**
203     * Get the implicit join path to the <code>parties</code> table, via the
204     * <code>empmntdt_companypartyid_fk</code> key.
205     */
206    public PartiesPath empmntdt_companypartyid_fk() {
207        if (_empmntdt_companypartyid_fk == null)
208            _empmntdt_companypartyid_fk = new PartiesPath(this, KeyRegistry.EMPLOYMENT_DETAILS_COMPANY_PARTY_FK, null);
209
210        return _empmntdt_companypartyid_fk;
211    }
212
213    private transient EmploymentsPath _empmntdt_empmnt_employmentid_fk;
214
215    /**
216     * Get the implicit join path to the <code>employments</code> table.
217     */
218    public EmploymentsPath empmntdt_empmnt_employmentid_fk() {
219        if (_empmntdt_empmnt_employmentid_fk == null)
220            _empmntdt_empmnt_employmentid_fk = new EmploymentsPath(this, KeyRegistry.EMPLOYMENT_DETAILS_EMPLOYMENT_FK, null);
221
222        return _empmntdt_empmnt_employmentid_fk;
223    }
224
225    private transient PartiesPath _empmntdt_par_partyid_fk;
226
227    /**
228     * Get the implicit join path to the <code>parties</code> table, via the
229     * <code>empmntdt_par_partyid_fk</code> key.
230     */
231    public PartiesPath empmntdt_par_partyid_fk() {
232        if (_empmntdt_par_partyid_fk == null)
233            _empmntdt_par_partyid_fk = new PartiesPath(this, KeyRegistry.EMPLOYMENT_DETAILS_PARTY_FK, null);
234
235        return _empmntdt_par_partyid_fk;
236    }
237
238    private transient TerminationReasonsPath _empmntdt_trmnrsn_terminationreasonid_fk;
239
240    /**
241     * Get the implicit join path to the <code>terminationreasons</code> table.
242     */
243    public TerminationReasonsPath empmntdt_trmnrsn_terminationreasonid_fk() {
244        if (_empmntdt_trmnrsn_terminationreasonid_fk == null)
245            _empmntdt_trmnrsn_terminationreasonid_fk = new TerminationReasonsPath(this, KeyRegistry.EMPLOYMENT_DETAILS_TERMINATION_REASON_FK, null);
246
247        return _empmntdt_trmnrsn_terminationreasonid_fk;
248    }
249
250    private transient TerminationTypesPath _empmntdt_trmntyp_terminationtypeid_fk;
251
252    /**
253     * Get the implicit join path to the <code>terminationtypes</code> table.
254     */
255    public TerminationTypesPath empmntdt_trmntyp_terminationtypeid_fk() {
256        if (_empmntdt_trmntyp_terminationtypeid_fk == null)
257            _empmntdt_trmntyp_terminationtypeid_fk = new TerminationTypesPath(this, KeyRegistry.EMPLOYMENT_DETAILS_TERMINATION_TYPE_FK, null);
258
259        return _empmntdt_trmntyp_terminationtypeid_fk;
260    }
261
262    @Override
263    public EmploymentDetails as(String alias) {
264        return new EmploymentDetails(DSL.name(alias), this);
265    }
266
267    @Override
268    public EmploymentDetails as(Name alias) {
269        return new EmploymentDetails(alias, this);
270    }
271
272    @Override
273    public EmploymentDetails as(Table<?> alias) {
274        return new EmploymentDetails(alias.getQualifiedName(), this);
275    }
276
277    /**
278     * Rename this table
279     */
280    @Override
281    public EmploymentDetails rename(String name) {
282        return new EmploymentDetails(DSL.name(name), null);
283    }
284
285    /**
286     * Rename this table
287     */
288    @Override
289    public EmploymentDetails rename(Name name) {
290        return new EmploymentDetails(name, null);
291    }
292
293    /**
294     * Rename this table
295     */
296    @Override
297    public EmploymentDetails rename(Table<?> name) {
298        return new EmploymentDetails(name.getQualifiedName(), null);
299    }
300
301    /**
302     * Create an inline derived table from this table
303     */
304    @Override
305    public EmploymentDetails where(Condition condition) {
306        return new EmploymentDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
307    }
308
309    /**
310     * Create an inline derived table from this table
311     */
312    @Override
313    public EmploymentDetails where(Collection<? extends Condition> conditions) {
314        return where(DSL.and(conditions));
315    }
316
317    /**
318     * Create an inline derived table from this table
319     */
320    @Override
321    public EmploymentDetails where(Condition... conditions) {
322        return where(DSL.and(conditions));
323    }
324
325    /**
326     * Create an inline derived table from this table
327     */
328    @Override
329    public EmploymentDetails where(Field<Boolean> condition) {
330        return where(DSL.condition(condition));
331    }
332
333    /**
334     * Create an inline derived table from this table
335     */
336    @Override
337    @PlainSQL
338    public EmploymentDetails where(SQL condition) {
339        return where(DSL.condition(condition));
340    }
341
342    /**
343     * Create an inline derived table from this table
344     */
345    @Override
346    @PlainSQL
347    public EmploymentDetails where(@Stringly.SQL String condition) {
348        return where(DSL.condition(condition));
349    }
350
351    /**
352     * Create an inline derived table from this table
353     */
354    @Override
355    @PlainSQL
356    public EmploymentDetails where(@Stringly.SQL String condition, Object... binds) {
357        return where(DSL.condition(condition, binds));
358    }
359
360    /**
361     * Create an inline derived table from this table
362     */
363    @Override
364    @PlainSQL
365    public EmploymentDetails where(@Stringly.SQL String condition, QueryPart... parts) {
366        return where(DSL.condition(condition, parts));
367    }
368
369    /**
370     * Create an inline derived table from this table
371     */
372    @Override
373    public EmploymentDetails whereExists(TableLike<?> select) {
374        return where(DSL.exists(select));
375    }
376
377    /**
378     * Create an inline derived table from this table
379     */
380    @Override
381    public EmploymentDetails whereNotExists(TableLike<?> select) {
382        return where(DSL.notExists(select));
383    }
384}