001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.inventory;
005
006
007import com.echothree.model.data.inventory.common.pk.InventoryCostingPoolPK;
008import com.echothree.model.data.inventory.common.pk.InventoryLayerDetailPK;
009import com.echothree.model.data.inventory.common.pk.InventoryLayerPK;
010import com.echothree.model.data.inventory.common.pk.InventoryTransactionLinePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.inventory.InventoryCostingPools.InventoryCostingPoolsPath;
013import com.echothree.model.jooq.server.tables.inventory.InventoryLayers.InventoryLayersPath;
014import com.echothree.model.jooq.server.tables.inventory.InventoryTransactionLines.InventoryTransactionLinesPath;
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.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class InventoryLayerDetails extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>inventorylayerdetails</code>
053     */
054    public static final InventoryLayerDetails InventoryLayerDetails = new InventoryLayerDetails();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> getRecordType() {
061        return com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails.class;
062    }
063
064    /**
065     * The column
066     * <code>inventorylayerdetails.invldt_inventorylayerdetailid</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, InventoryLayerDetailPK> INVENTORY_LAYER_DETAIL = createField(DSL.name("invldt_inventorylayerdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLayerDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLayerDetailPK(id), primaryKey -> primaryKey.getEntityId()));
069
070    /**
071     * The column
072     * <code>inventorylayerdetails.invldt_invl_inventorylayerid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, InventoryLayerPK> INVENTORY_LAYER = createField(DSL.name("invldt_invl_inventorylayerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLayerPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLayerPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column
078     * <code>inventorylayerdetails.invldt_invcpl_inventorycostingpoolid</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, InventoryCostingPoolPK> INVENTORY_COSTING_POOL = createField(DSL.name("invldt_invcpl_inventorycostingpoolid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryCostingPoolPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingPoolPK(id), primaryKey -> primaryKey.getEntityId()));
081
082    /**
083     * The column
084     * <code>inventorylayerdetails.invldt_inventorylayersequence</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, Integer> INVENTORY_LAYER_SEQUENCE = createField(DSL.name("invldt_inventorylayersequence"), SQLDataType.INTEGER.nullable(false), this, "");
087
088    /**
089     * The column
090     * <code>inventorylayerdetails.invldt_invtrxl_inventorytransactionlineid</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, InventoryTransactionLinePK> INVENTORY_TRANSACTION_LINE = createField(DSL.name("invldt_invtrxl_inventorytransactionlineid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryTransactionLinePK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionLinePK(id), primaryKey -> primaryKey.getEntityId()));
093
094    /**
095     * The column <code>inventorylayerdetails.invldt_receiptquantity</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, Long> RECEIPT_QUANTITY = createField(DSL.name("invldt_receiptquantity"), SQLDataType.BIGINT.nullable(false), this, "");
098
099    /**
100     * The column <code>inventorylayerdetails.invldt_unitcost</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, Long> UNIT_COST = createField(DSL.name("invldt_unitcost"), SQLDataType.BIGINT, this, "");
103
104    /**
105     * The column <code>inventorylayerdetails.invldt_description</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, String> DESCRIPTION = createField(DSL.name("invldt_description"), SQLDataType.VARCHAR(132), this, "");
108
109    /**
110     * The column <code>inventorylayerdetails.invldt_fromtime</code>.
111     */
112    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, Long> FROM_TIME = createField(DSL.name("invldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
113
114    /**
115     * The column <code>inventorylayerdetails.invldt_thrutime</code>.
116     */
117    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, Long> THRU_TIME = createField(DSL.name("invldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
118
119    private InventoryLayerDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> aliased) {
120        this(alias, aliased, (Field<?>[]) null, null);
121    }
122
123    private InventoryLayerDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> aliased, Field<?>[] parameters, Condition where) {
124        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
125    }
126
127    /**
128     * Create an aliased <code>inventorylayerdetails</code> table reference
129     */
130    public InventoryLayerDetails(String alias) {
131        this(DSL.name(alias), InventoryLayerDetails);
132    }
133
134    /**
135     * Create an aliased <code>inventorylayerdetails</code> table reference
136     */
137    public InventoryLayerDetails(Name alias) {
138        this(alias, InventoryLayerDetails);
139    }
140
141    /**
142     * Create a <code>inventorylayerdetails</code> table reference
143     */
144    public InventoryLayerDetails() {
145        this(DSL.name("inventorylayerdetails"), null);
146    }
147
148    public <O extends Record> InventoryLayerDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> parentPath) {
149        super(path, childPath, parentPath, InventoryLayerDetails);
150    }
151
152    /**
153     * A subtype implementing {@link Path} for simplified path-based joins.
154     */
155    public static class InventoryLayerDetailsPath extends InventoryLayerDetails implements Path<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> {
156
157        private static final long serialVersionUID = 1L;
158        public <O extends Record> InventoryLayerDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> parentPath) {
159            super(path, childPath, parentPath);
160        }
161        private InventoryLayerDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> aliased) {
162            super(alias, aliased);
163        }
164
165        @Override
166        public InventoryLayerDetailsPath as(String alias) {
167            return new InventoryLayerDetailsPath(DSL.name(alias), this);
168        }
169
170        @Override
171        public InventoryLayerDetailsPath as(Name alias) {
172            return new InventoryLayerDetailsPath(alias, this);
173        }
174
175        @Override
176        public InventoryLayerDetailsPath as(Table<?> alias) {
177            return new InventoryLayerDetailsPath(alias.getQualifiedName(), this);
178        }
179    }
180
181    @Override
182    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails> getPrimaryKey() {
183        return KeyRegistry.INVENTORY_LAYER_DETAILS_PK;
184    }
185
186    @Override
187    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails>> getUniqueKeys() {
188        return Arrays.asList(KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_LAYER_AND_THRU_TIME_UK, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_COSTING_POOL_AND_INVENTORY_LAYER_SEQUENCE_AND_THRU_TIME_UK);
189    }
190
191    @Override
192    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerDetails, ?>> getReferences() {
193        return Arrays.asList(KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_COSTING_POOL_FK, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_LAYER_FK, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_TRANSACTION_LINE_FK);
194    }
195
196    private transient InventoryCostingPoolsPath _invldt_invcpl_inventorycostingpoolid_fk;
197
198    /**
199     * Get the implicit join path to the <code>inventorycostingpools</code>
200     * table.
201     */
202    public InventoryCostingPoolsPath invldt_invcpl_inventorycostingpoolid_fk() {
203        if (_invldt_invcpl_inventorycostingpoolid_fk == null)
204            _invldt_invcpl_inventorycostingpoolid_fk = new InventoryCostingPoolsPath(this, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_COSTING_POOL_FK, null);
205
206        return _invldt_invcpl_inventorycostingpoolid_fk;
207    }
208
209    private transient InventoryLayersPath _invldt_invl_inventorylayerid_fk;
210
211    /**
212     * Get the implicit join path to the <code>inventorylayers</code> table.
213     */
214    public InventoryLayersPath invldt_invl_inventorylayerid_fk() {
215        if (_invldt_invl_inventorylayerid_fk == null)
216            _invldt_invl_inventorylayerid_fk = new InventoryLayersPath(this, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_LAYER_FK, null);
217
218        return _invldt_invl_inventorylayerid_fk;
219    }
220
221    private transient InventoryTransactionLinesPath _invldt_invtrxl_inventorytransactionlineid_fk;
222
223    /**
224     * Get the implicit join path to the <code>inventorytransactionlines</code>
225     * table.
226     */
227    public InventoryTransactionLinesPath invldt_invtrxl_inventorytransactionlineid_fk() {
228        if (_invldt_invtrxl_inventorytransactionlineid_fk == null)
229            _invldt_invtrxl_inventorytransactionlineid_fk = new InventoryTransactionLinesPath(this, KeyRegistry.INVENTORY_LAYER_DETAILS_INVENTORY_TRANSACTION_LINE_FK, null);
230
231        return _invldt_invtrxl_inventorytransactionlineid_fk;
232    }
233
234    @Override
235    public InventoryLayerDetails as(String alias) {
236        return new InventoryLayerDetails(DSL.name(alias), this);
237    }
238
239    @Override
240    public InventoryLayerDetails as(Name alias) {
241        return new InventoryLayerDetails(alias, this);
242    }
243
244    @Override
245    public InventoryLayerDetails as(Table<?> alias) {
246        return new InventoryLayerDetails(alias.getQualifiedName(), this);
247    }
248
249    /**
250     * Rename this table
251     */
252    @Override
253    public InventoryLayerDetails rename(String name) {
254        return new InventoryLayerDetails(DSL.name(name), null);
255    }
256
257    /**
258     * Rename this table
259     */
260    @Override
261    public InventoryLayerDetails rename(Name name) {
262        return new InventoryLayerDetails(name, null);
263    }
264
265    /**
266     * Rename this table
267     */
268    @Override
269    public InventoryLayerDetails rename(Table<?> name) {
270        return new InventoryLayerDetails(name.getQualifiedName(), null);
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    public InventoryLayerDetails where(Condition condition) {
278        return new InventoryLayerDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
279    }
280
281    /**
282     * Create an inline derived table from this table
283     */
284    @Override
285    public InventoryLayerDetails where(Collection<? extends Condition> conditions) {
286        return where(DSL.and(conditions));
287    }
288
289    /**
290     * Create an inline derived table from this table
291     */
292    @Override
293    public InventoryLayerDetails where(Condition... conditions) {
294        return where(DSL.and(conditions));
295    }
296
297    /**
298     * Create an inline derived table from this table
299     */
300    @Override
301    public InventoryLayerDetails where(Field<Boolean> condition) {
302        return where(DSL.condition(condition));
303    }
304
305    /**
306     * Create an inline derived table from this table
307     */
308    @Override
309    @PlainSQL
310    public InventoryLayerDetails where(SQL condition) {
311        return where(DSL.condition(condition));
312    }
313
314    /**
315     * Create an inline derived table from this table
316     */
317    @Override
318    @PlainSQL
319    public InventoryLayerDetails where(@Stringly.SQL String condition) {
320        return where(DSL.condition(condition));
321    }
322
323    /**
324     * Create an inline derived table from this table
325     */
326    @Override
327    @PlainSQL
328    public InventoryLayerDetails where(@Stringly.SQL String condition, Object... binds) {
329        return where(DSL.condition(condition, binds));
330    }
331
332    /**
333     * Create an inline derived table from this table
334     */
335    @Override
336    @PlainSQL
337    public InventoryLayerDetails where(@Stringly.SQL String condition, QueryPart... parts) {
338        return where(DSL.condition(condition, parts));
339    }
340
341    /**
342     * Create an inline derived table from this table
343     */
344    @Override
345    public InventoryLayerDetails whereExists(TableLike<?> select) {
346        return where(DSL.exists(select));
347    }
348
349    /**
350     * Create an inline derived table from this table
351     */
352    @Override
353    public InventoryLayerDetails whereNotExists(TableLike<?> select) {
354        return where(DSL.notExists(select));
355    }
356}