001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.content;
005
006
007import com.echothree.model.data.content.common.pk.ContentCatalogPK;
008import com.echothree.model.data.content.common.pk.ContentCategoryDetailPK;
009import com.echothree.model.data.content.common.pk.ContentCategoryPK;
010import com.echothree.model.data.offer.common.pk.OfferUsePK;
011import com.echothree.model.data.selector.common.pk.SelectorPK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.content.ContentCatalogs.ContentCatalogsPath;
014import com.echothree.model.jooq.server.tables.content.ContentCategories.ContentCategoriesPath;
015import com.echothree.model.jooq.server.tables.offer.OfferUses.OfferUsesPath;
016import com.echothree.model.jooq.server.tables.selector.Selectors.SelectorsPath;
017
018import java.util.Arrays;
019import java.util.Collection;
020import java.util.List;
021
022import org.jooq.Condition;
023import org.jooq.Converter;
024import org.jooq.Field;
025import org.jooq.ForeignKey;
026import org.jooq.InverseForeignKey;
027import org.jooq.Name;
028import org.jooq.Path;
029import org.jooq.PlainSQL;
030import org.jooq.QueryPart;
031import org.jooq.Record;
032import org.jooq.SQL;
033import org.jooq.Stringly;
034import org.jooq.Table;
035import org.jooq.TableField;
036import org.jooq.TableLike;
037import org.jooq.TableOptions;
038import org.jooq.UniqueKey;
039import org.jooq.impl.DSL;
040import org.jooq.impl.Internal;
041import org.jooq.impl.SQLDataType;
042import org.jooq.impl.TableImpl;
043
044
045/**
046 * This class is generated by jOOQ.
047 */
048@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
049public class ContentCategoryDetails extends TableImpl<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>contentcategorydetails</code>
055     */
056    public static final ContentCategoryDetails ContentCategoryDetails = new ContentCategoryDetails();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> getRecordType() {
063        return com.echothree.model.jooq.server.records.content.ContentCategoryDetails.class;
064    }
065
066    /**
067     * The column
068     * <code>contentcategorydetails.cntcgdt_contentcategorydetailid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, ContentCategoryDetailPK> CONTENT_CATEGORY_DETAIL = createField(DSL.name("cntcgdt_contentcategorydetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContentCategoryDetailPK.class, id -> new com.echothree.model.data.content.common.pk.ContentCategoryDetailPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column
074     * <code>contentcategorydetails.cntcgdt_cntcg_contentcategoryid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, ContentCategoryPK> CONTENT_CATEGORY = createField(DSL.name("cntcgdt_cntcg_contentcategoryid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContentCategoryPK.class, id -> new com.echothree.model.data.content.common.pk.ContentCategoryPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column
080     * <code>contentcategorydetails.cntcgdt_cntct_contentcatalogid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, ContentCatalogPK> CONTENT_CATALOG = createField(DSL.name("cntcgdt_cntct_contentcatalogid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContentCatalogPK.class, id -> new com.echothree.model.data.content.common.pk.ContentCatalogPK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column
086     * <code>contentcategorydetails.cntcgdt_contentcategoryname</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, String> CONTENT_CATEGORY_NAME = createField(DSL.name("cntcgdt_contentcategoryname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
089
090    /**
091     * The column
092     * <code>contentcategorydetails.cntcgdt_parentcontentcategoryid</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, ContentCategoryPK> PARENT_CONTENT_CATEGORY = createField(DSL.name("cntcgdt_parentcontentcategoryid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ContentCategoryPK.class, id -> new com.echothree.model.data.content.common.pk.ContentCategoryPK(id), primaryKey -> primaryKey.getEntityId()));
095
096    /**
097     * The column <code>contentcategorydetails.cntcgdt_defaultofferuseid</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, OfferUsePK> DEFAULT_OFFER_USE = createField(DSL.name("cntcgdt_defaultofferuseid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, OfferUsePK.class, id -> new com.echothree.model.data.offer.common.pk.OfferUsePK(id), primaryKey -> primaryKey.getEntityId()));
100
101    /**
102     * The column
103     * <code>contentcategorydetails.cntcgdt_contentcategoryitemselectorid</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, SelectorPK> CONTENT_CATEGORY_ITEM_SELECTOR = createField(DSL.name("cntcgdt_contentcategoryitemselectorid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorPK(id), primaryKey -> primaryKey.getEntityId()));
106
107    /**
108     * The column <code>contentcategorydetails.cntcgdt_isdefault</code>.
109     */
110    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, Boolean> IS_DEFAULT = createField(DSL.name("cntcgdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
111
112    /**
113     * The column <code>contentcategorydetails.cntcgdt_sortorder</code>.
114     */
115    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, Integer> SORT_ORDER = createField(DSL.name("cntcgdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
116
117    /**
118     * The column <code>contentcategorydetails.cntcgdt_fromtime</code>.
119     */
120    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, Long> FROM_TIME = createField(DSL.name("cntcgdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
121
122    /**
123     * The column <code>contentcategorydetails.cntcgdt_thrutime</code>.
124     */
125    public final TableField<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, Long> THRU_TIME = createField(DSL.name("cntcgdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
126
127    private ContentCategoryDetails(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> aliased) {
128        this(alias, aliased, (Field<?>[]) null, null);
129    }
130
131    private ContentCategoryDetails(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> aliased, Field<?>[] parameters, Condition where) {
132        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
133    }
134
135    /**
136     * Create an aliased <code>contentcategorydetails</code> table reference
137     */
138    public ContentCategoryDetails(String alias) {
139        this(DSL.name(alias), ContentCategoryDetails);
140    }
141
142    /**
143     * Create an aliased <code>contentcategorydetails</code> table reference
144     */
145    public ContentCategoryDetails(Name alias) {
146        this(alias, ContentCategoryDetails);
147    }
148
149    /**
150     * Create a <code>contentcategorydetails</code> table reference
151     */
152    public ContentCategoryDetails() {
153        this(DSL.name("contentcategorydetails"), null);
154    }
155
156    public <O extends Record> ContentCategoryDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCategoryDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCategoryDetails> parentPath) {
157        super(path, childPath, parentPath, ContentCategoryDetails);
158    }
159
160    /**
161     * A subtype implementing {@link Path} for simplified path-based joins.
162     */
163    public static class ContentCategoryDetailsPath extends ContentCategoryDetails implements Path<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> {
164
165        private static final long serialVersionUID = 1L;
166        public <O extends Record> ContentCategoryDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCategoryDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCategoryDetails> parentPath) {
167            super(path, childPath, parentPath);
168        }
169        private ContentCategoryDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> aliased) {
170            super(alias, aliased);
171        }
172
173        @Override
174        public ContentCategoryDetailsPath as(String alias) {
175            return new ContentCategoryDetailsPath(DSL.name(alias), this);
176        }
177
178        @Override
179        public ContentCategoryDetailsPath as(Name alias) {
180            return new ContentCategoryDetailsPath(alias, this);
181        }
182
183        @Override
184        public ContentCategoryDetailsPath as(Table<?> alias) {
185            return new ContentCategoryDetailsPath(alias.getQualifiedName(), this);
186        }
187    }
188
189    @Override
190    public UniqueKey<com.echothree.model.jooq.server.records.content.ContentCategoryDetails> getPrimaryKey() {
191        return KeyRegistry.CONTENT_CATEGORY_DETAILS_PK;
192    }
193
194    @Override
195    public List<ForeignKey<com.echothree.model.jooq.server.records.content.ContentCategoryDetails, ?>> getReferences() {
196        return Arrays.asList(KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATEGORY_FK, KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATALOG_FK, KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATEGORY_ITEM_SELECTOR_FK, KeyRegistry.CONTENT_CATEGORY_DETAILS_DEFAULT_OFFER_USE_FK, KeyRegistry.CONTENT_CATEGORY_DETAILS_PARENT_CONTENT_CATEGORY_FK);
197    }
198
199    private transient ContentCategoriesPath _cntcgdt_cntcg_contentcategoryid_fk;
200
201    /**
202     * Get the implicit join path to the <code>contentcategories</code> table,
203     * via the <code>cntcgdt_cntcg_contentcategoryid_fk</code> key.
204     */
205    public ContentCategoriesPath cntcgdt_cntcg_contentcategoryid_fk() {
206        if (_cntcgdt_cntcg_contentcategoryid_fk == null)
207            _cntcgdt_cntcg_contentcategoryid_fk = new ContentCategoriesPath(this, KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATEGORY_FK, null);
208
209        return _cntcgdt_cntcg_contentcategoryid_fk;
210    }
211
212    private transient ContentCatalogsPath _cntcgdt_cntct_contentcatalogid_fk;
213
214    /**
215     * Get the implicit join path to the <code>contentcatalogs</code> table.
216     */
217    public ContentCatalogsPath cntcgdt_cntct_contentcatalogid_fk() {
218        if (_cntcgdt_cntct_contentcatalogid_fk == null)
219            _cntcgdt_cntct_contentcatalogid_fk = new ContentCatalogsPath(this, KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATALOG_FK, null);
220
221        return _cntcgdt_cntct_contentcatalogid_fk;
222    }
223
224    private transient SelectorsPath _cntcgdt_contentcategoryitemselectorid_fk;
225
226    /**
227     * Get the implicit join path to the <code>selectors</code> table.
228     */
229    public SelectorsPath cntcgdt_contentcategoryitemselectorid_fk() {
230        if (_cntcgdt_contentcategoryitemselectorid_fk == null)
231            _cntcgdt_contentcategoryitemselectorid_fk = new SelectorsPath(this, KeyRegistry.CONTENT_CATEGORY_DETAILS_CONTENT_CATEGORY_ITEM_SELECTOR_FK, null);
232
233        return _cntcgdt_contentcategoryitemselectorid_fk;
234    }
235
236    private transient OfferUsesPath _cntcgdt_defaultofferuseid_fk;
237
238    /**
239     * Get the implicit join path to the <code>offeruses</code> table.
240     */
241    public OfferUsesPath cntcgdt_defaultofferuseid_fk() {
242        if (_cntcgdt_defaultofferuseid_fk == null)
243            _cntcgdt_defaultofferuseid_fk = new OfferUsesPath(this, KeyRegistry.CONTENT_CATEGORY_DETAILS_DEFAULT_OFFER_USE_FK, null);
244
245        return _cntcgdt_defaultofferuseid_fk;
246    }
247
248    private transient ContentCategoriesPath _cntcgdt_parentcontentcategoryid_fk;
249
250    /**
251     * Get the implicit join path to the <code>contentcategories</code> table,
252     * via the <code>cntcgdt_parentcontentcategoryid_fk</code> key.
253     */
254    public ContentCategoriesPath cntcgdt_parentcontentcategoryid_fk() {
255        if (_cntcgdt_parentcontentcategoryid_fk == null)
256            _cntcgdt_parentcontentcategoryid_fk = new ContentCategoriesPath(this, KeyRegistry.CONTENT_CATEGORY_DETAILS_PARENT_CONTENT_CATEGORY_FK, null);
257
258        return _cntcgdt_parentcontentcategoryid_fk;
259    }
260
261    @Override
262    public ContentCategoryDetails as(String alias) {
263        return new ContentCategoryDetails(DSL.name(alias), this);
264    }
265
266    @Override
267    public ContentCategoryDetails as(Name alias) {
268        return new ContentCategoryDetails(alias, this);
269    }
270
271    @Override
272    public ContentCategoryDetails as(Table<?> alias) {
273        return new ContentCategoryDetails(alias.getQualifiedName(), this);
274    }
275
276    /**
277     * Rename this table
278     */
279    @Override
280    public ContentCategoryDetails rename(String name) {
281        return new ContentCategoryDetails(DSL.name(name), null);
282    }
283
284    /**
285     * Rename this table
286     */
287    @Override
288    public ContentCategoryDetails rename(Name name) {
289        return new ContentCategoryDetails(name, null);
290    }
291
292    /**
293     * Rename this table
294     */
295    @Override
296    public ContentCategoryDetails rename(Table<?> name) {
297        return new ContentCategoryDetails(name.getQualifiedName(), null);
298    }
299
300    /**
301     * Create an inline derived table from this table
302     */
303    @Override
304    public ContentCategoryDetails where(Condition condition) {
305        return new ContentCategoryDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
306    }
307
308    /**
309     * Create an inline derived table from this table
310     */
311    @Override
312    public ContentCategoryDetails where(Collection<? extends Condition> conditions) {
313        return where(DSL.and(conditions));
314    }
315
316    /**
317     * Create an inline derived table from this table
318     */
319    @Override
320    public ContentCategoryDetails where(Condition... conditions) {
321        return where(DSL.and(conditions));
322    }
323
324    /**
325     * Create an inline derived table from this table
326     */
327    @Override
328    public ContentCategoryDetails where(Field<Boolean> condition) {
329        return where(DSL.condition(condition));
330    }
331
332    /**
333     * Create an inline derived table from this table
334     */
335    @Override
336    @PlainSQL
337    public ContentCategoryDetails where(SQL condition) {
338        return where(DSL.condition(condition));
339    }
340
341    /**
342     * Create an inline derived table from this table
343     */
344    @Override
345    @PlainSQL
346    public ContentCategoryDetails where(@Stringly.SQL String condition) {
347        return where(DSL.condition(condition));
348    }
349
350    /**
351     * Create an inline derived table from this table
352     */
353    @Override
354    @PlainSQL
355    public ContentCategoryDetails where(@Stringly.SQL String condition, Object... binds) {
356        return where(DSL.condition(condition, binds));
357    }
358
359    /**
360     * Create an inline derived table from this table
361     */
362    @Override
363    @PlainSQL
364    public ContentCategoryDetails where(@Stringly.SQL String condition, QueryPart... parts) {
365        return where(DSL.condition(condition, parts));
366    }
367
368    /**
369     * Create an inline derived table from this table
370     */
371    @Override
372    public ContentCategoryDetails whereExists(TableLike<?> select) {
373        return where(DSL.exists(select));
374    }
375
376    /**
377     * Create an inline derived table from this table
378     */
379    @Override
380    public ContentCategoryDetails whereNotExists(TableLike<?> select) {
381        return where(DSL.notExists(select));
382    }
383}