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.TerminationReasonDetailPK;
008import com.echothree.model.data.employee.common.pk.TerminationReasonPK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.employee.TerminationReasonDetails.TerminationReasonDetailsPath;
011
012import java.util.Arrays;
013import java.util.Collection;
014import java.util.List;
015
016import org.jooq.Condition;
017import org.jooq.Converter;
018import org.jooq.Field;
019import org.jooq.ForeignKey;
020import org.jooq.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class TerminationReasons extends TableImpl<com.echothree.model.jooq.server.records.employee.TerminationReasons> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of <code>terminationreasons</code>
049     */
050    public static final TerminationReasons TerminationReasons = new TerminationReasons();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.employee.TerminationReasons> getRecordType() {
057        return com.echothree.model.jooq.server.records.employee.TerminationReasons.class;
058    }
059
060    /**
061     * The column <code>terminationreasons.trmnrsn_terminationreasonid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.employee.TerminationReasons, TerminationReasonPK> TERMINATION_REASON = createField(DSL.name("trmnrsn_terminationreasonid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TerminationReasonPK.class, id -> new com.echothree.model.data.employee.common.pk.TerminationReasonPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column <code>terminationreasons.trmnrsn_activedetailid</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.employee.TerminationReasons, TerminationReasonDetailPK> ACTIVE_DETAIL = createField(DSL.name("trmnrsn_activedetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, TerminationReasonDetailPK.class, id -> new com.echothree.model.data.employee.common.pk.TerminationReasonDetailPK(id), primaryKey -> primaryKey.getEntityId()));
069
070    /**
071     * The column <code>terminationreasons.trmnrsn_lastdetailid</code>.
072     */
073    public final TableField<com.echothree.model.jooq.server.records.employee.TerminationReasons, TerminationReasonDetailPK> LAST_DETAIL = createField(DSL.name("trmnrsn_lastdetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, TerminationReasonDetailPK.class, id -> new com.echothree.model.data.employee.common.pk.TerminationReasonDetailPK(id), primaryKey -> primaryKey.getEntityId()));
074
075    private TerminationReasons(Name alias, Table<com.echothree.model.jooq.server.records.employee.TerminationReasons> aliased) {
076        this(alias, aliased, (Field<?>[]) null, null);
077    }
078
079    private TerminationReasons(Name alias, Table<com.echothree.model.jooq.server.records.employee.TerminationReasons> aliased, Field<?>[] parameters, Condition where) {
080        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
081    }
082
083    /**
084     * Create an aliased <code>terminationreasons</code> table reference
085     */
086    public TerminationReasons(String alias) {
087        this(DSL.name(alias), TerminationReasons);
088    }
089
090    /**
091     * Create an aliased <code>terminationreasons</code> table reference
092     */
093    public TerminationReasons(Name alias) {
094        this(alias, TerminationReasons);
095    }
096
097    /**
098     * Create a <code>terminationreasons</code> table reference
099     */
100    public TerminationReasons() {
101        this(DSL.name("terminationreasons"), null);
102    }
103
104    public <O extends Record> TerminationReasons(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.TerminationReasons> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.TerminationReasons> parentPath) {
105        super(path, childPath, parentPath, TerminationReasons);
106    }
107
108    /**
109     * A subtype implementing {@link Path} for simplified path-based joins.
110     */
111    public static class TerminationReasonsPath extends TerminationReasons implements Path<com.echothree.model.jooq.server.records.employee.TerminationReasons> {
112
113        private static final long serialVersionUID = 1L;
114        public <O extends Record> TerminationReasonsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.TerminationReasons> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.TerminationReasons> parentPath) {
115            super(path, childPath, parentPath);
116        }
117        private TerminationReasonsPath(Name alias, Table<com.echothree.model.jooq.server.records.employee.TerminationReasons> aliased) {
118            super(alias, aliased);
119        }
120
121        @Override
122        public TerminationReasonsPath as(String alias) {
123            return new TerminationReasonsPath(DSL.name(alias), this);
124        }
125
126        @Override
127        public TerminationReasonsPath as(Name alias) {
128            return new TerminationReasonsPath(alias, this);
129        }
130
131        @Override
132        public TerminationReasonsPath as(Table<?> alias) {
133            return new TerminationReasonsPath(alias.getQualifiedName(), this);
134        }
135    }
136
137    @Override
138    public UniqueKey<com.echothree.model.jooq.server.records.employee.TerminationReasons> getPrimaryKey() {
139        return KeyRegistry.TERMINATION_REASONS_PK;
140    }
141
142    @Override
143    public List<UniqueKey<com.echothree.model.jooq.server.records.employee.TerminationReasons>> getUniqueKeys() {
144        return Arrays.asList(KeyRegistry.TERMINATION_REASONS_ACTIVE_DETAIL_UK, KeyRegistry.TERMINATION_REASONS_LAST_DETAIL_UK);
145    }
146
147    @Override
148    public List<ForeignKey<com.echothree.model.jooq.server.records.employee.TerminationReasons, ?>> getReferences() {
149        return Arrays.asList(KeyRegistry.TERMINATION_REASONS_ACTIVE_DETAIL_FK, KeyRegistry.TERMINATION_REASONS_LAST_DETAIL_FK);
150    }
151
152    private transient TerminationReasonDetailsPath _trmnrsn_activedetailid_fk;
153
154    /**
155     * Get the implicit join path to the <code>terminationreasondetails</code>
156     * table, via the <code>trmnrsn_activedetailid_fk</code> key.
157     */
158    public TerminationReasonDetailsPath trmnrsn_activedetailid_fk() {
159        if (_trmnrsn_activedetailid_fk == null)
160            _trmnrsn_activedetailid_fk = new TerminationReasonDetailsPath(this, KeyRegistry.TERMINATION_REASONS_ACTIVE_DETAIL_FK, null);
161
162        return _trmnrsn_activedetailid_fk;
163    }
164
165    private transient TerminationReasonDetailsPath _trmnrsn_lastdetailid_fk;
166
167    /**
168     * Get the implicit join path to the <code>terminationreasondetails</code>
169     * table, via the <code>trmnrsn_lastdetailid_fk</code> key.
170     */
171    public TerminationReasonDetailsPath trmnrsn_lastdetailid_fk() {
172        if (_trmnrsn_lastdetailid_fk == null)
173            _trmnrsn_lastdetailid_fk = new TerminationReasonDetailsPath(this, KeyRegistry.TERMINATION_REASONS_LAST_DETAIL_FK, null);
174
175        return _trmnrsn_lastdetailid_fk;
176    }
177
178    @Override
179    public TerminationReasons as(String alias) {
180        return new TerminationReasons(DSL.name(alias), this);
181    }
182
183    @Override
184    public TerminationReasons as(Name alias) {
185        return new TerminationReasons(alias, this);
186    }
187
188    @Override
189    public TerminationReasons as(Table<?> alias) {
190        return new TerminationReasons(alias.getQualifiedName(), this);
191    }
192
193    /**
194     * Rename this table
195     */
196    @Override
197    public TerminationReasons rename(String name) {
198        return new TerminationReasons(DSL.name(name), null);
199    }
200
201    /**
202     * Rename this table
203     */
204    @Override
205    public TerminationReasons rename(Name name) {
206        return new TerminationReasons(name, null);
207    }
208
209    /**
210     * Rename this table
211     */
212    @Override
213    public TerminationReasons rename(Table<?> name) {
214        return new TerminationReasons(name.getQualifiedName(), null);
215    }
216
217    /**
218     * Create an inline derived table from this table
219     */
220    @Override
221    public TerminationReasons where(Condition condition) {
222        return new TerminationReasons(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
223    }
224
225    /**
226     * Create an inline derived table from this table
227     */
228    @Override
229    public TerminationReasons where(Collection<? extends Condition> conditions) {
230        return where(DSL.and(conditions));
231    }
232
233    /**
234     * Create an inline derived table from this table
235     */
236    @Override
237    public TerminationReasons where(Condition... conditions) {
238        return where(DSL.and(conditions));
239    }
240
241    /**
242     * Create an inline derived table from this table
243     */
244    @Override
245    public TerminationReasons where(Field<Boolean> condition) {
246        return where(DSL.condition(condition));
247    }
248
249    /**
250     * Create an inline derived table from this table
251     */
252    @Override
253    @PlainSQL
254    public TerminationReasons where(SQL condition) {
255        return where(DSL.condition(condition));
256    }
257
258    /**
259     * Create an inline derived table from this table
260     */
261    @Override
262    @PlainSQL
263    public TerminationReasons where(@Stringly.SQL String condition) {
264        return where(DSL.condition(condition));
265    }
266
267    /**
268     * Create an inline derived table from this table
269     */
270    @Override
271    @PlainSQL
272    public TerminationReasons where(@Stringly.SQL String condition, Object... binds) {
273        return where(DSL.condition(condition, binds));
274    }
275
276    /**
277     * Create an inline derived table from this table
278     */
279    @Override
280    @PlainSQL
281    public TerminationReasons where(@Stringly.SQL String condition, QueryPart... parts) {
282        return where(DSL.condition(condition, parts));
283    }
284
285    /**
286     * Create an inline derived table from this table
287     */
288    @Override
289    public TerminationReasons whereExists(TableLike<?> select) {
290        return where(DSL.exists(select));
291    }
292
293    /**
294     * Create an inline derived table from this table
295     */
296    @Override
297    public TerminationReasons whereNotExists(TableLike<?> select) {
298        return where(DSL.notExists(select));
299    }
300}