001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.contactlist;
005
006
007import com.echothree.model.data.contactlist.common.pk.ContactListContactMechanismPurposeDetailPK;
008import com.echothree.model.data.contactlist.common.pk.ContactListContactMechanismPurposePK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.contactlist.ContactListContactMechanismPurposeDetails.ContactListContactMechanismPurposeDetailsPath;
011
012import java.util.Arrays;
013import java.util.Collection;
014import java.util.List;
015
016import org.jooq.Condition;
017import org.jooq.Converter;
018import org.jooq.Field;
019import org.jooq.ForeignKey;
020import org.jooq.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class ContactListContactMechanismPurposes extends TableImpl<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of
049     * <code>contactlistcontactmechanismpurposes</code>
050     */
051    public static final ContactListContactMechanismPurposes ContactListContactMechanismPurposes = new ContactListContactMechanismPurposes();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> getRecordType() {
058        return com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes.class;
059    }
060
061    /**
062     * The column
063     * <code>contactlistcontactmechanismpurposes.clstcmpr_contactlistcontactmechanismpurposeid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes, ContactListContactMechanismPurposePK> CONTACT_LIST_CONTACT_MECHANISM_PURPOSE = createField(DSL.name("clstcmpr_contactlistcontactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactListContactMechanismPurposePK.class, id -> new com.echothree.model.data.contactlist.common.pk.ContactListContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>contactlistcontactmechanismpurposes.clstcmpr_activedetailid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes, ContactListContactMechanismPurposeDetailPK> ACTIVE_DETAIL = createField(DSL.name("clstcmpr_activedetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ContactListContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.contactlist.common.pk.ContactListContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column
075     * <code>contactlistcontactmechanismpurposes.clstcmpr_lastdetailid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes, ContactListContactMechanismPurposeDetailPK> LAST_DETAIL = createField(DSL.name("clstcmpr_lastdetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ContactListContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.contactlist.common.pk.ContactListContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
078
079    private ContactListContactMechanismPurposes(Name alias, Table<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> aliased) {
080        this(alias, aliased, (Field<?>[]) null, null);
081    }
082
083    private ContactListContactMechanismPurposes(Name alias, Table<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> aliased, Field<?>[] parameters, Condition where) {
084        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
085    }
086
087    /**
088     * Create an aliased <code>contactlistcontactmechanismpurposes</code> table
089     * reference
090     */
091    public ContactListContactMechanismPurposes(String alias) {
092        this(DSL.name(alias), ContactListContactMechanismPurposes);
093    }
094
095    /**
096     * Create an aliased <code>contactlistcontactmechanismpurposes</code> table
097     * reference
098     */
099    public ContactListContactMechanismPurposes(Name alias) {
100        this(alias, ContactListContactMechanismPurposes);
101    }
102
103    /**
104     * Create a <code>contactlistcontactmechanismpurposes</code> table reference
105     */
106    public ContactListContactMechanismPurposes() {
107        this(DSL.name("contactlistcontactmechanismpurposes"), null);
108    }
109
110    public <O extends Record> ContactListContactMechanismPurposes(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> parentPath) {
111        super(path, childPath, parentPath, ContactListContactMechanismPurposes);
112    }
113
114    /**
115     * A subtype implementing {@link Path} for simplified path-based joins.
116     */
117    public static class ContactListContactMechanismPurposesPath extends ContactListContactMechanismPurposes implements Path<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> {
118
119        private static final long serialVersionUID = 1L;
120        public <O extends Record> ContactListContactMechanismPurposesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> parentPath) {
121            super(path, childPath, parentPath);
122        }
123        private ContactListContactMechanismPurposesPath(Name alias, Table<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> aliased) {
124            super(alias, aliased);
125        }
126
127        @Override
128        public ContactListContactMechanismPurposesPath as(String alias) {
129            return new ContactListContactMechanismPurposesPath(DSL.name(alias), this);
130        }
131
132        @Override
133        public ContactListContactMechanismPurposesPath as(Name alias) {
134            return new ContactListContactMechanismPurposesPath(alias, this);
135        }
136
137        @Override
138        public ContactListContactMechanismPurposesPath as(Table<?> alias) {
139            return new ContactListContactMechanismPurposesPath(alias.getQualifiedName(), this);
140        }
141    }
142
143    @Override
144    public UniqueKey<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes> getPrimaryKey() {
145        return KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_PK;
146    }
147
148    @Override
149    public List<UniqueKey<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes>> getUniqueKeys() {
150        return Arrays.asList(KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_UK, KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_UK);
151    }
152
153    @Override
154    public List<ForeignKey<com.echothree.model.jooq.server.records.contactlist.ContactListContactMechanismPurposes, ?>> getReferences() {
155        return Arrays.asList(KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_FK, KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_FK);
156    }
157
158    private transient ContactListContactMechanismPurposeDetailsPath _clstcmpr_activedetailid_fk;
159
160    /**
161     * Get the implicit join path to the
162     * <code>contactlistcontactmechanismpurposedetails</code> table, via the
163     * <code>clstcmpr_activedetailid_fk</code> key.
164     */
165    public ContactListContactMechanismPurposeDetailsPath clstcmpr_activedetailid_fk() {
166        if (_clstcmpr_activedetailid_fk == null)
167            _clstcmpr_activedetailid_fk = new ContactListContactMechanismPurposeDetailsPath(this, KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_FK, null);
168
169        return _clstcmpr_activedetailid_fk;
170    }
171
172    private transient ContactListContactMechanismPurposeDetailsPath _clstcmpr_lastdetailid_fk;
173
174    /**
175     * Get the implicit join path to the
176     * <code>contactlistcontactmechanismpurposedetails</code> table, via the
177     * <code>clstcmpr_lastdetailid_fk</code> key.
178     */
179    public ContactListContactMechanismPurposeDetailsPath clstcmpr_lastdetailid_fk() {
180        if (_clstcmpr_lastdetailid_fk == null)
181            _clstcmpr_lastdetailid_fk = new ContactListContactMechanismPurposeDetailsPath(this, KeyRegistry.CONTACT_LIST_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_FK, null);
182
183        return _clstcmpr_lastdetailid_fk;
184    }
185
186    @Override
187    public ContactListContactMechanismPurposes as(String alias) {
188        return new ContactListContactMechanismPurposes(DSL.name(alias), this);
189    }
190
191    @Override
192    public ContactListContactMechanismPurposes as(Name alias) {
193        return new ContactListContactMechanismPurposes(alias, this);
194    }
195
196    @Override
197    public ContactListContactMechanismPurposes as(Table<?> alias) {
198        return new ContactListContactMechanismPurposes(alias.getQualifiedName(), this);
199    }
200
201    /**
202     * Rename this table
203     */
204    @Override
205    public ContactListContactMechanismPurposes rename(String name) {
206        return new ContactListContactMechanismPurposes(DSL.name(name), null);
207    }
208
209    /**
210     * Rename this table
211     */
212    @Override
213    public ContactListContactMechanismPurposes rename(Name name) {
214        return new ContactListContactMechanismPurposes(name, null);
215    }
216
217    /**
218     * Rename this table
219     */
220    @Override
221    public ContactListContactMechanismPurposes rename(Table<?> name) {
222        return new ContactListContactMechanismPurposes(name.getQualifiedName(), null);
223    }
224
225    /**
226     * Create an inline derived table from this table
227     */
228    @Override
229    public ContactListContactMechanismPurposes where(Condition condition) {
230        return new ContactListContactMechanismPurposes(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
231    }
232
233    /**
234     * Create an inline derived table from this table
235     */
236    @Override
237    public ContactListContactMechanismPurposes where(Collection<? extends Condition> conditions) {
238        return where(DSL.and(conditions));
239    }
240
241    /**
242     * Create an inline derived table from this table
243     */
244    @Override
245    public ContactListContactMechanismPurposes where(Condition... conditions) {
246        return where(DSL.and(conditions));
247    }
248
249    /**
250     * Create an inline derived table from this table
251     */
252    @Override
253    public ContactListContactMechanismPurposes where(Field<Boolean> condition) {
254        return where(DSL.condition(condition));
255    }
256
257    /**
258     * Create an inline derived table from this table
259     */
260    @Override
261    @PlainSQL
262    public ContactListContactMechanismPurposes where(SQL condition) {
263        return where(DSL.condition(condition));
264    }
265
266    /**
267     * Create an inline derived table from this table
268     */
269    @Override
270    @PlainSQL
271    public ContactListContactMechanismPurposes where(@Stringly.SQL String condition) {
272        return where(DSL.condition(condition));
273    }
274
275    /**
276     * Create an inline derived table from this table
277     */
278    @Override
279    @PlainSQL
280    public ContactListContactMechanismPurposes where(@Stringly.SQL String condition, Object... binds) {
281        return where(DSL.condition(condition, binds));
282    }
283
284    /**
285     * Create an inline derived table from this table
286     */
287    @Override
288    @PlainSQL
289    public ContactListContactMechanismPurposes where(@Stringly.SQL String condition, QueryPart... parts) {
290        return where(DSL.condition(condition, parts));
291    }
292
293    /**
294     * Create an inline derived table from this table
295     */
296    @Override
297    public ContactListContactMechanismPurposes whereExists(TableLike<?> select) {
298        return where(DSL.exists(select));
299    }
300
301    /**
302     * Create an inline derived table from this table
303     */
304    @Override
305    public ContactListContactMechanismPurposes whereNotExists(TableLike<?> select) {
306        return where(DSL.notExists(select));
307    }
308}