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.ItemUnitPriceLimitPK;
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.Name;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.SQL;
030import org.jooq.Stringly;
031import org.jooq.Table;
032import org.jooq.TableField;
033import org.jooq.TableLike;
034import org.jooq.TableOptions;
035import org.jooq.UniqueKey;
036import org.jooq.impl.DSL;
037import org.jooq.impl.Internal;
038import org.jooq.impl.SQLDataType;
039import org.jooq.impl.TableImpl;
040
041
042/**
043 * This class is generated by jOOQ.
044 */
045@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
046public class ItemUnitPriceLimits extends TableImpl<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits> {
047
048    private static final long serialVersionUID = 1L;
049
050    /**
051     * The reference instance of <code>itemunitpricelimits</code>
052     */
053    public static final ItemUnitPriceLimits ItemUnitPriceLimits = new ItemUnitPriceLimits();
054
055    /**
056     * The class holding records for this type
057     */
058    @Override
059    public Class<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits> getRecordType() {
060        return com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits.class;
061    }
062
063    /**
064     * The column <code>itemunitpricelimits.iupl_itemunitpricelimitid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, ItemUnitPriceLimitPK> ITEM_UNIT_PRICE_LIMIT = createField(DSL.name("iupl_itemunitpricelimitid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemUnitPriceLimitPK.class, id -> new com.echothree.model.data.item.common.pk.ItemUnitPriceLimitPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column <code>itemunitpricelimits.iupl_itm_itemid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, ItemPK> ITEM = createField(DSL.name("iupl_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()));
072
073    /**
074     * The column
075     * <code>itemunitpricelimits.iupl_invcon_inventoryconditionid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("iupl_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()));
078
079    /**
080     * The column
081     * <code>itemunitpricelimits.iupl_uomt_unitofmeasuretypeid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("iupl_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()));
084
085    /**
086     * The column <code>itemunitpricelimits.iupl_cur_currencyid</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, CurrencyPK> CURRENCY = createField(DSL.name("iupl_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()));
089
090    /**
091     * The column <code>itemunitpricelimits.iupl_minimumunitprice</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, Long> MINIMUM_UNIT_PRICE = createField(DSL.name("iupl_minimumunitprice"), SQLDataType.BIGINT, this, "");
094
095    /**
096     * The column <code>itemunitpricelimits.iupl_maximumunitprice</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, Long> MAXIMUM_UNIT_PRICE = createField(DSL.name("iupl_maximumunitprice"), SQLDataType.BIGINT, this, "");
099
100    /**
101     * The column <code>itemunitpricelimits.iupl_fromtime</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, Long> FROM_TIME = createField(DSL.name("iupl_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
104
105    /**
106     * The column <code>itemunitpricelimits.iupl_thrutime</code>.
107     */
108    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, Long> THRU_TIME = createField(DSL.name("iupl_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
109
110    private ItemUnitPriceLimits(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits> aliased) {
111        this(alias, aliased, (Field<?>[]) null, null);
112    }
113
114    private ItemUnitPriceLimits(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits> aliased, Field<?>[] parameters, Condition where) {
115        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
116    }
117
118    /**
119     * Create an aliased <code>itemunitpricelimits</code> table reference
120     */
121    public ItemUnitPriceLimits(String alias) {
122        this(DSL.name(alias), ItemUnitPriceLimits);
123    }
124
125    /**
126     * Create an aliased <code>itemunitpricelimits</code> table reference
127     */
128    public ItemUnitPriceLimits(Name alias) {
129        this(alias, ItemUnitPriceLimits);
130    }
131
132    /**
133     * Create a <code>itemunitpricelimits</code> table reference
134     */
135    public ItemUnitPriceLimits() {
136        this(DSL.name("itemunitpricelimits"), null);
137    }
138
139    @Override
140    public UniqueKey<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits> getPrimaryKey() {
141        return KeyRegistry.ITEM_UNIT_PRICE_LIMITS_PK;
142    }
143
144    @Override
145    public List<UniqueKey<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits>> getUniqueKeys() {
146        return Arrays.asList(KeyRegistry.ITEM_UNIT_PRICE_LIMITS_ITEM_AND_INVENTORY_CONDITION_AND_UNIT_OF_MEASURE_TYPE_AND_CURRENCY_AND_THRU_TIME_UK);
147    }
148
149    @Override
150    public List<ForeignKey<com.echothree.model.jooq.server.records.item.ItemUnitPriceLimits, ?>> getReferences() {
151        return Arrays.asList(KeyRegistry.ITEM_UNIT_PRICE_LIMITS_CURRENCY_FK, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_INVENTORY_CONDITION_FK, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_ITEM_FK, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_UNIT_OF_MEASURE_TYPE_FK);
152    }
153
154    private transient CurrenciesPath _iupl_cur_currencyid_fk;
155
156    /**
157     * Get the implicit join path to the <code>currencies</code> table.
158     */
159    public CurrenciesPath iupl_cur_currencyid_fk() {
160        if (_iupl_cur_currencyid_fk == null)
161            _iupl_cur_currencyid_fk = new CurrenciesPath(this, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_CURRENCY_FK, null);
162
163        return _iupl_cur_currencyid_fk;
164    }
165
166    private transient InventoryConditionsPath _iupl_invcon_inventoryconditionid_fk;
167
168    /**
169     * Get the implicit join path to the <code>inventoryconditions</code> table.
170     */
171    public InventoryConditionsPath iupl_invcon_inventoryconditionid_fk() {
172        if (_iupl_invcon_inventoryconditionid_fk == null)
173            _iupl_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_INVENTORY_CONDITION_FK, null);
174
175        return _iupl_invcon_inventoryconditionid_fk;
176    }
177
178    private transient ItemsPath _iupl_itm_itemid_fk;
179
180    /**
181     * Get the implicit join path to the <code>items</code> table.
182     */
183    public ItemsPath iupl_itm_itemid_fk() {
184        if (_iupl_itm_itemid_fk == null)
185            _iupl_itm_itemid_fk = new ItemsPath(this, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_ITEM_FK, null);
186
187        return _iupl_itm_itemid_fk;
188    }
189
190    private transient UnitOfMeasureTypesPath _iupl_uomt_unitofmeasuretypeid_fk;
191
192    /**
193     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
194     */
195    public UnitOfMeasureTypesPath iupl_uomt_unitofmeasuretypeid_fk() {
196        if (_iupl_uomt_unitofmeasuretypeid_fk == null)
197            _iupl_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.ITEM_UNIT_PRICE_LIMITS_UNIT_OF_MEASURE_TYPE_FK, null);
198
199        return _iupl_uomt_unitofmeasuretypeid_fk;
200    }
201
202    @Override
203    public ItemUnitPriceLimits as(String alias) {
204        return new ItemUnitPriceLimits(DSL.name(alias), this);
205    }
206
207    @Override
208    public ItemUnitPriceLimits as(Name alias) {
209        return new ItemUnitPriceLimits(alias, this);
210    }
211
212    @Override
213    public ItemUnitPriceLimits as(Table<?> alias) {
214        return new ItemUnitPriceLimits(alias.getQualifiedName(), this);
215    }
216
217    /**
218     * Rename this table
219     */
220    @Override
221    public ItemUnitPriceLimits rename(String name) {
222        return new ItemUnitPriceLimits(DSL.name(name), null);
223    }
224
225    /**
226     * Rename this table
227     */
228    @Override
229    public ItemUnitPriceLimits rename(Name name) {
230        return new ItemUnitPriceLimits(name, null);
231    }
232
233    /**
234     * Rename this table
235     */
236    @Override
237    public ItemUnitPriceLimits rename(Table<?> name) {
238        return new ItemUnitPriceLimits(name.getQualifiedName(), null);
239    }
240
241    /**
242     * Create an inline derived table from this table
243     */
244    @Override
245    public ItemUnitPriceLimits where(Condition condition) {
246        return new ItemUnitPriceLimits(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
247    }
248
249    /**
250     * Create an inline derived table from this table
251     */
252    @Override
253    public ItemUnitPriceLimits where(Collection<? extends Condition> conditions) {
254        return where(DSL.and(conditions));
255    }
256
257    /**
258     * Create an inline derived table from this table
259     */
260    @Override
261    public ItemUnitPriceLimits where(Condition... conditions) {
262        return where(DSL.and(conditions));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    public ItemUnitPriceLimits where(Field<Boolean> condition) {
270        return where(DSL.condition(condition));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    @PlainSQL
278    public ItemUnitPriceLimits where(SQL condition) {
279        return where(DSL.condition(condition));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    @PlainSQL
287    public ItemUnitPriceLimits where(@Stringly.SQL String condition) {
288        return where(DSL.condition(condition));
289    }
290
291    /**
292     * Create an inline derived table from this table
293     */
294    @Override
295    @PlainSQL
296    public ItemUnitPriceLimits where(@Stringly.SQL String condition, Object... binds) {
297        return where(DSL.condition(condition, binds));
298    }
299
300    /**
301     * Create an inline derived table from this table
302     */
303    @Override
304    @PlainSQL
305    public ItemUnitPriceLimits where(@Stringly.SQL String condition, QueryPart... parts) {
306        return where(DSL.condition(condition, parts));
307    }
308
309    /**
310     * Create an inline derived table from this table
311     */
312    @Override
313    public ItemUnitPriceLimits whereExists(TableLike<?> select) {
314        return where(DSL.exists(select));
315    }
316
317    /**
318     * Create an inline derived table from this table
319     */
320    @Override
321    public ItemUnitPriceLimits whereNotExists(TableLike<?> select) {
322        return where(DSL.notExists(select));
323    }
324}