001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.communication;
005
006
007import com.echothree.model.data.communication.common.pk.CommunicationEventDetailPK;
008import com.echothree.model.data.communication.common.pk.CommunicationEventPK;
009import com.echothree.model.data.communication.common.pk.CommunicationEventPurposePK;
010import com.echothree.model.data.communication.common.pk.CommunicationEventTypePK;
011import com.echothree.model.data.communication.common.pk.CommunicationSourcePK;
012import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK;
013import com.echothree.model.data.document.common.pk.DocumentPK;
014import com.echothree.model.jooq.server.KeyRegistry;
015import com.echothree.model.jooq.server.tables.communication.CommunicationEventPurposes.CommunicationEventPurposesPath;
016import com.echothree.model.jooq.server.tables.communication.CommunicationEventTypes.CommunicationEventTypesPath;
017import com.echothree.model.jooq.server.tables.communication.CommunicationEvents.CommunicationEventsPath;
018import com.echothree.model.jooq.server.tables.communication.CommunicationSources.CommunicationSourcesPath;
019import com.echothree.model.jooq.server.tables.contact.PartyContactMechanisms.PartyContactMechanismsPath;
020import com.echothree.model.jooq.server.tables.document.Documents.DocumentsPath;
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 CommunicationEventDetails extends TableImpl<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> {
054
055    private static final long serialVersionUID = 1L;
056
057    /**
058     * The reference instance of <code>communicationeventdetails</code>
059     */
060    public static final CommunicationEventDetails CommunicationEventDetails = new CommunicationEventDetails();
061
062    /**
063     * The class holding records for this type
064     */
065    @Override
066    public Class<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> getRecordType() {
067        return com.echothree.model.jooq.server.records.communication.CommunicationEventDetails.class;
068    }
069
070    /**
071     * The column
072     * <code>communicationeventdetails.cmmnevdt_communicationeventdetailid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventDetailPK> COMMUNICATION_EVENT_DETAIL = createField(DSL.name("cmmnevdt_communicationeventdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventDetailPK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventDetailPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column
078     * <code>communicationeventdetails.cmmnevdt_cmmnev_communicationeventid</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventPK> COMMUNICATION_EVENT = createField(DSL.name("cmmnevdt_cmmnev_communicationeventid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventPK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventPK(id), primaryKey -> primaryKey.getEntityId()));
081
082    /**
083     * The column
084     * <code>communicationeventdetails.cmmnevdt_communicationeventname</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, String> COMMUNICATION_EVENT_NAME = createField(DSL.name("cmmnevdt_communicationeventname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
087
088    /**
089     * The column
090     * <code>communicationeventdetails.cmmnevdt_cmmnevtyp_communicationeventtypeid</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventTypePK> COMMUNICATION_EVENT_TYPE = createField(DSL.name("cmmnevdt_cmmnevtyp_communicationeventtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventTypePK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventTypePK(id), primaryKey -> primaryKey.getEntityId()));
093
094    /**
095     * The column
096     * <code>communicationeventdetails.cmmnevdt_cmmnsrc_communicationsourceid</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationSourcePK> COMMUNICATION_SOURCE = createField(DSL.name("cmmnevdt_cmmnsrc_communicationsourceid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CommunicationSourcePK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationSourcePK(id), primaryKey -> primaryKey.getEntityId()));
099
100    /**
101     * The column
102     * <code>communicationeventdetails.cmmnevdt_cmmnevpr_communicationeventpurposeid</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventPurposePK> COMMUNICATION_EVENT_PURPOSE = createField(DSL.name("cmmnevdt_cmmnevpr_communicationeventpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventPurposePK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventPurposePK(id), primaryKey -> primaryKey.getEntityId()));
105
106    /**
107     * The column
108     * <code>communicationeventdetails.cmmnevdt_originalcommunicationeventid</code>.
109     */
110    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventPK> ORIGINAL_COMMUNICATION_EVENT = createField(DSL.name("cmmnevdt_originalcommunicationeventid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CommunicationEventPK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventPK(id), primaryKey -> primaryKey.getEntityId()));
111
112    /**
113     * The column
114     * <code>communicationeventdetails.cmmnevdt_parentcommunicationeventid</code>.
115     */
116    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, CommunicationEventPK> PARENT_COMMUNICATION_EVENT = createField(DSL.name("cmmnevdt_parentcommunicationeventid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CommunicationEventPK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventPK(id), primaryKey -> primaryKey.getEntityId()));
117
118    /**
119     * The column
120     * <code>communicationeventdetails.cmmnevdt_pcm_partycontactmechanismid</code>.
121     */
122    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, PartyContactMechanismPK> PARTY_CONTACT_MECHANISM = createField(DSL.name("cmmnevdt_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()));
123
124    /**
125     * The column
126     * <code>communicationeventdetails.cmmnevdt_dcmnt_documentid</code>.
127     */
128    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, DocumentPK> DOCUMENT = createField(DSL.name("cmmnevdt_dcmnt_documentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, DocumentPK.class, id -> new com.echothree.model.data.document.common.pk.DocumentPK(id), primaryKey -> primaryKey.getEntityId()));
129
130    /**
131     * The column <code>communicationeventdetails.cmmnevdt_fromtime</code>.
132     */
133    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, Long> FROM_TIME = createField(DSL.name("cmmnevdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
134
135    /**
136     * The column <code>communicationeventdetails.cmmnevdt_thrutime</code>.
137     */
138    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, Long> THRU_TIME = createField(DSL.name("cmmnevdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
139
140    private CommunicationEventDetails(Name alias, Table<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> aliased) {
141        this(alias, aliased, (Field<?>[]) null, null);
142    }
143
144    private CommunicationEventDetails(Name alias, Table<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> aliased, Field<?>[] parameters, Condition where) {
145        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
146    }
147
148    /**
149     * Create an aliased <code>communicationeventdetails</code> table reference
150     */
151    public CommunicationEventDetails(String alias) {
152        this(DSL.name(alias), CommunicationEventDetails);
153    }
154
155    /**
156     * Create an aliased <code>communicationeventdetails</code> table reference
157     */
158    public CommunicationEventDetails(Name alias) {
159        this(alias, CommunicationEventDetails);
160    }
161
162    /**
163     * Create a <code>communicationeventdetails</code> table reference
164     */
165    public CommunicationEventDetails() {
166        this(DSL.name("communicationeventdetails"), null);
167    }
168
169    public <O extends Record> CommunicationEventDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> parentPath) {
170        super(path, childPath, parentPath, CommunicationEventDetails);
171    }
172
173    /**
174     * A subtype implementing {@link Path} for simplified path-based joins.
175     */
176    public static class CommunicationEventDetailsPath extends CommunicationEventDetails implements Path<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> {
177
178        private static final long serialVersionUID = 1L;
179        public <O extends Record> CommunicationEventDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> parentPath) {
180            super(path, childPath, parentPath);
181        }
182        private CommunicationEventDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> aliased) {
183            super(alias, aliased);
184        }
185
186        @Override
187        public CommunicationEventDetailsPath as(String alias) {
188            return new CommunicationEventDetailsPath(DSL.name(alias), this);
189        }
190
191        @Override
192        public CommunicationEventDetailsPath as(Name alias) {
193            return new CommunicationEventDetailsPath(alias, this);
194        }
195
196        @Override
197        public CommunicationEventDetailsPath as(Table<?> alias) {
198            return new CommunicationEventDetailsPath(alias.getQualifiedName(), this);
199        }
200    }
201
202    @Override
203    public UniqueKey<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails> getPrimaryKey() {
204        return KeyRegistry.COMMUNICATION_EVENT_DETAILS_PK;
205    }
206
207    @Override
208    public List<UniqueKey<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails>> getUniqueKeys() {
209        return Arrays.asList(KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_AND_THRU_TIME_UK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_NAME_AND_THRU_TIME_UK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_DOCUMENT_AND_THRU_TIME_UK);
210    }
211
212    @Override
213    public List<ForeignKey<com.echothree.model.jooq.server.records.communication.CommunicationEventDetails, ?>> getReferences() {
214        return Arrays.asList(KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_PURPOSE_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_TYPE_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_SOURCE_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_DOCUMENT_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_ORIGINAL_COMMUNICATION_EVENT_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_PARENT_COMMUNICATION_EVENT_FK, KeyRegistry.COMMUNICATION_EVENT_DETAILS_PARTY_CONTACT_MECHANISM_FK);
215    }
216
217    private transient CommunicationEventsPath _cmmnevdt_cmmnev_communicationeventid_fk;
218
219    /**
220     * Get the implicit join path to the <code>communicationevents</code> table,
221     * via the <code>cmmnevdt_cmmnev_communicationeventid_fk</code> key.
222     */
223    public CommunicationEventsPath cmmnevdt_cmmnev_communicationeventid_fk() {
224        if (_cmmnevdt_cmmnev_communicationeventid_fk == null)
225            _cmmnevdt_cmmnev_communicationeventid_fk = new CommunicationEventsPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_FK, null);
226
227        return _cmmnevdt_cmmnev_communicationeventid_fk;
228    }
229
230    private transient CommunicationEventPurposesPath _cmmnevdt_cmmnevpr_communicationeventpurposeid_fk;
231
232    /**
233     * Get the implicit join path to the <code>communicationeventpurposes</code>
234     * table.
235     */
236    public CommunicationEventPurposesPath cmmnevdt_cmmnevpr_communicationeventpurposeid_fk() {
237        if (_cmmnevdt_cmmnevpr_communicationeventpurposeid_fk == null)
238            _cmmnevdt_cmmnevpr_communicationeventpurposeid_fk = new CommunicationEventPurposesPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_PURPOSE_FK, null);
239
240        return _cmmnevdt_cmmnevpr_communicationeventpurposeid_fk;
241    }
242
243    private transient CommunicationEventTypesPath _cmmnevdt_cmmnevtyp_communicationeventtypeid_fk;
244
245    /**
246     * Get the implicit join path to the <code>communicationeventtypes</code>
247     * table.
248     */
249    public CommunicationEventTypesPath cmmnevdt_cmmnevtyp_communicationeventtypeid_fk() {
250        if (_cmmnevdt_cmmnevtyp_communicationeventtypeid_fk == null)
251            _cmmnevdt_cmmnevtyp_communicationeventtypeid_fk = new CommunicationEventTypesPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_EVENT_TYPE_FK, null);
252
253        return _cmmnevdt_cmmnevtyp_communicationeventtypeid_fk;
254    }
255
256    private transient CommunicationSourcesPath _cmmnevdt_cmmnsrc_communicationsourceid_fk;
257
258    /**
259     * Get the implicit join path to the <code>communicationsources</code>
260     * table.
261     */
262    public CommunicationSourcesPath cmmnevdt_cmmnsrc_communicationsourceid_fk() {
263        if (_cmmnevdt_cmmnsrc_communicationsourceid_fk == null)
264            _cmmnevdt_cmmnsrc_communicationsourceid_fk = new CommunicationSourcesPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_COMMUNICATION_SOURCE_FK, null);
265
266        return _cmmnevdt_cmmnsrc_communicationsourceid_fk;
267    }
268
269    private transient DocumentsPath _cmmnevdt_dcmnt_documentid_fk;
270
271    /**
272     * Get the implicit join path to the <code>documents</code> table.
273     */
274    public DocumentsPath cmmnevdt_dcmnt_documentid_fk() {
275        if (_cmmnevdt_dcmnt_documentid_fk == null)
276            _cmmnevdt_dcmnt_documentid_fk = new DocumentsPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_DOCUMENT_FK, null);
277
278        return _cmmnevdt_dcmnt_documentid_fk;
279    }
280
281    private transient CommunicationEventsPath _cmmnevdt_originalcommunicationeventid_fk;
282
283    /**
284     * Get the implicit join path to the <code>communicationevents</code> table,
285     * via the <code>cmmnevdt_originalcommunicationeventid_fk</code> key.
286     */
287    public CommunicationEventsPath cmmnevdt_originalcommunicationeventid_fk() {
288        if (_cmmnevdt_originalcommunicationeventid_fk == null)
289            _cmmnevdt_originalcommunicationeventid_fk = new CommunicationEventsPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_ORIGINAL_COMMUNICATION_EVENT_FK, null);
290
291        return _cmmnevdt_originalcommunicationeventid_fk;
292    }
293
294    private transient CommunicationEventsPath _cmmnevdt_parentcommunicationeventid_fk;
295
296    /**
297     * Get the implicit join path to the <code>communicationevents</code> table,
298     * via the <code>cmmnevdt_parentcommunicationeventid_fk</code> key.
299     */
300    public CommunicationEventsPath cmmnevdt_parentcommunicationeventid_fk() {
301        if (_cmmnevdt_parentcommunicationeventid_fk == null)
302            _cmmnevdt_parentcommunicationeventid_fk = new CommunicationEventsPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_PARENT_COMMUNICATION_EVENT_FK, null);
303
304        return _cmmnevdt_parentcommunicationeventid_fk;
305    }
306
307    private transient PartyContactMechanismsPath _cmmnevdt_pcm_partycontactmechanismid_fk;
308
309    /**
310     * Get the implicit join path to the <code>partycontactmechanisms</code>
311     * table.
312     */
313    public PartyContactMechanismsPath cmmnevdt_pcm_partycontactmechanismid_fk() {
314        if (_cmmnevdt_pcm_partycontactmechanismid_fk == null)
315            _cmmnevdt_pcm_partycontactmechanismid_fk = new PartyContactMechanismsPath(this, KeyRegistry.COMMUNICATION_EVENT_DETAILS_PARTY_CONTACT_MECHANISM_FK, null);
316
317        return _cmmnevdt_pcm_partycontactmechanismid_fk;
318    }
319
320    @Override
321    public CommunicationEventDetails as(String alias) {
322        return new CommunicationEventDetails(DSL.name(alias), this);
323    }
324
325    @Override
326    public CommunicationEventDetails as(Name alias) {
327        return new CommunicationEventDetails(alias, this);
328    }
329
330    @Override
331    public CommunicationEventDetails as(Table<?> alias) {
332        return new CommunicationEventDetails(alias.getQualifiedName(), this);
333    }
334
335    /**
336     * Rename this table
337     */
338    @Override
339    public CommunicationEventDetails rename(String name) {
340        return new CommunicationEventDetails(DSL.name(name), null);
341    }
342
343    /**
344     * Rename this table
345     */
346    @Override
347    public CommunicationEventDetails rename(Name name) {
348        return new CommunicationEventDetails(name, null);
349    }
350
351    /**
352     * Rename this table
353     */
354    @Override
355    public CommunicationEventDetails rename(Table<?> name) {
356        return new CommunicationEventDetails(name.getQualifiedName(), null);
357    }
358
359    /**
360     * Create an inline derived table from this table
361     */
362    @Override
363    public CommunicationEventDetails where(Condition condition) {
364        return new CommunicationEventDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
365    }
366
367    /**
368     * Create an inline derived table from this table
369     */
370    @Override
371    public CommunicationEventDetails where(Collection<? extends Condition> conditions) {
372        return where(DSL.and(conditions));
373    }
374
375    /**
376     * Create an inline derived table from this table
377     */
378    @Override
379    public CommunicationEventDetails where(Condition... conditions) {
380        return where(DSL.and(conditions));
381    }
382
383    /**
384     * Create an inline derived table from this table
385     */
386    @Override
387    public CommunicationEventDetails where(Field<Boolean> condition) {
388        return where(DSL.condition(condition));
389    }
390
391    /**
392     * Create an inline derived table from this table
393     */
394    @Override
395    @PlainSQL
396    public CommunicationEventDetails where(SQL condition) {
397        return where(DSL.condition(condition));
398    }
399
400    /**
401     * Create an inline derived table from this table
402     */
403    @Override
404    @PlainSQL
405    public CommunicationEventDetails where(@Stringly.SQL String condition) {
406        return where(DSL.condition(condition));
407    }
408
409    /**
410     * Create an inline derived table from this table
411     */
412    @Override
413    @PlainSQL
414    public CommunicationEventDetails where(@Stringly.SQL String condition, Object... binds) {
415        return where(DSL.condition(condition, binds));
416    }
417
418    /**
419     * Create an inline derived table from this table
420     */
421    @Override
422    @PlainSQL
423    public CommunicationEventDetails where(@Stringly.SQL String condition, QueryPart... parts) {
424        return where(DSL.condition(condition, parts));
425    }
426
427    /**
428     * Create an inline derived table from this table
429     */
430    @Override
431    public CommunicationEventDetails whereExists(TableLike<?> select) {
432        return where(DSL.exists(select));
433    }
434
435    /**
436     * Create an inline derived table from this table
437     */
438    @Override
439    public CommunicationEventDetails whereNotExists(TableLike<?> select) {
440        return where(DSL.notExists(select));
441    }
442}