001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.party;
005
006
007import com.echothree.model.data.party.common.pk.NameSuffixPK;
008import com.echothree.model.data.party.common.pk.PartyPK;
009import com.echothree.model.data.party.common.pk.PersonPK;
010import com.echothree.model.data.party.common.pk.PersonalTitlePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.party.NameSuffixes.NameSuffixesPath;
013import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
014import com.echothree.model.jooq.server.tables.party.PersonalTitles.PersonalTitlesPath;
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.Name;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.SQL;
028import org.jooq.Stringly;
029import org.jooq.Table;
030import org.jooq.TableField;
031import org.jooq.TableLike;
032import org.jooq.TableOptions;
033import org.jooq.UniqueKey;
034import org.jooq.impl.DSL;
035import org.jooq.impl.Internal;
036import org.jooq.impl.SQLDataType;
037import org.jooq.impl.TableImpl;
038
039
040/**
041 * This class is generated by jOOQ.
042 */
043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
044public class People extends TableImpl<com.echothree.model.jooq.server.records.party.People> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>people</code>
050     */
051    public static final People People = new People();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.party.People> getRecordType() {
058        return com.echothree.model.jooq.server.records.party.People.class;
059    }
060
061    /**
062     * The column <code>people.peop_personid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.party.People, PersonPK> PERSON = createField(DSL.name("peop_personid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PersonPK.class, id -> new com.echothree.model.data.party.common.pk.PersonPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column <code>people.peop_par_partyid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.party.People, PartyPK> PARTY = createField(DSL.name("peop_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()));
070
071    /**
072     * The column <code>people.peop_pert_personaltitleid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.party.People, PersonalTitlePK> PERSONAL_TITLE = createField(DSL.name("peop_pert_personaltitleid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PersonalTitlePK.class, id -> new com.echothree.model.data.party.common.pk.PersonalTitlePK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column <code>people.peop_firstname</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.party.People, String> FIRST_NAME = createField(DSL.name("peop_firstname"), SQLDataType.VARCHAR(20), this, "");
080
081    /**
082     * The column <code>people.peop_firstnamesdx</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.party.People, String> FIRST_NAME_SDX = createField(DSL.name("peop_firstnamesdx"), SQLDataType.VARCHAR(4), this, "");
085
086    /**
087     * The column <code>people.peop_middlename</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.party.People, String> MIDDLE_NAME = createField(DSL.name("peop_middlename"), SQLDataType.VARCHAR(20), this, "");
090
091    /**
092     * The column <code>people.peop_middlenamesdx</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.party.People, String> MIDDLE_NAME_SDX = createField(DSL.name("peop_middlenamesdx"), SQLDataType.VARCHAR(4), this, "");
095
096    /**
097     * The column <code>people.peop_lastname</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.party.People, String> LAST_NAME = createField(DSL.name("peop_lastname"), SQLDataType.VARCHAR(20), this, "");
100
101    /**
102     * The column <code>people.peop_lastnamesdx</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.party.People, String> LAST_NAME_SDX = createField(DSL.name("peop_lastnamesdx"), SQLDataType.VARCHAR(4), this, "");
105
106    /**
107     * The column <code>people.peop_nsfx_namesuffixid</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.party.People, NameSuffixPK> NAME_SUFFIX = createField(DSL.name("peop_nsfx_namesuffixid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, NameSuffixPK.class, id -> new com.echothree.model.data.party.common.pk.NameSuffixPK(id), primaryKey -> primaryKey.getEntityId()));
110
111    /**
112     * The column <code>people.peop_fromtime</code>.
113     */
114    public final TableField<com.echothree.model.jooq.server.records.party.People, Long> FROM_TIME = createField(DSL.name("peop_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
115
116    /**
117     * The column <code>people.peop_thrutime</code>.
118     */
119    public final TableField<com.echothree.model.jooq.server.records.party.People, Long> THRU_TIME = createField(DSL.name("peop_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
120
121    private People(Name alias, Table<com.echothree.model.jooq.server.records.party.People> aliased) {
122        this(alias, aliased, (Field<?>[]) null, null);
123    }
124
125    private People(Name alias, Table<com.echothree.model.jooq.server.records.party.People> aliased, Field<?>[] parameters, Condition where) {
126        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
127    }
128
129    /**
130     * Create an aliased <code>people</code> table reference
131     */
132    public People(String alias) {
133        this(DSL.name(alias), People);
134    }
135
136    /**
137     * Create an aliased <code>people</code> table reference
138     */
139    public People(Name alias) {
140        this(alias, People);
141    }
142
143    /**
144     * Create a <code>people</code> table reference
145     */
146    public People() {
147        this(DSL.name("people"), null);
148    }
149
150    @Override
151    public UniqueKey<com.echothree.model.jooq.server.records.party.People> getPrimaryKey() {
152        return KeyRegistry.PEOPLE_PK;
153    }
154
155    @Override
156    public List<UniqueKey<com.echothree.model.jooq.server.records.party.People>> getUniqueKeys() {
157        return Arrays.asList(KeyRegistry.PEOPLE_PARTY_AND_THRU_TIME_UK);
158    }
159
160    @Override
161    public List<ForeignKey<com.echothree.model.jooq.server.records.party.People, ?>> getReferences() {
162        return Arrays.asList(KeyRegistry.PEOPLE_NAME_SUFFIX_FK, KeyRegistry.PEOPLE_PARTY_FK, KeyRegistry.PEOPLE_PERSONAL_TITLE_FK);
163    }
164
165    private transient NameSuffixesPath _peop_nsfx_namesuffixid_fk;
166
167    /**
168     * Get the implicit join path to the <code>namesuffixes</code> table.
169     */
170    public NameSuffixesPath peop_nsfx_namesuffixid_fk() {
171        if (_peop_nsfx_namesuffixid_fk == null)
172            _peop_nsfx_namesuffixid_fk = new NameSuffixesPath(this, KeyRegistry.PEOPLE_NAME_SUFFIX_FK, null);
173
174        return _peop_nsfx_namesuffixid_fk;
175    }
176
177    private transient PartiesPath _peop_par_partyid_fk;
178
179    /**
180     * Get the implicit join path to the <code>parties</code> table.
181     */
182    public PartiesPath peop_par_partyid_fk() {
183        if (_peop_par_partyid_fk == null)
184            _peop_par_partyid_fk = new PartiesPath(this, KeyRegistry.PEOPLE_PARTY_FK, null);
185
186        return _peop_par_partyid_fk;
187    }
188
189    private transient PersonalTitlesPath _peop_pert_personaltitleid_fk;
190
191    /**
192     * Get the implicit join path to the <code>personaltitles</code> table.
193     */
194    public PersonalTitlesPath peop_pert_personaltitleid_fk() {
195        if (_peop_pert_personaltitleid_fk == null)
196            _peop_pert_personaltitleid_fk = new PersonalTitlesPath(this, KeyRegistry.PEOPLE_PERSONAL_TITLE_FK, null);
197
198        return _peop_pert_personaltitleid_fk;
199    }
200
201    @Override
202    public People as(String alias) {
203        return new People(DSL.name(alias), this);
204    }
205
206    @Override
207    public People as(Name alias) {
208        return new People(alias, this);
209    }
210
211    @Override
212    public People as(Table<?> alias) {
213        return new People(alias.getQualifiedName(), this);
214    }
215
216    /**
217     * Rename this table
218     */
219    @Override
220    public People rename(String name) {
221        return new People(DSL.name(name), null);
222    }
223
224    /**
225     * Rename this table
226     */
227    @Override
228    public People rename(Name name) {
229        return new People(name, null);
230    }
231
232    /**
233     * Rename this table
234     */
235    @Override
236    public People rename(Table<?> name) {
237        return new People(name.getQualifiedName(), null);
238    }
239
240    /**
241     * Create an inline derived table from this table
242     */
243    @Override
244    public People where(Condition condition) {
245        return new People(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
246    }
247
248    /**
249     * Create an inline derived table from this table
250     */
251    @Override
252    public People where(Collection<? extends Condition> conditions) {
253        return where(DSL.and(conditions));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    public People where(Condition... conditions) {
261        return where(DSL.and(conditions));
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    public People where(Field<Boolean> condition) {
269        return where(DSL.condition(condition));
270    }
271
272    /**
273     * Create an inline derived table from this table
274     */
275    @Override
276    @PlainSQL
277    public People where(SQL condition) {
278        return where(DSL.condition(condition));
279    }
280
281    /**
282     * Create an inline derived table from this table
283     */
284    @Override
285    @PlainSQL
286    public People where(@Stringly.SQL String condition) {
287        return where(DSL.condition(condition));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    @PlainSQL
295    public People where(@Stringly.SQL String condition, Object... binds) {
296        return where(DSL.condition(condition, binds));
297    }
298
299    /**
300     * Create an inline derived table from this table
301     */
302    @Override
303    @PlainSQL
304    public People where(@Stringly.SQL String condition, QueryPart... parts) {
305        return where(DSL.condition(condition, parts));
306    }
307
308    /**
309     * Create an inline derived table from this table
310     */
311    @Override
312    public People whereExists(TableLike<?> select) {
313        return where(DSL.exists(select));
314    }
315
316    /**
317     * Create an inline derived table from this table
318     */
319    @Override
320    public People whereNotExists(TableLike<?> select) {
321        return where(DSL.notExists(select));
322    }
323}