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.CommunicationEventPK;
008import com.echothree.model.data.communication.common.pk.CommunicationEventRolePK;
009import com.echothree.model.data.communication.common.pk.CommunicationEventRoleTypePK;
010import com.echothree.model.data.party.common.pk.PartyPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.communication.CommunicationEventRoleTypes.CommunicationEventRoleTypesPath;
013import com.echothree.model.jooq.server.tables.communication.CommunicationEvents.CommunicationEventsPath;
014import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
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 CommunicationEventRoles extends TableImpl<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>communicationeventroles</code>
050     */
051    public static final CommunicationEventRoles CommunicationEventRoles = new CommunicationEventRoles();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles> getRecordType() {
058        return com.echothree.model.jooq.server.records.communication.CommunicationEventRoles.class;
059    }
060
061    /**
062     * The column
063     * <code>communicationeventroles.cmmnevr_communicationeventroleid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, CommunicationEventRolePK> COMMUNICATION_EVENT_ROLE = createField(DSL.name("cmmnevr_communicationeventroleid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventRolePK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventRolePK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>communicationeventroles.cmmnevr_cmmnev_communicationeventid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, CommunicationEventPK> COMMUNICATION_EVENT = createField(DSL.name("cmmnevr_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()));
072
073    /**
074     * The column <code>communicationeventroles.cmmnevr_par_partyid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, PartyPK> PARTY = createField(DSL.name("cmmnevr_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()));
077
078    /**
079     * The column
080     * <code>communicationeventroles.cmmnevr_cmmnevrtyp_communicationeventroletypeid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, CommunicationEventRoleTypePK> COMMUNICATION_EVENT_ROLE_TYPE = createField(DSL.name("cmmnevr_cmmnevrtyp_communicationeventroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommunicationEventRoleTypePK.class, id -> new com.echothree.model.data.communication.common.pk.CommunicationEventRoleTypePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column <code>communicationeventroles.cmmnevr_fromtime</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, Long> FROM_TIME = createField(DSL.name("cmmnevr_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
088
089    /**
090     * The column <code>communicationeventroles.cmmnevr_thrutime</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, Long> THRU_TIME = createField(DSL.name("cmmnevr_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
093
094    private CommunicationEventRoles(Name alias, Table<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles> aliased) {
095        this(alias, aliased, (Field<?>[]) null, null);
096    }
097
098    private CommunicationEventRoles(Name alias, Table<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles> aliased, Field<?>[] parameters, Condition where) {
099        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
100    }
101
102    /**
103     * Create an aliased <code>communicationeventroles</code> table reference
104     */
105    public CommunicationEventRoles(String alias) {
106        this(DSL.name(alias), CommunicationEventRoles);
107    }
108
109    /**
110     * Create an aliased <code>communicationeventroles</code> table reference
111     */
112    public CommunicationEventRoles(Name alias) {
113        this(alias, CommunicationEventRoles);
114    }
115
116    /**
117     * Create a <code>communicationeventroles</code> table reference
118     */
119    public CommunicationEventRoles() {
120        this(DSL.name("communicationeventroles"), null);
121    }
122
123    @Override
124    public UniqueKey<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles> getPrimaryKey() {
125        return KeyRegistry.COMMUNICATION_EVENT_ROLES_PK;
126    }
127
128    @Override
129    public List<UniqueKey<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles>> getUniqueKeys() {
130        return Arrays.asList(KeyRegistry.COMMUNICATION_EVENT_ROLES_COMMUNICATION_EVENT_AND_PARTY_AND_COMMUNICATION_EVENT_ROLE_TYPE_AND_THRU_TIME_UK);
131    }
132
133    @Override
134    public List<ForeignKey<com.echothree.model.jooq.server.records.communication.CommunicationEventRoles, ?>> getReferences() {
135        return Arrays.asList(KeyRegistry.COMMUNICATION_EVENT_ROLES_COMMUNICATION_EVENT_FK, KeyRegistry.COMMUNICATION_EVENT_ROLES_COMMUNICATION_EVENT_ROLE_TYPE_FK, KeyRegistry.COMMUNICATION_EVENT_ROLES_PARTY_FK);
136    }
137
138    private transient CommunicationEventsPath _cmmnevr_cmmnev_communicationeventid_fk;
139
140    /**
141     * Get the implicit join path to the <code>communicationevents</code> table.
142     */
143    public CommunicationEventsPath cmmnevr_cmmnev_communicationeventid_fk() {
144        if (_cmmnevr_cmmnev_communicationeventid_fk == null)
145            _cmmnevr_cmmnev_communicationeventid_fk = new CommunicationEventsPath(this, KeyRegistry.COMMUNICATION_EVENT_ROLES_COMMUNICATION_EVENT_FK, null);
146
147        return _cmmnevr_cmmnev_communicationeventid_fk;
148    }
149
150    private transient CommunicationEventRoleTypesPath _cmmnevr_cmmnevrtyp_communicationeventroletypeid_fk;
151
152    /**
153     * Get the implicit join path to the
154     * <code>communicationeventroletypes</code> table.
155     */
156    public CommunicationEventRoleTypesPath cmmnevr_cmmnevrtyp_communicationeventroletypeid_fk() {
157        if (_cmmnevr_cmmnevrtyp_communicationeventroletypeid_fk == null)
158            _cmmnevr_cmmnevrtyp_communicationeventroletypeid_fk = new CommunicationEventRoleTypesPath(this, KeyRegistry.COMMUNICATION_EVENT_ROLES_COMMUNICATION_EVENT_ROLE_TYPE_FK, null);
159
160        return _cmmnevr_cmmnevrtyp_communicationeventroletypeid_fk;
161    }
162
163    private transient PartiesPath _cmmnevr_par_partyid_fk;
164
165    /**
166     * Get the implicit join path to the <code>parties</code> table.
167     */
168    public PartiesPath cmmnevr_par_partyid_fk() {
169        if (_cmmnevr_par_partyid_fk == null)
170            _cmmnevr_par_partyid_fk = new PartiesPath(this, KeyRegistry.COMMUNICATION_EVENT_ROLES_PARTY_FK, null);
171
172        return _cmmnevr_par_partyid_fk;
173    }
174
175    @Override
176    public CommunicationEventRoles as(String alias) {
177        return new CommunicationEventRoles(DSL.name(alias), this);
178    }
179
180    @Override
181    public CommunicationEventRoles as(Name alias) {
182        return new CommunicationEventRoles(alias, this);
183    }
184
185    @Override
186    public CommunicationEventRoles as(Table<?> alias) {
187        return new CommunicationEventRoles(alias.getQualifiedName(), this);
188    }
189
190    /**
191     * Rename this table
192     */
193    @Override
194    public CommunicationEventRoles rename(String name) {
195        return new CommunicationEventRoles(DSL.name(name), null);
196    }
197
198    /**
199     * Rename this table
200     */
201    @Override
202    public CommunicationEventRoles rename(Name name) {
203        return new CommunicationEventRoles(name, null);
204    }
205
206    /**
207     * Rename this table
208     */
209    @Override
210    public CommunicationEventRoles rename(Table<?> name) {
211        return new CommunicationEventRoles(name.getQualifiedName(), null);
212    }
213
214    /**
215     * Create an inline derived table from this table
216     */
217    @Override
218    public CommunicationEventRoles where(Condition condition) {
219        return new CommunicationEventRoles(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
220    }
221
222    /**
223     * Create an inline derived table from this table
224     */
225    @Override
226    public CommunicationEventRoles where(Collection<? extends Condition> conditions) {
227        return where(DSL.and(conditions));
228    }
229
230    /**
231     * Create an inline derived table from this table
232     */
233    @Override
234    public CommunicationEventRoles where(Condition... conditions) {
235        return where(DSL.and(conditions));
236    }
237
238    /**
239     * Create an inline derived table from this table
240     */
241    @Override
242    public CommunicationEventRoles where(Field<Boolean> condition) {
243        return where(DSL.condition(condition));
244    }
245
246    /**
247     * Create an inline derived table from this table
248     */
249    @Override
250    @PlainSQL
251    public CommunicationEventRoles where(SQL condition) {
252        return where(DSL.condition(condition));
253    }
254
255    /**
256     * Create an inline derived table from this table
257     */
258    @Override
259    @PlainSQL
260    public CommunicationEventRoles where(@Stringly.SQL String condition) {
261        return where(DSL.condition(condition));
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    @PlainSQL
269    public CommunicationEventRoles where(@Stringly.SQL String condition, Object... binds) {
270        return where(DSL.condition(condition, binds));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    @PlainSQL
278    public CommunicationEventRoles where(@Stringly.SQL String condition, QueryPart... parts) {
279        return where(DSL.condition(condition, parts));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    public CommunicationEventRoles whereExists(TableLike<?> select) {
287        return where(DSL.exists(select));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    public CommunicationEventRoles whereNotExists(TableLike<?> select) {
295        return where(DSL.notExists(select));
296    }
297}