001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.shipment;
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.order.common.pk.OrderLinePK;
010import com.echothree.model.data.shipment.common.pk.ShipmentLineDetailPK;
011import com.echothree.model.data.shipment.common.pk.ShipmentLinePK;
012import com.echothree.model.data.shipment.common.pk.ShipmentPK;
013import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK;
014import com.echothree.model.jooq.server.KeyRegistry;
015import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
016import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
017import com.echothree.model.jooq.server.tables.order.OrderLines.OrderLinesPath;
018import com.echothree.model.jooq.server.tables.shipment.ShipmentLines.ShipmentLinesPath;
019import com.echothree.model.jooq.server.tables.shipment.Shipments.ShipmentsPath;
020import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath;
021
022import java.util.Arrays;
023import java.util.Collection;
024import java.util.List;
025
026import org.jooq.Condition;
027import org.jooq.Converter;
028import org.jooq.Field;
029import org.jooq.ForeignKey;
030import org.jooq.InverseForeignKey;
031import org.jooq.Name;
032import org.jooq.Path;
033import org.jooq.PlainSQL;
034import org.jooq.QueryPart;
035import org.jooq.Record;
036import org.jooq.SQL;
037import org.jooq.Stringly;
038import org.jooq.Table;
039import org.jooq.TableField;
040import org.jooq.TableLike;
041import org.jooq.TableOptions;
042import org.jooq.UniqueKey;
043import org.jooq.impl.DSL;
044import org.jooq.impl.Internal;
045import org.jooq.impl.SQLDataType;
046import org.jooq.impl.TableImpl;
047
048
049/**
050 * This class is generated by jOOQ.
051 */
052@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
053public class ShipmentLineDetails extends TableImpl<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> {
054
055    private static final long serialVersionUID = 1L;
056
057    /**
058     * The reference instance of <code>shipmentlinedetails</code>
059     */
060    public static final ShipmentLineDetails ShipmentLineDetails = new ShipmentLineDetails();
061
062    /**
063     * The class holding records for this type
064     */
065    @Override
066    public Class<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> getRecordType() {
067        return com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails.class;
068    }
069
070    /**
071     * The column <code>shipmentlinedetails.shpldt_shipmentlinedetailid</code>.
072     */
073    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ShipmentLineDetailPK> SHIPMENT_LINE_DETAIL = createField(DSL.name("shpldt_shipmentlinedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ShipmentLineDetailPK.class, id -> new com.echothree.model.data.shipment.common.pk.ShipmentLineDetailPK(id), primaryKey -> primaryKey.getEntityId()));
074
075    /**
076     * The column <code>shipmentlinedetails.shpldt_shpl_shipmentlineid</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ShipmentLinePK> SHIPMENT_LINE = createField(DSL.name("shpldt_shpl_shipmentlineid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ShipmentLinePK.class, id -> new com.echothree.model.data.shipment.common.pk.ShipmentLinePK(id), primaryKey -> primaryKey.getEntityId()));
079
080    /**
081     * The column <code>shipmentlinedetails.shpldt_shp_shipmentid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ShipmentPK> SHIPMENT = createField(DSL.name("shpldt_shp_shipmentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ShipmentPK.class, id -> new com.echothree.model.data.shipment.common.pk.ShipmentPK(id), primaryKey -> primaryKey.getEntityId()));
084
085    /**
086     * The column <code>shipmentlinedetails.shpldt_shipmentlinesequence</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, Integer> SHIPMENT_LINE_SEQUENCE = createField(DSL.name("shpldt_shipmentlinesequence"), SQLDataType.INTEGER.nullable(false), this, "");
089
090    /**
091     * The column <code>shipmentlinedetails.shpldt_parentshipmentlineid</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ShipmentLinePK> PARENT_SHIPMENT_LINE = createField(DSL.name("shpldt_parentshipmentlineid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ShipmentLinePK.class, id -> new com.echothree.model.data.shipment.common.pk.ShipmentLinePK(id), primaryKey -> primaryKey.getEntityId()));
094
095    /**
096     * The column <code>shipmentlinedetails.shpldt_ordl_orderlineid</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, OrderLinePK> ORDER_LINE = createField(DSL.name("shpldt_ordl_orderlineid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, OrderLinePK.class, id -> new com.echothree.model.data.order.common.pk.OrderLinePK(id), primaryKey -> primaryKey.getEntityId()));
099
100    /**
101     * The column <code>shipmentlinedetails.shpldt_itm_itemid</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ItemPK> ITEM = createField(DSL.name("shpldt_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()));
104
105    /**
106     * The column
107     * <code>shipmentlinedetails.shpldt_invcon_inventoryconditionid</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("shpldt_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()));
110
111    /**
112     * The column
113     * <code>shipmentlinedetails.shpldt_uomt_unitofmeasuretypeid</code>.
114     */
115    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("shpldt_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()));
116
117    /**
118     * The column <code>shipmentlinedetails.shpldt_quantity</code>.
119     */
120    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, Long> QUANTITY = createField(DSL.name("shpldt_quantity"), SQLDataType.BIGINT.nullable(false), this, "");
121
122    /**
123     * The column <code>shipmentlinedetails.shpldt_fromtime</code>.
124     */
125    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, Long> FROM_TIME = createField(DSL.name("shpldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
126
127    /**
128     * The column <code>shipmentlinedetails.shpldt_thrutime</code>.
129     */
130    public final TableField<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, Long> THRU_TIME = createField(DSL.name("shpldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
131
132    private ShipmentLineDetails(Name alias, Table<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> aliased) {
133        this(alias, aliased, (Field<?>[]) null, null);
134    }
135
136    private ShipmentLineDetails(Name alias, Table<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> aliased, Field<?>[] parameters, Condition where) {
137        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
138    }
139
140    /**
141     * Create an aliased <code>shipmentlinedetails</code> table reference
142     */
143    public ShipmentLineDetails(String alias) {
144        this(DSL.name(alias), ShipmentLineDetails);
145    }
146
147    /**
148     * Create an aliased <code>shipmentlinedetails</code> table reference
149     */
150    public ShipmentLineDetails(Name alias) {
151        this(alias, ShipmentLineDetails);
152    }
153
154    /**
155     * Create a <code>shipmentlinedetails</code> table reference
156     */
157    public ShipmentLineDetails() {
158        this(DSL.name("shipmentlinedetails"), null);
159    }
160
161    public <O extends Record> ShipmentLineDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> parentPath) {
162        super(path, childPath, parentPath, ShipmentLineDetails);
163    }
164
165    /**
166     * A subtype implementing {@link Path} for simplified path-based joins.
167     */
168    public static class ShipmentLineDetailsPath extends ShipmentLineDetails implements Path<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> {
169
170        private static final long serialVersionUID = 1L;
171        public <O extends Record> ShipmentLineDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> parentPath) {
172            super(path, childPath, parentPath);
173        }
174        private ShipmentLineDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> aliased) {
175            super(alias, aliased);
176        }
177
178        @Override
179        public ShipmentLineDetailsPath as(String alias) {
180            return new ShipmentLineDetailsPath(DSL.name(alias), this);
181        }
182
183        @Override
184        public ShipmentLineDetailsPath as(Name alias) {
185            return new ShipmentLineDetailsPath(alias, this);
186        }
187
188        @Override
189        public ShipmentLineDetailsPath as(Table<?> alias) {
190            return new ShipmentLineDetailsPath(alias.getQualifiedName(), this);
191        }
192    }
193
194    @Override
195    public UniqueKey<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails> getPrimaryKey() {
196        return KeyRegistry.SHIPMENT_LINE_DETAILS_PK;
197    }
198
199    @Override
200    public List<UniqueKey<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails>> getUniqueKeys() {
201        return Arrays.asList(KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_LINE_AND_THRU_TIME_UK, KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_AND_SHIPMENT_LINE_SEQUENCE_AND_THRU_TIME_UK);
202    }
203
204    @Override
205    public List<ForeignKey<com.echothree.model.jooq.server.records.shipment.ShipmentLineDetails, ?>> getReferences() {
206        return Arrays.asList(KeyRegistry.SHIPMENT_LINE_DETAILS_INVENTORY_CONDITION_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_ITEM_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_ORDER_LINE_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_PARENT_SHIPMENT_LINE_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_LINE_FK, KeyRegistry.SHIPMENT_LINE_DETAILS_UNIT_OF_MEASURE_TYPE_FK);
207    }
208
209    private transient InventoryConditionsPath _shpldt_invcon_inventoryconditionid_fk;
210
211    /**
212     * Get the implicit join path to the <code>inventoryconditions</code> table.
213     */
214    public InventoryConditionsPath shpldt_invcon_inventoryconditionid_fk() {
215        if (_shpldt_invcon_inventoryconditionid_fk == null)
216            _shpldt_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_INVENTORY_CONDITION_FK, null);
217
218        return _shpldt_invcon_inventoryconditionid_fk;
219    }
220
221    private transient ItemsPath _shpldt_itm_itemid_fk;
222
223    /**
224     * Get the implicit join path to the <code>items</code> table.
225     */
226    public ItemsPath shpldt_itm_itemid_fk() {
227        if (_shpldt_itm_itemid_fk == null)
228            _shpldt_itm_itemid_fk = new ItemsPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_ITEM_FK, null);
229
230        return _shpldt_itm_itemid_fk;
231    }
232
233    private transient OrderLinesPath _shpldt_ordl_orderlineid_fk;
234
235    /**
236     * Get the implicit join path to the <code>orderlines</code> table.
237     */
238    public OrderLinesPath shpldt_ordl_orderlineid_fk() {
239        if (_shpldt_ordl_orderlineid_fk == null)
240            _shpldt_ordl_orderlineid_fk = new OrderLinesPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_ORDER_LINE_FK, null);
241
242        return _shpldt_ordl_orderlineid_fk;
243    }
244
245    private transient ShipmentLinesPath _shpldt_parentshipmentlineid_fk;
246
247    /**
248     * Get the implicit join path to the <code>shipmentlines</code> table, via
249     * the <code>shpldt_parentshipmentlineid_fk</code> key.
250     */
251    public ShipmentLinesPath shpldt_parentshipmentlineid_fk() {
252        if (_shpldt_parentshipmentlineid_fk == null)
253            _shpldt_parentshipmentlineid_fk = new ShipmentLinesPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_PARENT_SHIPMENT_LINE_FK, null);
254
255        return _shpldt_parentshipmentlineid_fk;
256    }
257
258    private transient ShipmentsPath _shpldt_shp_shipmentid_fk;
259
260    /**
261     * Get the implicit join path to the <code>shipments</code> table.
262     */
263    public ShipmentsPath shpldt_shp_shipmentid_fk() {
264        if (_shpldt_shp_shipmentid_fk == null)
265            _shpldt_shp_shipmentid_fk = new ShipmentsPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_FK, null);
266
267        return _shpldt_shp_shipmentid_fk;
268    }
269
270    private transient ShipmentLinesPath _shpldt_shpl_shipmentlineid_fk;
271
272    /**
273     * Get the implicit join path to the <code>shipmentlines</code> table, via
274     * the <code>shpldt_shpl_shipmentlineid_fk</code> key.
275     */
276    public ShipmentLinesPath shpldt_shpl_shipmentlineid_fk() {
277        if (_shpldt_shpl_shipmentlineid_fk == null)
278            _shpldt_shpl_shipmentlineid_fk = new ShipmentLinesPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_SHIPMENT_LINE_FK, null);
279
280        return _shpldt_shpl_shipmentlineid_fk;
281    }
282
283    private transient UnitOfMeasureTypesPath _shpldt_uomt_unitofmeasuretypeid_fk;
284
285    /**
286     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
287     */
288    public UnitOfMeasureTypesPath shpldt_uomt_unitofmeasuretypeid_fk() {
289        if (_shpldt_uomt_unitofmeasuretypeid_fk == null)
290            _shpldt_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.SHIPMENT_LINE_DETAILS_UNIT_OF_MEASURE_TYPE_FK, null);
291
292        return _shpldt_uomt_unitofmeasuretypeid_fk;
293    }
294
295    @Override
296    public ShipmentLineDetails as(String alias) {
297        return new ShipmentLineDetails(DSL.name(alias), this);
298    }
299
300    @Override
301    public ShipmentLineDetails as(Name alias) {
302        return new ShipmentLineDetails(alias, this);
303    }
304
305    @Override
306    public ShipmentLineDetails as(Table<?> alias) {
307        return new ShipmentLineDetails(alias.getQualifiedName(), this);
308    }
309
310    /**
311     * Rename this table
312     */
313    @Override
314    public ShipmentLineDetails rename(String name) {
315        return new ShipmentLineDetails(DSL.name(name), null);
316    }
317
318    /**
319     * Rename this table
320     */
321    @Override
322    public ShipmentLineDetails rename(Name name) {
323        return new ShipmentLineDetails(name, null);
324    }
325
326    /**
327     * Rename this table
328     */
329    @Override
330    public ShipmentLineDetails rename(Table<?> name) {
331        return new ShipmentLineDetails(name.getQualifiedName(), null);
332    }
333
334    /**
335     * Create an inline derived table from this table
336     */
337    @Override
338    public ShipmentLineDetails where(Condition condition) {
339        return new ShipmentLineDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
340    }
341
342    /**
343     * Create an inline derived table from this table
344     */
345    @Override
346    public ShipmentLineDetails where(Collection<? extends Condition> conditions) {
347        return where(DSL.and(conditions));
348    }
349
350    /**
351     * Create an inline derived table from this table
352     */
353    @Override
354    public ShipmentLineDetails where(Condition... conditions) {
355        return where(DSL.and(conditions));
356    }
357
358    /**
359     * Create an inline derived table from this table
360     */
361    @Override
362    public ShipmentLineDetails where(Field<Boolean> condition) {
363        return where(DSL.condition(condition));
364    }
365
366    /**
367     * Create an inline derived table from this table
368     */
369    @Override
370    @PlainSQL
371    public ShipmentLineDetails where(SQL condition) {
372        return where(DSL.condition(condition));
373    }
374
375    /**
376     * Create an inline derived table from this table
377     */
378    @Override
379    @PlainSQL
380    public ShipmentLineDetails where(@Stringly.SQL String condition) {
381        return where(DSL.condition(condition));
382    }
383
384    /**
385     * Create an inline derived table from this table
386     */
387    @Override
388    @PlainSQL
389    public ShipmentLineDetails where(@Stringly.SQL String condition, Object... binds) {
390        return where(DSL.condition(condition, binds));
391    }
392
393    /**
394     * Create an inline derived table from this table
395     */
396    @Override
397    @PlainSQL
398    public ShipmentLineDetails where(@Stringly.SQL String condition, QueryPart... parts) {
399        return where(DSL.condition(condition, parts));
400    }
401
402    /**
403     * Create an inline derived table from this table
404     */
405    @Override
406    public ShipmentLineDetails whereExists(TableLike<?> select) {
407        return where(DSL.exists(select));
408    }
409
410    /**
411     * Create an inline derived table from this table
412     */
413    @Override
414    public ShipmentLineDetails whereNotExists(TableLike<?> select) {
415        return where(DSL.notExists(select));
416    }
417}