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