001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.content;
005
006
007import com.echothree.model.data.accounting.common.pk.CurrencyPK;
008import com.echothree.model.data.content.common.pk.ContentCatalogItemPK;
009import com.echothree.model.data.content.common.pk.ContentCatalogPK;
010import com.echothree.model.data.inventory.common.pk.InventoryConditionPK;
011import com.echothree.model.data.item.common.pk.ItemPK;
012import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.accounting.Currencies.CurrenciesPath;
015import com.echothree.model.jooq.server.tables.content.ContentCatalogs.ContentCatalogsPath;
016import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
017import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
018import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath;
019
020import java.util.Arrays;
021import java.util.Collection;
022import java.util.List;
023
024import org.jooq.Condition;
025import org.jooq.Converter;
026import org.jooq.Field;
027import org.jooq.ForeignKey;
028import org.jooq.InverseForeignKey;
029import org.jooq.Name;
030import org.jooq.Path;
031import org.jooq.PlainSQL;
032import org.jooq.QueryPart;
033import org.jooq.Record;
034import org.jooq.SQL;
035import org.jooq.Stringly;
036import org.jooq.Table;
037import org.jooq.TableField;
038import org.jooq.TableLike;
039import org.jooq.TableOptions;
040import org.jooq.UniqueKey;
041import org.jooq.impl.DSL;
042import org.jooq.impl.Internal;
043import org.jooq.impl.SQLDataType;
044import org.jooq.impl.TableImpl;
045
046
047/**
048 * This class is generated by jOOQ.
049 */
050@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
051public class ContentCatalogItems extends TableImpl<com.echothree.model.jooq.server.records.content.ContentCatalogItems> {
052
053    private static final long serialVersionUID = 1L;
054
055    /**
056     * The reference instance of <code>contentcatalogitems</code>
057     */
058    public static final ContentCatalogItems ContentCatalogItems = new ContentCatalogItems();
059
060    /**
061     * The class holding records for this type
062     */
063    @Override
064    public Class<com.echothree.model.jooq.server.records.content.ContentCatalogItems> getRecordType() {
065        return com.echothree.model.jooq.server.records.content.ContentCatalogItems.class;
066    }
067
068    /**
069     * The column <code>contentcatalogitems.cntcti_contentcatalogitemid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, ContentCatalogItemPK> CONTENT_CATALOG_ITEM = createField(DSL.name("cntcti_contentcatalogitemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContentCatalogItemPK.class, id -> new com.echothree.model.data.content.common.pk.ContentCatalogItemPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column
075     * <code>contentcatalogitems.cntcti_cntct_contentcatalogid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, ContentCatalogPK> CONTENT_CATALOG = createField(DSL.name("cntcti_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()));
078
079    /**
080     * The column <code>contentcatalogitems.cntcti_itm_itemid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, ItemPK> ITEM = createField(DSL.name("cntcti_itm_itemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemPK.class, id -> new com.echothree.model.data.item.common.pk.ItemPK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column
086     * <code>contentcatalogitems.cntcti_invcon_inventoryconditionid</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("cntcti_invcon_inventoryconditionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryConditionPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryConditionPK(id), primaryKey -> primaryKey.getEntityId()));
089
090    /**
091     * The column
092     * <code>contentcatalogitems.cntcti_uomt_unitofmeasuretypeid</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("cntcti_uomt_unitofmeasuretypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, UnitOfMeasureTypePK.class, id -> new com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK(id), primaryKey -> primaryKey.getEntityId()));
095
096    /**
097     * The column <code>contentcatalogitems.cntcti_cur_currencyid</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, CurrencyPK> CURRENCY = createField(DSL.name("cntcti_cur_currencyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CurrencyPK.class, id -> new com.echothree.model.data.accounting.common.pk.CurrencyPK(id), primaryKey -> primaryKey.getEntityId()));
100
101    /**
102     * The column <code>contentcatalogitems.cntcti_fromtime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, Long> FROM_TIME = createField(DSL.name("cntcti_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    /**
107     * The column <code>contentcatalogitems.cntcti_thrutime</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.content.ContentCatalogItems, Long> THRU_TIME = createField(DSL.name("cntcti_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
110
111    private ContentCatalogItems(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCatalogItems> aliased) {
112        this(alias, aliased, (Field<?>[]) null, null);
113    }
114
115    private ContentCatalogItems(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCatalogItems> aliased, Field<?>[] parameters, Condition where) {
116        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
117    }
118
119    /**
120     * Create an aliased <code>contentcatalogitems</code> table reference
121     */
122    public ContentCatalogItems(String alias) {
123        this(DSL.name(alias), ContentCatalogItems);
124    }
125
126    /**
127     * Create an aliased <code>contentcatalogitems</code> table reference
128     */
129    public ContentCatalogItems(Name alias) {
130        this(alias, ContentCatalogItems);
131    }
132
133    /**
134     * Create a <code>contentcatalogitems</code> table reference
135     */
136    public ContentCatalogItems() {
137        this(DSL.name("contentcatalogitems"), null);
138    }
139
140    public <O extends Record> ContentCatalogItems(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCatalogItems> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCatalogItems> parentPath) {
141        super(path, childPath, parentPath, ContentCatalogItems);
142    }
143
144    /**
145     * A subtype implementing {@link Path} for simplified path-based joins.
146     */
147    public static class ContentCatalogItemsPath extends ContentCatalogItems implements Path<com.echothree.model.jooq.server.records.content.ContentCatalogItems> {
148
149        private static final long serialVersionUID = 1L;
150        public <O extends Record> ContentCatalogItemsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCatalogItems> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.content.ContentCatalogItems> parentPath) {
151            super(path, childPath, parentPath);
152        }
153        private ContentCatalogItemsPath(Name alias, Table<com.echothree.model.jooq.server.records.content.ContentCatalogItems> aliased) {
154            super(alias, aliased);
155        }
156
157        @Override
158        public ContentCatalogItemsPath as(String alias) {
159            return new ContentCatalogItemsPath(DSL.name(alias), this);
160        }
161
162        @Override
163        public ContentCatalogItemsPath as(Name alias) {
164            return new ContentCatalogItemsPath(alias, this);
165        }
166
167        @Override
168        public ContentCatalogItemsPath as(Table<?> alias) {
169            return new ContentCatalogItemsPath(alias.getQualifiedName(), this);
170        }
171    }
172
173    @Override
174    public UniqueKey<com.echothree.model.jooq.server.records.content.ContentCatalogItems> getPrimaryKey() {
175        return KeyRegistry.CONTENT_CATALOG_ITEMS_PK;
176    }
177
178    @Override
179    public List<ForeignKey<com.echothree.model.jooq.server.records.content.ContentCatalogItems, ?>> getReferences() {
180        return Arrays.asList(KeyRegistry.CONTENT_CATALOG_ITEMS_CONTENT_CATALOG_FK, KeyRegistry.CONTENT_CATALOG_ITEMS_CURRENCY_FK, KeyRegistry.CONTENT_CATALOG_ITEMS_INVENTORY_CONDITION_FK, KeyRegistry.CONTENT_CATALOG_ITEMS_ITEM_FK, KeyRegistry.CONTENT_CATALOG_ITEMS_UNIT_OF_MEASURE_TYPE_FK);
181    }
182
183    private transient ContentCatalogsPath _cntcti_cntct_contentcatalogid_fk;
184
185    /**
186     * Get the implicit join path to the <code>contentcatalogs</code> table.
187     */
188    public ContentCatalogsPath cntcti_cntct_contentcatalogid_fk() {
189        if (_cntcti_cntct_contentcatalogid_fk == null)
190            _cntcti_cntct_contentcatalogid_fk = new ContentCatalogsPath(this, KeyRegistry.CONTENT_CATALOG_ITEMS_CONTENT_CATALOG_FK, null);
191
192        return _cntcti_cntct_contentcatalogid_fk;
193    }
194
195    private transient CurrenciesPath _cntcti_cur_currencyid_fk;
196
197    /**
198     * Get the implicit join path to the <code>currencies</code> table.
199     */
200    public CurrenciesPath cntcti_cur_currencyid_fk() {
201        if (_cntcti_cur_currencyid_fk == null)
202            _cntcti_cur_currencyid_fk = new CurrenciesPath(this, KeyRegistry.CONTENT_CATALOG_ITEMS_CURRENCY_FK, null);
203
204        return _cntcti_cur_currencyid_fk;
205    }
206
207    private transient InventoryConditionsPath _cntcti_invcon_inventoryconditionid_fk;
208
209    /**
210     * Get the implicit join path to the <code>inventoryconditions</code> table.
211     */
212    public InventoryConditionsPath cntcti_invcon_inventoryconditionid_fk() {
213        if (_cntcti_invcon_inventoryconditionid_fk == null)
214            _cntcti_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.CONTENT_CATALOG_ITEMS_INVENTORY_CONDITION_FK, null);
215
216        return _cntcti_invcon_inventoryconditionid_fk;
217    }
218
219    private transient ItemsPath _cntcti_itm_itemid_fk;
220
221    /**
222     * Get the implicit join path to the <code>items</code> table.
223     */
224    public ItemsPath cntcti_itm_itemid_fk() {
225        if (_cntcti_itm_itemid_fk == null)
226            _cntcti_itm_itemid_fk = new ItemsPath(this, KeyRegistry.CONTENT_CATALOG_ITEMS_ITEM_FK, null);
227
228        return _cntcti_itm_itemid_fk;
229    }
230
231    private transient UnitOfMeasureTypesPath _cntcti_uomt_unitofmeasuretypeid_fk;
232
233    /**
234     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
235     */
236    public UnitOfMeasureTypesPath cntcti_uomt_unitofmeasuretypeid_fk() {
237        if (_cntcti_uomt_unitofmeasuretypeid_fk == null)
238            _cntcti_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.CONTENT_CATALOG_ITEMS_UNIT_OF_MEASURE_TYPE_FK, null);
239
240        return _cntcti_uomt_unitofmeasuretypeid_fk;
241    }
242
243    @Override
244    public ContentCatalogItems as(String alias) {
245        return new ContentCatalogItems(DSL.name(alias), this);
246    }
247
248    @Override
249    public ContentCatalogItems as(Name alias) {
250        return new ContentCatalogItems(alias, this);
251    }
252
253    @Override
254    public ContentCatalogItems as(Table<?> alias) {
255        return new ContentCatalogItems(alias.getQualifiedName(), this);
256    }
257
258    /**
259     * Rename this table
260     */
261    @Override
262    public ContentCatalogItems rename(String name) {
263        return new ContentCatalogItems(DSL.name(name), null);
264    }
265
266    /**
267     * Rename this table
268     */
269    @Override
270    public ContentCatalogItems rename(Name name) {
271        return new ContentCatalogItems(name, null);
272    }
273
274    /**
275     * Rename this table
276     */
277    @Override
278    public ContentCatalogItems rename(Table<?> name) {
279        return new ContentCatalogItems(name.getQualifiedName(), null);
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    public ContentCatalogItems where(Condition condition) {
287        return new ContentCatalogItems(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    public ContentCatalogItems where(Collection<? extends Condition> conditions) {
295        return where(DSL.and(conditions));
296    }
297
298    /**
299     * Create an inline derived table from this table
300     */
301    @Override
302    public ContentCatalogItems where(Condition... conditions) {
303        return where(DSL.and(conditions));
304    }
305
306    /**
307     * Create an inline derived table from this table
308     */
309    @Override
310    public ContentCatalogItems where(Field<Boolean> 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 ContentCatalogItems where(SQL condition) {
320        return where(DSL.condition(condition));
321    }
322
323    /**
324     * Create an inline derived table from this table
325     */
326    @Override
327    @PlainSQL
328    public ContentCatalogItems where(@Stringly.SQL String 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 ContentCatalogItems where(@Stringly.SQL String condition, Object... binds) {
338        return where(DSL.condition(condition, binds));
339    }
340
341    /**
342     * Create an inline derived table from this table
343     */
344    @Override
345    @PlainSQL
346    public ContentCatalogItems where(@Stringly.SQL String condition, QueryPart... parts) {
347        return where(DSL.condition(condition, parts));
348    }
349
350    /**
351     * Create an inline derived table from this table
352     */
353    @Override
354    public ContentCatalogItems whereExists(TableLike<?> select) {
355        return where(DSL.exists(select));
356    }
357
358    /**
359     * Create an inline derived table from this table
360     */
361    @Override
362    public ContentCatalogItems whereNotExists(TableLike<?> select) {
363        return where(DSL.notExists(select));
364    }
365}