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