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.ContactMechanismPurposePK;
008import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK;
009import com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposeDetailPK;
010import com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.contact.ContactMechanismPurposes.ContactMechanismPurposesPath;
013import com.echothree.model.jooq.server.tables.contact.PartyContactMechanismPurposes.PartyContactMechanismPurposesPath;
014import com.echothree.model.jooq.server.tables.contact.PartyContactMechanisms.PartyContactMechanismsPath;
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.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class PartyContactMechanismPurposeDetails extends TableImpl<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of
053     * <code>partycontactmechanismpurposedetails</code>
054     */
055    public static final PartyContactMechanismPurposeDetails PartyContactMechanismPurposeDetails = new PartyContactMechanismPurposeDetails();
056
057    /**
058     * The class holding records for this type
059     */
060    @Override
061    public Class<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> getRecordType() {
062        return com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails.class;
063    }
064
065    /**
066     * The column
067     * <code>partycontactmechanismpurposedetails.pcmpdt_partycontactmechanismpurposedetailid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, PartyContactMechanismPurposeDetailPK> PARTY_CONTACT_MECHANISM_PURPOSE_DETAIL = createField(DSL.name("pcmpdt_partycontactmechanismpurposedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>partycontactmechanismpurposedetails.pcmpdt_pcmp_partycontactmechanismpurposeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, PartyContactMechanismPurposePK> PARTY_CONTACT_MECHANISM_PURPOSE = createField(DSL.name("pcmpdt_pcmp_partycontactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyContactMechanismPurposePK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column
079     * <code>partycontactmechanismpurposedetails.pcmpdt_pcm_partycontactmechanismid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, PartyContactMechanismPK> PARTY_CONTACT_MECHANISM = createField(DSL.name("pcmpdt_pcm_partycontactmechanismid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyContactMechanismPK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPK(id), primaryKey -> primaryKey.getEntityId()));
082
083    /**
084     * The column
085     * <code>partycontactmechanismpurposedetails.pcmpdt_cmpr_contactmechanismpurposeid</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, ContactMechanismPurposePK> CONTACT_MECHANISM_PURPOSE = createField(DSL.name("pcmpdt_cmpr_contactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPurposePK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId()));
088
089    /**
090     * The column
091     * <code>partycontactmechanismpurposedetails.pcmpdt_isdefault</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, Boolean> IS_DEFAULT = createField(DSL.name("pcmpdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
094
095    /**
096     * The column
097     * <code>partycontactmechanismpurposedetails.pcmpdt_sortorder</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, Integer> SORT_ORDER = createField(DSL.name("pcmpdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
100
101    /**
102     * The column
103     * <code>partycontactmechanismpurposedetails.pcmpdt_fromtime</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, Long> FROM_TIME = createField(DSL.name("pcmpdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
106
107    /**
108     * The column
109     * <code>partycontactmechanismpurposedetails.pcmpdt_thrutime</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, Long> THRU_TIME = createField(DSL.name("pcmpdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
112
113    private PartyContactMechanismPurposeDetails(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> aliased) {
114        this(alias, aliased, (Field<?>[]) null, null);
115    }
116
117    private PartyContactMechanismPurposeDetails(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> aliased, Field<?>[] parameters, Condition where) {
118        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
119    }
120
121    /**
122     * Create an aliased <code>partycontactmechanismpurposedetails</code> table
123     * reference
124     */
125    public PartyContactMechanismPurposeDetails(String alias) {
126        this(DSL.name(alias), PartyContactMechanismPurposeDetails);
127    }
128
129    /**
130     * Create an aliased <code>partycontactmechanismpurposedetails</code> table
131     * reference
132     */
133    public PartyContactMechanismPurposeDetails(Name alias) {
134        this(alias, PartyContactMechanismPurposeDetails);
135    }
136
137    /**
138     * Create a <code>partycontactmechanismpurposedetails</code> table reference
139     */
140    public PartyContactMechanismPurposeDetails() {
141        this(DSL.name("partycontactmechanismpurposedetails"), null);
142    }
143
144    public <O extends Record> PartyContactMechanismPurposeDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> parentPath) {
145        super(path, childPath, parentPath, PartyContactMechanismPurposeDetails);
146    }
147
148    /**
149     * A subtype implementing {@link Path} for simplified path-based joins.
150     */
151    public static class PartyContactMechanismPurposeDetailsPath extends PartyContactMechanismPurposeDetails implements Path<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> {
152
153        private static final long serialVersionUID = 1L;
154        public <O extends Record> PartyContactMechanismPurposeDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> parentPath) {
155            super(path, childPath, parentPath);
156        }
157        private PartyContactMechanismPurposeDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> aliased) {
158            super(alias, aliased);
159        }
160
161        @Override
162        public PartyContactMechanismPurposeDetailsPath as(String alias) {
163            return new PartyContactMechanismPurposeDetailsPath(DSL.name(alias), this);
164        }
165
166        @Override
167        public PartyContactMechanismPurposeDetailsPath as(Name alias) {
168            return new PartyContactMechanismPurposeDetailsPath(alias, this);
169        }
170
171        @Override
172        public PartyContactMechanismPurposeDetailsPath as(Table<?> alias) {
173            return new PartyContactMechanismPurposeDetailsPath(alias.getQualifiedName(), this);
174        }
175    }
176
177    @Override
178    public UniqueKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails> getPrimaryKey() {
179        return KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PK;
180    }
181
182    @Override
183    public List<UniqueKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails>> getUniqueKeys() {
184        return Arrays.asList(KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_PURPOSE_AND_THRU_TIME_UK, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_AND_CONTACT_MECHANISM_PURPOSE_AND_THRU_TIME_UK);
185    }
186
187    @Override
188    public List<ForeignKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposeDetails, ?>> getReferences() {
189        return Arrays.asList(KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_FK, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_PURPOSE_FK);
190    }
191
192    private transient ContactMechanismPurposesPath _pcmpdt_cmpr_contactmechanismpurposeid_fk;
193
194    /**
195     * Get the implicit join path to the <code>contactmechanismpurposes</code>
196     * table.
197     */
198    public ContactMechanismPurposesPath pcmpdt_cmpr_contactmechanismpurposeid_fk() {
199        if (_pcmpdt_cmpr_contactmechanismpurposeid_fk == null)
200            _pcmpdt_cmpr_contactmechanismpurposeid_fk = new ContactMechanismPurposesPath(this, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, null);
201
202        return _pcmpdt_cmpr_contactmechanismpurposeid_fk;
203    }
204
205    private transient PartyContactMechanismsPath _pcmpdt_pcm_partycontactmechanismid_fk;
206
207    /**
208     * Get the implicit join path to the <code>partycontactmechanisms</code>
209     * table.
210     */
211    public PartyContactMechanismsPath pcmpdt_pcm_partycontactmechanismid_fk() {
212        if (_pcmpdt_pcm_partycontactmechanismid_fk == null)
213            _pcmpdt_pcm_partycontactmechanismid_fk = new PartyContactMechanismsPath(this, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_FK, null);
214
215        return _pcmpdt_pcm_partycontactmechanismid_fk;
216    }
217
218    private transient PartyContactMechanismPurposesPath _pcmpdt_pcmp_partycontactmechanismpurposeid_fk;
219
220    /**
221     * Get the implicit join path to the
222     * <code>partycontactmechanismpurposes</code> table.
223     */
224    public PartyContactMechanismPurposesPath pcmpdt_pcmp_partycontactmechanismpurposeid_fk() {
225        if (_pcmpdt_pcmp_partycontactmechanismpurposeid_fk == null)
226            _pcmpdt_pcmp_partycontactmechanismpurposeid_fk = new PartyContactMechanismPurposesPath(this, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSE_DETAILS_PARTY_CONTACT_MECHANISM_PURPOSE_FK, null);
227
228        return _pcmpdt_pcmp_partycontactmechanismpurposeid_fk;
229    }
230
231    @Override
232    public PartyContactMechanismPurposeDetails as(String alias) {
233        return new PartyContactMechanismPurposeDetails(DSL.name(alias), this);
234    }
235
236    @Override
237    public PartyContactMechanismPurposeDetails as(Name alias) {
238        return new PartyContactMechanismPurposeDetails(alias, this);
239    }
240
241    @Override
242    public PartyContactMechanismPurposeDetails as(Table<?> alias) {
243        return new PartyContactMechanismPurposeDetails(alias.getQualifiedName(), this);
244    }
245
246    /**
247     * Rename this table
248     */
249    @Override
250    public PartyContactMechanismPurposeDetails rename(String name) {
251        return new PartyContactMechanismPurposeDetails(DSL.name(name), null);
252    }
253
254    /**
255     * Rename this table
256     */
257    @Override
258    public PartyContactMechanismPurposeDetails rename(Name name) {
259        return new PartyContactMechanismPurposeDetails(name, null);
260    }
261
262    /**
263     * Rename this table
264     */
265    @Override
266    public PartyContactMechanismPurposeDetails rename(Table<?> name) {
267        return new PartyContactMechanismPurposeDetails(name.getQualifiedName(), null);
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    public PartyContactMechanismPurposeDetails where(Condition condition) {
275        return new PartyContactMechanismPurposeDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
276    }
277
278    /**
279     * Create an inline derived table from this table
280     */
281    @Override
282    public PartyContactMechanismPurposeDetails where(Collection<? extends Condition> conditions) {
283        return where(DSL.and(conditions));
284    }
285
286    /**
287     * Create an inline derived table from this table
288     */
289    @Override
290    public PartyContactMechanismPurposeDetails where(Condition... conditions) {
291        return where(DSL.and(conditions));
292    }
293
294    /**
295     * Create an inline derived table from this table
296     */
297    @Override
298    public PartyContactMechanismPurposeDetails where(Field<Boolean> condition) {
299        return where(DSL.condition(condition));
300    }
301
302    /**
303     * Create an inline derived table from this table
304     */
305    @Override
306    @PlainSQL
307    public PartyContactMechanismPurposeDetails where(SQL condition) {
308        return where(DSL.condition(condition));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    @PlainSQL
316    public PartyContactMechanismPurposeDetails where(@Stringly.SQL String condition) {
317        return where(DSL.condition(condition));
318    }
319
320    /**
321     * Create an inline derived table from this table
322     */
323    @Override
324    @PlainSQL
325    public PartyContactMechanismPurposeDetails where(@Stringly.SQL String condition, Object... binds) {
326        return where(DSL.condition(condition, binds));
327    }
328
329    /**
330     * Create an inline derived table from this table
331     */
332    @Override
333    @PlainSQL
334    public PartyContactMechanismPurposeDetails where(@Stringly.SQL String condition, QueryPart... parts) {
335        return where(DSL.condition(condition, parts));
336    }
337
338    /**
339     * Create an inline derived table from this table
340     */
341    @Override
342    public PartyContactMechanismPurposeDetails whereExists(TableLike<?> select) {
343        return where(DSL.exists(select));
344    }
345
346    /**
347     * Create an inline derived table from this table
348     */
349    @Override
350    public PartyContactMechanismPurposeDetails whereNotExists(TableLike<?> select) {
351        return where(DSL.notExists(select));
352    }
353}