001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.letter;
005
006
007import com.echothree.model.data.contact.common.pk.ContactMechanismPurposePK;
008import com.echothree.model.data.letter.common.pk.LetterContactMechanismPurposeDetailPK;
009import com.echothree.model.data.letter.common.pk.LetterContactMechanismPurposePK;
010import com.echothree.model.data.letter.common.pk.LetterPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.contact.ContactMechanismPurposes.ContactMechanismPurposesPath;
013import com.echothree.model.jooq.server.tables.letter.LetterContactMechanismPurposes.LetterContactMechanismPurposesPath;
014import com.echothree.model.jooq.server.tables.letter.Letters.LettersPath;
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.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class LetterContactMechanismPurposeDetails extends TableImpl<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of
053     * <code>lettercontactmechanismpurposedetails</code>
054     */
055    public static final LetterContactMechanismPurposeDetails LetterContactMechanismPurposeDetails = new LetterContactMechanismPurposeDetails();
056
057    /**
058     * The class holding records for this type
059     */
060    @Override
061    public Class<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> getRecordType() {
062        return com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails.class;
063    }
064
065    /**
066     * The column
067     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_lettercontactmechanismpurposedetailid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, LetterContactMechanismPurposeDetailPK> LETTER_CONTACT_MECHANISM_PURPOSE_DETAIL = createField(DSL.name("lttrcmprdt_lettercontactmechanismpurposedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LetterContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.letter.common.pk.LetterContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, LetterContactMechanismPurposePK> LETTER_CONTACT_MECHANISM_PURPOSE = createField(DSL.name("lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LetterContactMechanismPurposePK.class, id -> new com.echothree.model.data.letter.common.pk.LetterContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column
079     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_lttr_letterid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, LetterPK> LETTER = createField(DSL.name("lttrcmprdt_lttr_letterid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LetterPK.class, id -> new com.echothree.model.data.letter.common.pk.LetterPK(id), primaryKey -> primaryKey.getEntityId()));
082
083    /**
084     * The column
085     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_priority</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, Integer> PRIORITY = createField(DSL.name("lttrcmprdt_priority"), SQLDataType.INTEGER.nullable(false), this, "");
088
089    /**
090     * The column
091     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_cmpr_contactmechanismpurposeid</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, ContactMechanismPurposePK> CONTACT_MECHANISM_PURPOSE = createField(DSL.name("lttrcmprdt_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()));
094
095    /**
096     * The column
097     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_fromtime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, Long> FROM_TIME = createField(DSL.name("lttrcmprdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    /**
102     * The column
103     * <code>lettercontactmechanismpurposedetails.lttrcmprdt_thrutime</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, Long> THRU_TIME = createField(DSL.name("lttrcmprdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
106
107    private LetterContactMechanismPurposeDetails(Name alias, Table<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> aliased) {
108        this(alias, aliased, (Field<?>[]) null, null);
109    }
110
111    private LetterContactMechanismPurposeDetails(Name alias, Table<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> aliased, Field<?>[] parameters, Condition where) {
112        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
113    }
114
115    /**
116     * Create an aliased <code>lettercontactmechanismpurposedetails</code> table
117     * reference
118     */
119    public LetterContactMechanismPurposeDetails(String alias) {
120        this(DSL.name(alias), LetterContactMechanismPurposeDetails);
121    }
122
123    /**
124     * Create an aliased <code>lettercontactmechanismpurposedetails</code> table
125     * reference
126     */
127    public LetterContactMechanismPurposeDetails(Name alias) {
128        this(alias, LetterContactMechanismPurposeDetails);
129    }
130
131    /**
132     * Create a <code>lettercontactmechanismpurposedetails</code> table
133     * reference
134     */
135    public LetterContactMechanismPurposeDetails() {
136        this(DSL.name("lettercontactmechanismpurposedetails"), null);
137    }
138
139    public <O extends Record> LetterContactMechanismPurposeDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> parentPath) {
140        super(path, childPath, parentPath, LetterContactMechanismPurposeDetails);
141    }
142
143    /**
144     * A subtype implementing {@link Path} for simplified path-based joins.
145     */
146    public static class LetterContactMechanismPurposeDetailsPath extends LetterContactMechanismPurposeDetails implements Path<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> {
147
148        private static final long serialVersionUID = 1L;
149        public <O extends Record> LetterContactMechanismPurposeDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> parentPath) {
150            super(path, childPath, parentPath);
151        }
152        private LetterContactMechanismPurposeDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> aliased) {
153            super(alias, aliased);
154        }
155
156        @Override
157        public LetterContactMechanismPurposeDetailsPath as(String alias) {
158            return new LetterContactMechanismPurposeDetailsPath(DSL.name(alias), this);
159        }
160
161        @Override
162        public LetterContactMechanismPurposeDetailsPath as(Name alias) {
163            return new LetterContactMechanismPurposeDetailsPath(alias, this);
164        }
165
166        @Override
167        public LetterContactMechanismPurposeDetailsPath as(Table<?> alias) {
168            return new LetterContactMechanismPurposeDetailsPath(alias.getQualifiedName(), this);
169        }
170    }
171
172    @Override
173    public UniqueKey<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails> getPrimaryKey() {
174        return KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_PK;
175    }
176
177    @Override
178    public List<UniqueKey<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails>> getUniqueKeys() {
179        return Arrays.asList(KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_CONTACT_MECHANISM_PURPOSE_AND_THRU_TIME_UK, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_AND_PRIORITY_AND_THRU_TIME_UK);
180    }
181
182    @Override
183    public List<ForeignKey<com.echothree.model.jooq.server.records.letter.LetterContactMechanismPurposeDetails, ?>> getReferences() {
184        return Arrays.asList(KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_FK, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_CONTACT_MECHANISM_PURPOSE_FK);
185    }
186
187    private transient ContactMechanismPurposesPath _lttrcmprdt_cmpr_contactmechanismpurposeid_fk;
188
189    /**
190     * Get the implicit join path to the <code>contactmechanismpurposes</code>
191     * table.
192     */
193    public ContactMechanismPurposesPath lttrcmprdt_cmpr_contactmechanismpurposeid_fk() {
194        if (_lttrcmprdt_cmpr_contactmechanismpurposeid_fk == null)
195            _lttrcmprdt_cmpr_contactmechanismpurposeid_fk = new ContactMechanismPurposesPath(this, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, null);
196
197        return _lttrcmprdt_cmpr_contactmechanismpurposeid_fk;
198    }
199
200    private transient LettersPath _lttrcmprdt_lttr_letterid_fk;
201
202    /**
203     * Get the implicit join path to the <code>letters</code> table.
204     */
205    public LettersPath lttrcmprdt_lttr_letterid_fk() {
206        if (_lttrcmprdt_lttr_letterid_fk == null)
207            _lttrcmprdt_lttr_letterid_fk = new LettersPath(this, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_FK, null);
208
209        return _lttrcmprdt_lttr_letterid_fk;
210    }
211
212    private transient LetterContactMechanismPurposesPath _lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid_fk;
213
214    /**
215     * Get the implicit join path to the
216     * <code>lettercontactmechanismpurposes</code> table.
217     */
218    public LetterContactMechanismPurposesPath lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid_fk() {
219        if (_lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid_fk == null)
220            _lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid_fk = new LetterContactMechanismPurposesPath(this, KeyRegistry.LETTER_CONTACT_MECHANISM_PURPOSE_DETAILS_LETTER_CONTACT_MECHANISM_PURPOSE_FK, null);
221
222        return _lttrcmprdt_lttrcmpr_lettercontactmechanismpurposeid_fk;
223    }
224
225    @Override
226    public LetterContactMechanismPurposeDetails as(String alias) {
227        return new LetterContactMechanismPurposeDetails(DSL.name(alias), this);
228    }
229
230    @Override
231    public LetterContactMechanismPurposeDetails as(Name alias) {
232        return new LetterContactMechanismPurposeDetails(alias, this);
233    }
234
235    @Override
236    public LetterContactMechanismPurposeDetails as(Table<?> alias) {
237        return new LetterContactMechanismPurposeDetails(alias.getQualifiedName(), this);
238    }
239
240    /**
241     * Rename this table
242     */
243    @Override
244    public LetterContactMechanismPurposeDetails rename(String name) {
245        return new LetterContactMechanismPurposeDetails(DSL.name(name), null);
246    }
247
248    /**
249     * Rename this table
250     */
251    @Override
252    public LetterContactMechanismPurposeDetails rename(Name name) {
253        return new LetterContactMechanismPurposeDetails(name, null);
254    }
255
256    /**
257     * Rename this table
258     */
259    @Override
260    public LetterContactMechanismPurposeDetails rename(Table<?> name) {
261        return new LetterContactMechanismPurposeDetails(name.getQualifiedName(), null);
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    public LetterContactMechanismPurposeDetails where(Condition condition) {
269        return new LetterContactMechanismPurposeDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
270    }
271
272    /**
273     * Create an inline derived table from this table
274     */
275    @Override
276    public LetterContactMechanismPurposeDetails where(Collection<? extends Condition> conditions) {
277        return where(DSL.and(conditions));
278    }
279
280    /**
281     * Create an inline derived table from this table
282     */
283    @Override
284    public LetterContactMechanismPurposeDetails where(Condition... conditions) {
285        return where(DSL.and(conditions));
286    }
287
288    /**
289     * Create an inline derived table from this table
290     */
291    @Override
292    public LetterContactMechanismPurposeDetails where(Field<Boolean> condition) {
293        return where(DSL.condition(condition));
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    @PlainSQL
301    public LetterContactMechanismPurposeDetails where(SQL condition) {
302        return where(DSL.condition(condition));
303    }
304
305    /**
306     * Create an inline derived table from this table
307     */
308    @Override
309    @PlainSQL
310    public LetterContactMechanismPurposeDetails where(@Stringly.SQL String condition) {
311        return where(DSL.condition(condition));
312    }
313
314    /**
315     * Create an inline derived table from this table
316     */
317    @Override
318    @PlainSQL
319    public LetterContactMechanismPurposeDetails where(@Stringly.SQL String condition, Object... binds) {
320        return where(DSL.condition(condition, binds));
321    }
322
323    /**
324     * Create an inline derived table from this table
325     */
326    @Override
327    @PlainSQL
328    public LetterContactMechanismPurposeDetails where(@Stringly.SQL String condition, QueryPart... parts) {
329        return where(DSL.condition(condition, parts));
330    }
331
332    /**
333     * Create an inline derived table from this table
334     */
335    @Override
336    public LetterContactMechanismPurposeDetails whereExists(TableLike<?> select) {
337        return where(DSL.exists(select));
338    }
339
340    /**
341     * Create an inline derived table from this table
342     */
343    @Override
344    public LetterContactMechanismPurposeDetails whereNotExists(TableLike<?> select) {
345        return where(DSL.notExists(select));
346    }
347}