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