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