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