001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.item;
005
006
007import com.echothree.model.data.inventory.common.pk.InventoryConditionPK;
008import com.echothree.model.data.item.common.pk.ItemPK;
009import com.echothree.model.data.item.common.pk.ItemUnitLimitPK;
010import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
013import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
014import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath;
015
016import java.util.Arrays;
017import java.util.Collection;
018import java.util.List;
019
020import org.jooq.Condition;
021import org.jooq.Converter;
022import org.jooq.Field;
023import org.jooq.ForeignKey;
024import org.jooq.Name;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.SQL;
028import org.jooq.Stringly;
029import org.jooq.Table;
030import org.jooq.TableField;
031import org.jooq.TableLike;
032import org.jooq.TableOptions;
033import org.jooq.UniqueKey;
034import org.jooq.impl.DSL;
035import org.jooq.impl.Internal;
036import org.jooq.impl.SQLDataType;
037import org.jooq.impl.TableImpl;
038
039
040/**
041 * This class is generated by jOOQ.
042 */
043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
044public class ItemUnitLimits extends TableImpl<com.echothree.model.jooq.server.records.item.ItemUnitLimits> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>itemunitlimits</code>
050     */
051    public static final ItemUnitLimits ItemUnitLimits = new ItemUnitLimits();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.item.ItemUnitLimits> getRecordType() {
058        return com.echothree.model.jooq.server.records.item.ItemUnitLimits.class;
059    }
060
061    /**
062     * The column <code>itemunitlimits.iul_itemunitlimitid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, ItemUnitLimitPK> ITEM_UNIT_LIMIT = createField(DSL.name("iul_itemunitlimitid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemUnitLimitPK.class, id -> new com.echothree.model.data.item.common.pk.ItemUnitLimitPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column <code>itemunitlimits.iul_itm_itemid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, ItemPK> ITEM = createField(DSL.name("iul_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()));
070
071    /**
072     * The column <code>itemunitlimits.iul_invcon_inventoryconditionid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("iul_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()));
075
076    /**
077     * The column <code>itemunitlimits.iul_uomt_unitofmeasuretypeid</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("iul_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()));
080
081    /**
082     * The column <code>itemunitlimits.iul_minimumquantity</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, Long> MINIMUM_QUANTITY = createField(DSL.name("iul_minimumquantity"), SQLDataType.BIGINT, this, "");
085
086    /**
087     * The column <code>itemunitlimits.iul_maximumquantity</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, Long> MAXIMUM_QUANTITY = createField(DSL.name("iul_maximumquantity"), SQLDataType.BIGINT, this, "");
090
091    /**
092     * The column <code>itemunitlimits.iul_fromtime</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, Long> FROM_TIME = createField(DSL.name("iul_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
095
096    /**
097     * The column <code>itemunitlimits.iul_thrutime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.item.ItemUnitLimits, Long> THRU_TIME = createField(DSL.name("iul_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    private ItemUnitLimits(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemUnitLimits> aliased) {
102        this(alias, aliased, (Field<?>[]) null, null);
103    }
104
105    private ItemUnitLimits(Name alias, Table<com.echothree.model.jooq.server.records.item.ItemUnitLimits> aliased, Field<?>[] parameters, Condition where) {
106        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
107    }
108
109    /**
110     * Create an aliased <code>itemunitlimits</code> table reference
111     */
112    public ItemUnitLimits(String alias) {
113        this(DSL.name(alias), ItemUnitLimits);
114    }
115
116    /**
117     * Create an aliased <code>itemunitlimits</code> table reference
118     */
119    public ItemUnitLimits(Name alias) {
120        this(alias, ItemUnitLimits);
121    }
122
123    /**
124     * Create a <code>itemunitlimits</code> table reference
125     */
126    public ItemUnitLimits() {
127        this(DSL.name("itemunitlimits"), null);
128    }
129
130    @Override
131    public UniqueKey<com.echothree.model.jooq.server.records.item.ItemUnitLimits> getPrimaryKey() {
132        return KeyRegistry.ITEM_UNIT_LIMITS_PK;
133    }
134
135    @Override
136    public List<UniqueKey<com.echothree.model.jooq.server.records.item.ItemUnitLimits>> getUniqueKeys() {
137        return Arrays.asList(KeyRegistry.ITEM_UNIT_LIMITS_ITEM_AND_INVENTORY_CONDITION_AND_UNIT_OF_MEASURE_TYPE_AND_THRU_TIME_UK);
138    }
139
140    @Override
141    public List<ForeignKey<com.echothree.model.jooq.server.records.item.ItemUnitLimits, ?>> getReferences() {
142        return Arrays.asList(KeyRegistry.ITEM_UNIT_LIMITS_INVENTORY_CONDITION_FK, KeyRegistry.ITEM_UNIT_LIMITS_ITEM_FK, KeyRegistry.ITEM_UNIT_LIMITS_UNIT_OF_MEASURE_TYPE_FK);
143    }
144
145    private transient InventoryConditionsPath _iul_invcon_inventoryconditionid_fk;
146
147    /**
148     * Get the implicit join path to the <code>inventoryconditions</code> table.
149     */
150    public InventoryConditionsPath iul_invcon_inventoryconditionid_fk() {
151        if (_iul_invcon_inventoryconditionid_fk == null)
152            _iul_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.ITEM_UNIT_LIMITS_INVENTORY_CONDITION_FK, null);
153
154        return _iul_invcon_inventoryconditionid_fk;
155    }
156
157    private transient ItemsPath _iul_itm_itemid_fk;
158
159    /**
160     * Get the implicit join path to the <code>items</code> table.
161     */
162    public ItemsPath iul_itm_itemid_fk() {
163        if (_iul_itm_itemid_fk == null)
164            _iul_itm_itemid_fk = new ItemsPath(this, KeyRegistry.ITEM_UNIT_LIMITS_ITEM_FK, null);
165
166        return _iul_itm_itemid_fk;
167    }
168
169    private transient UnitOfMeasureTypesPath _iul_uomt_unitofmeasuretypeid_fk;
170
171    /**
172     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
173     */
174    public UnitOfMeasureTypesPath iul_uomt_unitofmeasuretypeid_fk() {
175        if (_iul_uomt_unitofmeasuretypeid_fk == null)
176            _iul_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.ITEM_UNIT_LIMITS_UNIT_OF_MEASURE_TYPE_FK, null);
177
178        return _iul_uomt_unitofmeasuretypeid_fk;
179    }
180
181    @Override
182    public ItemUnitLimits as(String alias) {
183        return new ItemUnitLimits(DSL.name(alias), this);
184    }
185
186    @Override
187    public ItemUnitLimits as(Name alias) {
188        return new ItemUnitLimits(alias, this);
189    }
190
191    @Override
192    public ItemUnitLimits as(Table<?> alias) {
193        return new ItemUnitLimits(alias.getQualifiedName(), this);
194    }
195
196    /**
197     * Rename this table
198     */
199    @Override
200    public ItemUnitLimits rename(String name) {
201        return new ItemUnitLimits(DSL.name(name), null);
202    }
203
204    /**
205     * Rename this table
206     */
207    @Override
208    public ItemUnitLimits rename(Name name) {
209        return new ItemUnitLimits(name, null);
210    }
211
212    /**
213     * Rename this table
214     */
215    @Override
216    public ItemUnitLimits rename(Table<?> name) {
217        return new ItemUnitLimits(name.getQualifiedName(), null);
218    }
219
220    /**
221     * Create an inline derived table from this table
222     */
223    @Override
224    public ItemUnitLimits where(Condition condition) {
225        return new ItemUnitLimits(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
226    }
227
228    /**
229     * Create an inline derived table from this table
230     */
231    @Override
232    public ItemUnitLimits where(Collection<? extends Condition> conditions) {
233        return where(DSL.and(conditions));
234    }
235
236    /**
237     * Create an inline derived table from this table
238     */
239    @Override
240    public ItemUnitLimits where(Condition... conditions) {
241        return where(DSL.and(conditions));
242    }
243
244    /**
245     * Create an inline derived table from this table
246     */
247    @Override
248    public ItemUnitLimits where(Field<Boolean> condition) {
249        return where(DSL.condition(condition));
250    }
251
252    /**
253     * Create an inline derived table from this table
254     */
255    @Override
256    @PlainSQL
257    public ItemUnitLimits where(SQL condition) {
258        return where(DSL.condition(condition));
259    }
260
261    /**
262     * Create an inline derived table from this table
263     */
264    @Override
265    @PlainSQL
266    public ItemUnitLimits where(@Stringly.SQL String condition) {
267        return where(DSL.condition(condition));
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    @PlainSQL
275    public ItemUnitLimits where(@Stringly.SQL String condition, Object... binds) {
276        return where(DSL.condition(condition, binds));
277    }
278
279    /**
280     * Create an inline derived table from this table
281     */
282    @Override
283    @PlainSQL
284    public ItemUnitLimits where(@Stringly.SQL String condition, QueryPart... parts) {
285        return where(DSL.condition(condition, parts));
286    }
287
288    /**
289     * Create an inline derived table from this table
290     */
291    @Override
292    public ItemUnitLimits whereExists(TableLike<?> select) {
293        return where(DSL.exists(select));
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    public ItemUnitLimits whereNotExists(TableLike<?> select) {
301        return where(DSL.notExists(select));
302    }
303}