001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.item;
005
006
007import com.echothree.model.data.accounting.common.pk.CurrencyPK;
008import com.echothree.model.data.inventory.common.pk.InventoryConditionPK;
009import com.echothree.model.data.item.common.pk.ItemPK;
010import com.echothree.model.data.item.common.pk.ItemPricePK;
011import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.accounting.Currencies.CurrenciesPath;
014import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
015import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
016import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath;
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 ItemPrices extends TableImpl<com.echothree.model.jooq.server.records.item.ItemPrices> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>itemprices</code>
055     */
056    public static final ItemPrices ItemPrices = new ItemPrices();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.item.ItemPrices> getRecordType() {
063        return com.echothree.model.jooq.server.records.item.ItemPrices.class;
064    }
065
066    /**
067     * The column <code>itemprices.itmp_itempriceid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, ItemPricePK> ITEM_PRICE = createField(DSL.name("itmp_itempriceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemPricePK.class, id -> new com.echothree.model.data.item.common.pk.ItemPricePK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column <code>itemprices.itmp_itm_itemid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, ItemPK> ITEM = createField(DSL.name("itmp_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()));
075
076    /**
077     * The column <code>itemprices.itmp_invcon_inventoryconditionid</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("itmp_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()));
080
081    /**
082     * The column <code>itemprices.itmp_uomt_unitofmeasuretypeid</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("itmp_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()));
085
086    /**
087     * The column <code>itemprices.itmp_cur_currencyid</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, CurrencyPK> CURRENCY = createField(DSL.name("itmp_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()));
090
091    /**
092     * The column <code>itemprices.itmp_fromtime</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, Long> FROM_TIME = createField(DSL.name("itmp_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
095
096    /**
097     * The column <code>itemprices.itmp_thrutime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.item.ItemPrices, Long> THRU_TIME = createField(DSL.name("itmp_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    private ItemPrices(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemPrices> aliased) {
102        this(alias, aliased, (Field<?>[]) null, null);
103    }
104
105    private ItemPrices(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemPrices> aliased, Field<?>[] parameters, Condition where) {
106        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
107    }
108
109    /**
110     * Create an aliased <code>itemprices</code> table reference
111     */
112    public ItemPrices(String alias) {
113        this(DSL.name(alias), ItemPrices);
114    }
115
116    /**
117     * Create an aliased <code>itemprices</code> table reference
118     */
119    public ItemPrices(Name alias) {
120        this(alias, ItemPrices);
121    }
122
123    /**
124     * Create a <code>itemprices</code> table reference
125     */
126    public ItemPrices() {
127        this(DSL.name("itemprices"), null);
128    }
129
130    public <O extends Record> ItemPrices(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.ItemPrices> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.ItemPrices> parentPath) {
131        super(path, childPath, parentPath, ItemPrices);
132    }
133
134    /**
135     * A subtype implementing {@link Path} for simplified path-based joins.
136     */
137    public static class ItemPricesPath extends ItemPrices implements Path<com.echothree.model.jooq.server.records.item.ItemPrices> {
138
139        private static final long serialVersionUID = 1L;
140        public <O extends Record> ItemPricesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.ItemPrices> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.ItemPrices> parentPath) {
141            super(path, childPath, parentPath);
142        }
143        private ItemPricesPath(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemPrices> aliased) {
144            super(alias, aliased);
145        }
146
147        @Override
148        public ItemPricesPath as(String alias) {
149            return new ItemPricesPath(DSL.name(alias), this);
150        }
151
152        @Override
153        public ItemPricesPath as(Name alias) {
154            return new ItemPricesPath(alias, this);
155        }
156
157        @Override
158        public ItemPricesPath as(Table<?> alias) {
159            return new ItemPricesPath(alias.getQualifiedName(), this);
160        }
161    }
162
163    @Override
164    public UniqueKey<com.echothree.model.jooq.server.records.item.ItemPrices> getPrimaryKey() {
165        return KeyRegistry.ITEM_PRICES_PK;
166    }
167
168    @Override
169    public List<UniqueKey<com.echothree.model.jooq.server.records.item.ItemPrices>> getUniqueKeys() {
170        return Arrays.asList(KeyRegistry.ITEM_PRICES_ITEM_AND_INVENTORY_CONDITION_AND_UNIT_OF_MEASURE_TYPE_AND_CURRENCY_AND_THRU_TIME_UK);
171    }
172
173    @Override
174    public List<ForeignKey<com.echothree.model.jooq.server.records.item.ItemPrices, ?>> getReferences() {
175        return Arrays.asList(KeyRegistry.ITEM_PRICES_CURRENCY_FK, KeyRegistry.ITEM_PRICES_INVENTORY_CONDITION_FK, KeyRegistry.ITEM_PRICES_ITEM_FK, KeyRegistry.ITEM_PRICES_UNIT_OF_MEASURE_TYPE_FK);
176    }
177
178    private transient CurrenciesPath _itmp_cur_currencyid_fk;
179
180    /**
181     * Get the implicit join path to the <code>currencies</code> table.
182     */
183    public CurrenciesPath itmp_cur_currencyid_fk() {
184        if (_itmp_cur_currencyid_fk == null)
185            _itmp_cur_currencyid_fk = new CurrenciesPath(this, KeyRegistry.ITEM_PRICES_CURRENCY_FK, null);
186
187        return _itmp_cur_currencyid_fk;
188    }
189
190    private transient InventoryConditionsPath _itmp_invcon_inventoryconditionid_fk;
191
192    /**
193     * Get the implicit join path to the <code>inventoryconditions</code> table.
194     */
195    public InventoryConditionsPath itmp_invcon_inventoryconditionid_fk() {
196        if (_itmp_invcon_inventoryconditionid_fk == null)
197            _itmp_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.ITEM_PRICES_INVENTORY_CONDITION_FK, null);
198
199        return _itmp_invcon_inventoryconditionid_fk;
200    }
201
202    private transient ItemsPath _itmp_itm_itemid_fk;
203
204    /**
205     * Get the implicit join path to the <code>items</code> table.
206     */
207    public ItemsPath itmp_itm_itemid_fk() {
208        if (_itmp_itm_itemid_fk == null)
209            _itmp_itm_itemid_fk = new ItemsPath(this, KeyRegistry.ITEM_PRICES_ITEM_FK, null);
210
211        return _itmp_itm_itemid_fk;
212    }
213
214    private transient UnitOfMeasureTypesPath _itmp_uomt_unitofmeasuretypeid_fk;
215
216    /**
217     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
218     */
219    public UnitOfMeasureTypesPath itmp_uomt_unitofmeasuretypeid_fk() {
220        if (_itmp_uomt_unitofmeasuretypeid_fk == null)
221            _itmp_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.ITEM_PRICES_UNIT_OF_MEASURE_TYPE_FK, null);
222
223        return _itmp_uomt_unitofmeasuretypeid_fk;
224    }
225
226    @Override
227    public ItemPrices as(String alias) {
228        return new ItemPrices(DSL.name(alias), this);
229    }
230
231    @Override
232    public ItemPrices as(Name alias) {
233        return new ItemPrices(alias, this);
234    }
235
236    @Override
237    public ItemPrices as(Table<?> alias) {
238        return new ItemPrices(alias.getQualifiedName(), this);
239    }
240
241    /**
242     * Rename this table
243     */
244    @Override
245    public ItemPrices rename(String name) {
246        return new ItemPrices(DSL.name(name), null);
247    }
248
249    /**
250     * Rename this table
251     */
252    @Override
253    public ItemPrices rename(Name name) {
254        return new ItemPrices(name, null);
255    }
256
257    /**
258     * Rename this table
259     */
260    @Override
261    public ItemPrices rename(Table<?> name) {
262        return new ItemPrices(name.getQualifiedName(), null);
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    public ItemPrices where(Condition condition) {
270        return new ItemPrices(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    public ItemPrices where(Collection<? extends Condition> conditions) {
278        return where(DSL.and(conditions));
279    }
280
281    /**
282     * Create an inline derived table from this table
283     */
284    @Override
285    public ItemPrices where(Condition... conditions) {
286        return where(DSL.and(conditions));
287    }
288
289    /**
290     * Create an inline derived table from this table
291     */
292    @Override
293    public ItemPrices where(Field<Boolean> condition) {
294        return where(DSL.condition(condition));
295    }
296
297    /**
298     * Create an inline derived table from this table
299     */
300    @Override
301    @PlainSQL
302    public ItemPrices where(SQL condition) {
303        return where(DSL.condition(condition));
304    }
305
306    /**
307     * Create an inline derived table from this table
308     */
309    @Override
310    @PlainSQL
311    public ItemPrices where(@Stringly.SQL String condition) {
312        return where(DSL.condition(condition));
313    }
314
315    /**
316     * Create an inline derived table from this table
317     */
318    @Override
319    @PlainSQL
320    public ItemPrices where(@Stringly.SQL String condition, Object... binds) {
321        return where(DSL.condition(condition, binds));
322    }
323
324    /**
325     * Create an inline derived table from this table
326     */
327    @Override
328    @PlainSQL
329    public ItemPrices where(@Stringly.SQL String condition, QueryPart... parts) {
330        return where(DSL.condition(condition, parts));
331    }
332
333    /**
334     * Create an inline derived table from this table
335     */
336    @Override
337    public ItemPrices whereExists(TableLike<?> select) {
338        return where(DSL.exists(select));
339    }
340
341    /**
342     * Create an inline derived table from this table
343     */
344    @Override
345    public ItemPrices whereNotExists(TableLike<?> select) {
346        return where(DSL.notExists(select));
347    }
348}