001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.forum;
005
006
007import com.echothree.model.data.forum.common.pk.ForumThreadDetailPK;
008import com.echothree.model.data.forum.common.pk.ForumThreadPK;
009import com.echothree.model.data.icon.common.pk.IconPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.forum.ForumThreads.ForumThreadsPath;
012import com.echothree.model.jooq.server.tables.icon.Icons.IconsPath;
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 ForumThreadDetails extends TableImpl<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>forumthreaddetails</code>
051     */
052    public static final ForumThreadDetails ForumThreadDetails = new ForumThreadDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.forum.ForumThreadDetails.class;
060    }
061
062    /**
063     * The column <code>forumthreaddetails.frmthrddt_forumthreaddetailid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, ForumThreadDetailPK> FORUM_THREAD_DETAIL = createField(DSL.name("frmthrddt_forumthreaddetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ForumThreadDetailPK.class, id -> new com.echothree.model.data.forum.common.pk.ForumThreadDetailPK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>forumthreaddetails.frmthrddt_frmthrd_forumthreadid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, ForumThreadPK> FORUM_THREAD = createField(DSL.name("frmthrddt_frmthrd_forumthreadid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ForumThreadPK.class, id -> new com.echothree.model.data.forum.common.pk.ForumThreadPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column <code>forumthreaddetails.frmthrddt_forumthreadname</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, String> FORUM_THREAD_NAME = createField(DSL.name("frmthrddt_forumthreadname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
077
078    /**
079     * The column <code>forumthreaddetails.frmthrddt_icn_iconid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, IconPK> ICON = createField(DSL.name("frmthrddt_icn_iconid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, IconPK.class, id -> new com.echothree.model.data.icon.common.pk.IconPK(id), primaryKey -> primaryKey.getEntityId()));
082
083    /**
084     * The column <code>forumthreaddetails.frmthrddt_postedtime</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, Long> POSTED_TIME = createField(DSL.name("frmthrddt_postedtime"), SQLDataType.BIGINT.nullable(false), this, "");
087
088    /**
089     * The column <code>forumthreaddetails.frmthrddt_sortorder</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, Integer> SORT_ORDER = createField(DSL.name("frmthrddt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
092
093    /**
094     * The column <code>forumthreaddetails.frmthrddt_fromtime</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, Long> FROM_TIME = createField(DSL.name("frmthrddt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
097
098    /**
099     * The column <code>forumthreaddetails.frmthrddt_thrutime</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, Long> THRU_TIME = createField(DSL.name("frmthrddt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
102
103    private ForumThreadDetails(Name alias, Table<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> aliased) {
104        this(alias, aliased, (Field<?>[]) null, null);
105    }
106
107    private ForumThreadDetails(Name alias, Table<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> aliased, Field<?>[] parameters, Condition where) {
108        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
109    }
110
111    /**
112     * Create an aliased <code>forumthreaddetails</code> table reference
113     */
114    public ForumThreadDetails(String alias) {
115        this(DSL.name(alias), ForumThreadDetails);
116    }
117
118    /**
119     * Create an aliased <code>forumthreaddetails</code> table reference
120     */
121    public ForumThreadDetails(Name alias) {
122        this(alias, ForumThreadDetails);
123    }
124
125    /**
126     * Create a <code>forumthreaddetails</code> table reference
127     */
128    public ForumThreadDetails() {
129        this(DSL.name("forumthreaddetails"), null);
130    }
131
132    public <O extends Record> ForumThreadDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.forum.ForumThreadDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.forum.ForumThreadDetails> parentPath) {
133        super(path, childPath, parentPath, ForumThreadDetails);
134    }
135
136    /**
137     * A subtype implementing {@link Path} for simplified path-based joins.
138     */
139    public static class ForumThreadDetailsPath extends ForumThreadDetails implements Path<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> {
140
141        private static final long serialVersionUID = 1L;
142        public <O extends Record> ForumThreadDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.forum.ForumThreadDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.forum.ForumThreadDetails> parentPath) {
143            super(path, childPath, parentPath);
144        }
145        private ForumThreadDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> aliased) {
146            super(alias, aliased);
147        }
148
149        @Override
150        public ForumThreadDetailsPath as(String alias) {
151            return new ForumThreadDetailsPath(DSL.name(alias), this);
152        }
153
154        @Override
155        public ForumThreadDetailsPath as(Name alias) {
156            return new ForumThreadDetailsPath(alias, this);
157        }
158
159        @Override
160        public ForumThreadDetailsPath as(Table<?> alias) {
161            return new ForumThreadDetailsPath(alias.getQualifiedName(), this);
162        }
163    }
164
165    @Override
166    public UniqueKey<com.echothree.model.jooq.server.records.forum.ForumThreadDetails> getPrimaryKey() {
167        return KeyRegistry.FORUM_THREAD_DETAILS_PK;
168    }
169
170    @Override
171    public List<UniqueKey<com.echothree.model.jooq.server.records.forum.ForumThreadDetails>> getUniqueKeys() {
172        return Arrays.asList(KeyRegistry.FORUM_THREAD_DETAILS_FORUM_THREAD_AND_THRU_TIME_UK, KeyRegistry.FORUM_THREAD_DETAILS_FORUM_THREAD_NAME_AND_THRU_TIME_UK);
173    }
174
175    @Override
176    public List<ForeignKey<com.echothree.model.jooq.server.records.forum.ForumThreadDetails, ?>> getReferences() {
177        return Arrays.asList(KeyRegistry.FORUM_THREAD_DETAILS_FORUM_THREAD_FK, KeyRegistry.FORUM_THREAD_DETAILS_ICON_FK);
178    }
179
180    private transient ForumThreadsPath _frmthrddt_frmthrd_forumthreadid_fk;
181
182    /**
183     * Get the implicit join path to the <code>forumthreads</code> table.
184     */
185    public ForumThreadsPath frmthrddt_frmthrd_forumthreadid_fk() {
186        if (_frmthrddt_frmthrd_forumthreadid_fk == null)
187            _frmthrddt_frmthrd_forumthreadid_fk = new ForumThreadsPath(this, KeyRegistry.FORUM_THREAD_DETAILS_FORUM_THREAD_FK, null);
188
189        return _frmthrddt_frmthrd_forumthreadid_fk;
190    }
191
192    private transient IconsPath _frmthrddt_icn_iconid_fk;
193
194    /**
195     * Get the implicit join path to the <code>icons</code> table.
196     */
197    public IconsPath frmthrddt_icn_iconid_fk() {
198        if (_frmthrddt_icn_iconid_fk == null)
199            _frmthrddt_icn_iconid_fk = new IconsPath(this, KeyRegistry.FORUM_THREAD_DETAILS_ICON_FK, null);
200
201        return _frmthrddt_icn_iconid_fk;
202    }
203
204    @Override
205    public ForumThreadDetails as(String alias) {
206        return new ForumThreadDetails(DSL.name(alias), this);
207    }
208
209    @Override
210    public ForumThreadDetails as(Name alias) {
211        return new ForumThreadDetails(alias, this);
212    }
213
214    @Override
215    public ForumThreadDetails as(Table<?> alias) {
216        return new ForumThreadDetails(alias.getQualifiedName(), this);
217    }
218
219    /**
220     * Rename this table
221     */
222    @Override
223    public ForumThreadDetails rename(String name) {
224        return new ForumThreadDetails(DSL.name(name), null);
225    }
226
227    /**
228     * Rename this table
229     */
230    @Override
231    public ForumThreadDetails rename(Name name) {
232        return new ForumThreadDetails(name, null);
233    }
234
235    /**
236     * Rename this table
237     */
238    @Override
239    public ForumThreadDetails rename(Table<?> name) {
240        return new ForumThreadDetails(name.getQualifiedName(), null);
241    }
242
243    /**
244     * Create an inline derived table from this table
245     */
246    @Override
247    public ForumThreadDetails where(Condition condition) {
248        return new ForumThreadDetails(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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails 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 ForumThreadDetails whereNotExists(TableLike<?> select) {
324        return where(DSL.notExists(select));
325    }
326}