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