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.ContactMechanismPurposeDescriptionPK;
008import com.echothree.model.data.contact.common.pk.ContactMechanismPurposePK;
009import com.echothree.model.data.party.common.pk.LanguagePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.contact.ContactMechanismPurposes.ContactMechanismPurposesPath;
012import com.echothree.model.jooq.server.tables.party.Languages.LanguagesPath;
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 ContactMechanismPurposeDescriptions extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of
048     * <code>contactmechanismpurposedescriptions</code>
049     */
050    public static final ContactMechanismPurposeDescriptions ContactMechanismPurposeDescriptions = new ContactMechanismPurposeDescriptions();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions> getRecordType() {
057        return com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions.class;
058    }
059
060    /**
061     * The column
062     * <code>contactmechanismpurposedescriptions.cmprd_contactmechanismpurposedescriptionid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions, ContactMechanismPurposeDescriptionPK> CONTACT_MECHANISM_PURPOSE_DESCRIPTION = createField(DSL.name("cmprd_contactmechanismpurposedescriptionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPurposeDescriptionPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPurposeDescriptionPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column
068     * <code>contactmechanismpurposedescriptions.cmprd_cmpr_contactmechanismpurposeid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions, ContactMechanismPurposePK> CONTACT_MECHANISM_PURPOSE = createField(DSL.name("cmprd_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()));
071
072    /**
073     * The column
074     * <code>contactmechanismpurposedescriptions.cmprd_lang_languageid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions, LanguagePK> LANGUAGE = createField(DSL.name("cmprd_lang_languageid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LanguagePK.class, id -> new com.echothree.model.data.party.common.pk.LanguagePK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column
080     * <code>contactmechanismpurposedescriptions.cmprd_description</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions, String> DESCRIPTION = createField(DSL.name("cmprd_description"), SQLDataType.VARCHAR(132).nullable(false), this, "");
083
084    private ContactMechanismPurposeDescriptions(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions> aliased) {
085        this(alias, aliased, (Field<?>[]) null, null);
086    }
087
088    private ContactMechanismPurposeDescriptions(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions> aliased, Field<?>[] parameters, Condition where) {
089        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
090    }
091
092    /**
093     * Create an aliased <code>contactmechanismpurposedescriptions</code> table
094     * reference
095     */
096    public ContactMechanismPurposeDescriptions(String alias) {
097        this(DSL.name(alias), ContactMechanismPurposeDescriptions);
098    }
099
100    /**
101     * Create an aliased <code>contactmechanismpurposedescriptions</code> table
102     * reference
103     */
104    public ContactMechanismPurposeDescriptions(Name alias) {
105        this(alias, ContactMechanismPurposeDescriptions);
106    }
107
108    /**
109     * Create a <code>contactmechanismpurposedescriptions</code> table reference
110     */
111    public ContactMechanismPurposeDescriptions() {
112        this(DSL.name("contactmechanismpurposedescriptions"), null);
113    }
114
115    @Override
116    public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions> getPrimaryKey() {
117        return KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_PK;
118    }
119
120    @Override
121    public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions>> getUniqueKeys() {
122        return Arrays.asList(KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_CONTACT_MECHANISM_PURPOSE_AND_LANGUAGE_UK);
123    }
124
125    @Override
126    public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactMechanismPurposeDescriptions, ?>> getReferences() {
127        return Arrays.asList(KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_CONTACT_MECHANISM_PURPOSE_FK, KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_LANGUAGE_FK);
128    }
129
130    private transient ContactMechanismPurposesPath _cmprd_cmpr_contactmechanismpurposeid_fk;
131
132    /**
133     * Get the implicit join path to the <code>contactmechanismpurposes</code>
134     * table.
135     */
136    public ContactMechanismPurposesPath cmprd_cmpr_contactmechanismpurposeid_fk() {
137        if (_cmprd_cmpr_contactmechanismpurposeid_fk == null)
138            _cmprd_cmpr_contactmechanismpurposeid_fk = new ContactMechanismPurposesPath(this, KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_CONTACT_MECHANISM_PURPOSE_FK, null);
139
140        return _cmprd_cmpr_contactmechanismpurposeid_fk;
141    }
142
143    private transient LanguagesPath _cmprd_lang_languageid_fk;
144
145    /**
146     * Get the implicit join path to the <code>languages</code> table.
147     */
148    public LanguagesPath cmprd_lang_languageid_fk() {
149        if (_cmprd_lang_languageid_fk == null)
150            _cmprd_lang_languageid_fk = new LanguagesPath(this, KeyRegistry.CONTACT_MECHANISM_PURPOSE_DESCRIPTIONS_LANGUAGE_FK, null);
151
152        return _cmprd_lang_languageid_fk;
153    }
154
155    @Override
156    public ContactMechanismPurposeDescriptions as(String alias) {
157        return new ContactMechanismPurposeDescriptions(DSL.name(alias), this);
158    }
159
160    @Override
161    public ContactMechanismPurposeDescriptions as(Name alias) {
162        return new ContactMechanismPurposeDescriptions(alias, this);
163    }
164
165    @Override
166    public ContactMechanismPurposeDescriptions as(Table<?> alias) {
167        return new ContactMechanismPurposeDescriptions(alias.getQualifiedName(), this);
168    }
169
170    /**
171     * Rename this table
172     */
173    @Override
174    public ContactMechanismPurposeDescriptions rename(String name) {
175        return new ContactMechanismPurposeDescriptions(DSL.name(name), null);
176    }
177
178    /**
179     * Rename this table
180     */
181    @Override
182    public ContactMechanismPurposeDescriptions rename(Name name) {
183        return new ContactMechanismPurposeDescriptions(name, null);
184    }
185
186    /**
187     * Rename this table
188     */
189    @Override
190    public ContactMechanismPurposeDescriptions rename(Table<?> name) {
191        return new ContactMechanismPurposeDescriptions(name.getQualifiedName(), null);
192    }
193
194    /**
195     * Create an inline derived table from this table
196     */
197    @Override
198    public ContactMechanismPurposeDescriptions where(Condition condition) {
199        return new ContactMechanismPurposeDescriptions(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
200    }
201
202    /**
203     * Create an inline derived table from this table
204     */
205    @Override
206    public ContactMechanismPurposeDescriptions where(Collection<? extends Condition> conditions) {
207        return where(DSL.and(conditions));
208    }
209
210    /**
211     * Create an inline derived table from this table
212     */
213    @Override
214    public ContactMechanismPurposeDescriptions where(Condition... conditions) {
215        return where(DSL.and(conditions));
216    }
217
218    /**
219     * Create an inline derived table from this table
220     */
221    @Override
222    public ContactMechanismPurposeDescriptions where(Field<Boolean> condition) {
223        return where(DSL.condition(condition));
224    }
225
226    /**
227     * Create an inline derived table from this table
228     */
229    @Override
230    @PlainSQL
231    public ContactMechanismPurposeDescriptions where(SQL condition) {
232        return where(DSL.condition(condition));
233    }
234
235    /**
236     * Create an inline derived table from this table
237     */
238    @Override
239    @PlainSQL
240    public ContactMechanismPurposeDescriptions where(@Stringly.SQL String condition) {
241        return where(DSL.condition(condition));
242    }
243
244    /**
245     * Create an inline derived table from this table
246     */
247    @Override
248    @PlainSQL
249    public ContactMechanismPurposeDescriptions where(@Stringly.SQL String condition, Object... binds) {
250        return where(DSL.condition(condition, binds));
251    }
252
253    /**
254     * Create an inline derived table from this table
255     */
256    @Override
257    @PlainSQL
258    public ContactMechanismPurposeDescriptions where(@Stringly.SQL String condition, QueryPart... parts) {
259        return where(DSL.condition(condition, parts));
260    }
261
262    /**
263     * Create an inline derived table from this table
264     */
265    @Override
266    public ContactMechanismPurposeDescriptions whereExists(TableLike<?> select) {
267        return where(DSL.exists(select));
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    public ContactMechanismPurposeDescriptions whereNotExists(TableLike<?> select) {
275        return where(DSL.notExists(select));
276    }
277}