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