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