001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.contact;
005
006
007import com.echothree.model.data.contact.common.pk.ContactMechanismPK;
008import com.echothree.model.data.contact.common.pk.ContactPostalAddressCorrectionPK;
009import com.echothree.model.data.geo.common.pk.GeoCodePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.contact.ContactMechanisms.ContactMechanismsPath;
012import com.echothree.model.jooq.server.tables.geo.GeoCodes.GeoCodesPath;
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.Name;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.SQL;
026import org.jooq.Stringly;
027import org.jooq.Table;
028import org.jooq.TableField;
029import org.jooq.TableLike;
030import org.jooq.TableOptions;
031import org.jooq.UniqueKey;
032import org.jooq.impl.DSL;
033import org.jooq.impl.Internal;
034import org.jooq.impl.SQLDataType;
035import org.jooq.impl.TableImpl;
036
037
038/**
039 * This class is generated by jOOQ.
040 */
041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
042public class ContactPostalAddressCorrections extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>contactpostaladdresscorrections</code>
048     */
049    public static final ContactPostalAddressCorrections ContactPostalAddressCorrections = new ContactPostalAddressCorrections();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections> getRecordType() {
056        return com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections.class;
057    }
058
059    /**
060     * The column
061     * <code>contactpostaladdresscorrections.ctpac_contactpostaladdresscorrectionid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, ContactPostalAddressCorrectionPK> CONTACT_POSTAL_ADDRESS_CORRECTION = createField(DSL.name("ctpac_contactpostaladdresscorrectionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactPostalAddressCorrectionPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactPostalAddressCorrectionPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>contactpostaladdresscorrections.ctpac_cmch_contactmechanismid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, ContactMechanismPK> CONTACT_MECHANISM = createField(DSL.name("ctpac_cmch_contactmechanismid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column <code>contactpostaladdresscorrections.ctpac_address1</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> ADDRESS1 = createField(DSL.name("ctpac_address1"), SQLDataType.VARCHAR(40).nullable(false), this, "");
075
076    /**
077     * The column <code>contactpostaladdresscorrections.ctpac_address2</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> ADDRESS2 = createField(DSL.name("ctpac_address2"), SQLDataType.VARCHAR(40), this, "");
080
081    /**
082     * The column <code>contactpostaladdresscorrections.ctpac_address3</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> ADDRESS3 = createField(DSL.name("ctpac_address3"), SQLDataType.VARCHAR(40), this, "");
085
086    /**
087     * The column <code>contactpostaladdresscorrections.ctpac_city</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> CITY = createField(DSL.name("ctpac_city"), SQLDataType.VARCHAR(30).nullable(false), this, "");
090
091    /**
092     * The column
093     * <code>contactpostaladdresscorrections.ctpac_citygeocodeid</code>.
094     */
095    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, GeoCodePK> CITY_GEO_CODE = createField(DSL.name("ctpac_citygeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
096
097    /**
098     * The column
099     * <code>contactpostaladdresscorrections.ctpac_countygeocodeid</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, GeoCodePK> COUNTY_GEO_CODE = createField(DSL.name("ctpac_countygeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
102
103    /**
104     * The column <code>contactpostaladdresscorrections.ctpac_state</code>.
105     */
106    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> STATE = createField(DSL.name("ctpac_state"), SQLDataType.VARCHAR(30).nullable(false), this, "");
107
108    /**
109     * The column
110     * <code>contactpostaladdresscorrections.ctpac_stategeocodeid</code>.
111     */
112    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, GeoCodePK> STATE_GEO_CODE = createField(DSL.name("ctpac_stategeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
113
114    /**
115     * The column <code>contactpostaladdresscorrections.ctpac_postalcode</code>.
116     */
117    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, String> POSTAL_CODE = createField(DSL.name("ctpac_postalcode"), SQLDataType.VARCHAR(15).nullable(false), this, "");
118
119    /**
120     * The column
121     * <code>contactpostaladdresscorrections.ctpac_postalcodegeocodeid</code>.
122     */
123    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, GeoCodePK> POSTAL_CODE_GEO_CODE = createField(DSL.name("ctpac_postalcodegeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
124
125    /**
126     * The column
127     * <code>contactpostaladdresscorrections.ctpac_countrygeocodeid</code>.
128     */
129    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, GeoCodePK> COUNTRY_GEO_CODE = createField(DSL.name("ctpac_countrygeocodeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
130
131    /**
132     * The column <code>contactpostaladdresscorrections.ctpac_fromtime</code>.
133     */
134    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, Long> FROM_TIME = createField(DSL.name("ctpac_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
135
136    /**
137     * The column <code>contactpostaladdresscorrections.ctpac_thrutime</code>.
138     */
139    public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, Long> THRU_TIME = createField(DSL.name("ctpac_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
140
141    private ContactPostalAddressCorrections(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections> aliased) {
142        this(alias, aliased, (Field<?>[]) null, null);
143    }
144
145    private ContactPostalAddressCorrections(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections> aliased, Field<?>[] parameters, Condition where) {
146        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
147    }
148
149    /**
150     * Create an aliased <code>contactpostaladdresscorrections</code> table
151     * reference
152     */
153    public ContactPostalAddressCorrections(String alias) {
154        this(DSL.name(alias), ContactPostalAddressCorrections);
155    }
156
157    /**
158     * Create an aliased <code>contactpostaladdresscorrections</code> table
159     * reference
160     */
161    public ContactPostalAddressCorrections(Name alias) {
162        this(alias, ContactPostalAddressCorrections);
163    }
164
165    /**
166     * Create a <code>contactpostaladdresscorrections</code> table reference
167     */
168    public ContactPostalAddressCorrections() {
169        this(DSL.name("contactpostaladdresscorrections"), null);
170    }
171
172    @Override
173    public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections> getPrimaryKey() {
174        return KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_PK;
175    }
176
177    @Override
178    public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections>> getUniqueKeys() {
179        return Arrays.asList(KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_CONTACT_MECHANISM_AND_THRU_TIME_UK);
180    }
181
182    @Override
183    public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddressCorrections, ?>> getReferences() {
184        return Arrays.asList(KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_CITY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_CONTACT_MECHANISM_FK, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_COUNTRY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_COUNTY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_POSTAL_CODE_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_STATE_GEO_CODE_FK);
185    }
186
187    private transient GeoCodesPath _ctpac_citygeocodeid_fk;
188
189    /**
190     * Get the implicit join path to the <code>geocodes</code> table, via the
191     * <code>ctpac_citygeocodeid_fk</code> key.
192     */
193    public GeoCodesPath ctpac_citygeocodeid_fk() {
194        if (_ctpac_citygeocodeid_fk == null)
195            _ctpac_citygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_CITY_GEO_CODE_FK, null);
196
197        return _ctpac_citygeocodeid_fk;
198    }
199
200    private transient ContactMechanismsPath _ctpac_cmch_contactmechanismid_fk;
201
202    /**
203     * Get the implicit join path to the <code>contactmechanisms</code> table.
204     */
205    public ContactMechanismsPath ctpac_cmch_contactmechanismid_fk() {
206        if (_ctpac_cmch_contactmechanismid_fk == null)
207            _ctpac_cmch_contactmechanismid_fk = new ContactMechanismsPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_CONTACT_MECHANISM_FK, null);
208
209        return _ctpac_cmch_contactmechanismid_fk;
210    }
211
212    private transient GeoCodesPath _ctpac_countrygeocodeid_fk;
213
214    /**
215     * Get the implicit join path to the <code>geocodes</code> table, via the
216     * <code>ctpac_countrygeocodeid_fk</code> key.
217     */
218    public GeoCodesPath ctpac_countrygeocodeid_fk() {
219        if (_ctpac_countrygeocodeid_fk == null)
220            _ctpac_countrygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_COUNTRY_GEO_CODE_FK, null);
221
222        return _ctpac_countrygeocodeid_fk;
223    }
224
225    private transient GeoCodesPath _ctpac_countygeocodeid_fk;
226
227    /**
228     * Get the implicit join path to the <code>geocodes</code> table, via the
229     * <code>ctpac_countygeocodeid_fk</code> key.
230     */
231    public GeoCodesPath ctpac_countygeocodeid_fk() {
232        if (_ctpac_countygeocodeid_fk == null)
233            _ctpac_countygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_COUNTY_GEO_CODE_FK, null);
234
235        return _ctpac_countygeocodeid_fk;
236    }
237
238    private transient GeoCodesPath _ctpac_postalcodegeocodeid_fk;
239
240    /**
241     * Get the implicit join path to the <code>geocodes</code> table, via the
242     * <code>ctpac_postalcodegeocodeid_fk</code> key.
243     */
244    public GeoCodesPath ctpac_postalcodegeocodeid_fk() {
245        if (_ctpac_postalcodegeocodeid_fk == null)
246            _ctpac_postalcodegeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_POSTAL_CODE_GEO_CODE_FK, null);
247
248        return _ctpac_postalcodegeocodeid_fk;
249    }
250
251    private transient GeoCodesPath _ctpac_stategeocodeid_fk;
252
253    /**
254     * Get the implicit join path to the <code>geocodes</code> table, via the
255     * <code>ctpac_stategeocodeid_fk</code> key.
256     */
257    public GeoCodesPath ctpac_stategeocodeid_fk() {
258        if (_ctpac_stategeocodeid_fk == null)
259            _ctpac_stategeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESS_CORRECTIONS_STATE_GEO_CODE_FK, null);
260
261        return _ctpac_stategeocodeid_fk;
262    }
263
264    @Override
265    public ContactPostalAddressCorrections as(String alias) {
266        return new ContactPostalAddressCorrections(DSL.name(alias), this);
267    }
268
269    @Override
270    public ContactPostalAddressCorrections as(Name alias) {
271        return new ContactPostalAddressCorrections(alias, this);
272    }
273
274    @Override
275    public ContactPostalAddressCorrections as(Table<?> alias) {
276        return new ContactPostalAddressCorrections(alias.getQualifiedName(), this);
277    }
278
279    /**
280     * Rename this table
281     */
282    @Override
283    public ContactPostalAddressCorrections rename(String name) {
284        return new ContactPostalAddressCorrections(DSL.name(name), null);
285    }
286
287    /**
288     * Rename this table
289     */
290    @Override
291    public ContactPostalAddressCorrections rename(Name name) {
292        return new ContactPostalAddressCorrections(name, null);
293    }
294
295    /**
296     * Rename this table
297     */
298    @Override
299    public ContactPostalAddressCorrections rename(Table<?> name) {
300        return new ContactPostalAddressCorrections(name.getQualifiedName(), null);
301    }
302
303    /**
304     * Create an inline derived table from this table
305     */
306    @Override
307    public ContactPostalAddressCorrections where(Condition condition) {
308        return new ContactPostalAddressCorrections(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    public ContactPostalAddressCorrections where(Collection<? extends Condition> conditions) {
316        return where(DSL.and(conditions));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    public ContactPostalAddressCorrections where(Condition... conditions) {
324        return where(DSL.and(conditions));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    public ContactPostalAddressCorrections where(Field<Boolean> condition) {
332        return where(DSL.condition(condition));
333    }
334
335    /**
336     * Create an inline derived table from this table
337     */
338    @Override
339    @PlainSQL
340    public ContactPostalAddressCorrections where(SQL condition) {
341        return where(DSL.condition(condition));
342    }
343
344    /**
345     * Create an inline derived table from this table
346     */
347    @Override
348    @PlainSQL
349    public ContactPostalAddressCorrections where(@Stringly.SQL String condition) {
350        return where(DSL.condition(condition));
351    }
352
353    /**
354     * Create an inline derived table from this table
355     */
356    @Override
357    @PlainSQL
358    public ContactPostalAddressCorrections where(@Stringly.SQL String condition, Object... binds) {
359        return where(DSL.condition(condition, binds));
360    }
361
362    /**
363     * Create an inline derived table from this table
364     */
365    @Override
366    @PlainSQL
367    public ContactPostalAddressCorrections where(@Stringly.SQL String condition, QueryPart... parts) {
368        return where(DSL.condition(condition, parts));
369    }
370
371    /**
372     * Create an inline derived table from this table
373     */
374    @Override
375    public ContactPostalAddressCorrections whereExists(TableLike<?> select) {
376        return where(DSL.exists(select));
377    }
378
379    /**
380     * Create an inline derived table from this table
381     */
382    @Override
383    public ContactPostalAddressCorrections whereNotExists(TableLike<?> select) {
384        return where(DSL.notExists(select));
385    }
386}