001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.order;
005
006
007import com.echothree.model.data.order.common.pk.OrderLineAdjustmentDetailPK;
008import com.echothree.model.data.order.common.pk.OrderLineAdjustmentPK;
009import com.echothree.model.data.order.common.pk.OrderLineAdjustmentTypePK;
010import com.echothree.model.data.order.common.pk.OrderLinePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.order.OrderLineAdjustmentTypes.OrderLineAdjustmentTypesPath;
013import com.echothree.model.jooq.server.tables.order.OrderLineAdjustments.OrderLineAdjustmentsPath;
014import com.echothree.model.jooq.server.tables.order.OrderLines.OrderLinesPath;
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 OrderLineAdjustmentDetails extends TableImpl<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>orderlineadjustmentdetails</code>
053     */
054    public static final OrderLineAdjustmentDetails OrderLineAdjustmentDetails = new OrderLineAdjustmentDetails();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> getRecordType() {
061        return com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails.class;
062    }
063
064    /**
065     * The column
066     * <code>orderlineadjustmentdetails.ordladjdt_orderlineadjustmentdetailid</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, OrderLineAdjustmentDetailPK> ORDER_LINE_ADJUSTMENT_DETAIL = createField(DSL.name("ordladjdt_orderlineadjustmentdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLineAdjustmentDetailPK.class, id -> new com.echothree.model.data.order.common.pk.OrderLineAdjustmentDetailPK(id), primaryKey -> primaryKey.getEntityId()));
069
070    /**
071     * The column
072     * <code>orderlineadjustmentdetails.ordladjdt_ordladj_orderlineadjustmentid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, OrderLineAdjustmentPK> ORDER_LINE_ADJUSTMENT = createField(DSL.name("ordladjdt_ordladj_orderlineadjustmentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLineAdjustmentPK.class, id -> new com.echothree.model.data.order.common.pk.OrderLineAdjustmentPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column
078     * <code>orderlineadjustmentdetails.ordladjdt_ordl_orderlineid</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, OrderLinePK> ORDER_LINE = createField(DSL.name("ordladjdt_ordl_orderlineid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLinePK.class, id -> new com.echothree.model.data.order.common.pk.OrderLinePK(id), primaryKey -> primaryKey.getEntityId()));
081
082    /**
083     * The column
084     * <code>orderlineadjustmentdetails.ordladjdt_orderlineadjustmentsequence</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, Integer> ORDER_LINE_ADJUSTMENT_SEQUENCE = createField(DSL.name("ordladjdt_orderlineadjustmentsequence"), SQLDataType.INTEGER.nullable(false), this, "");
087
088    /**
089     * The column
090     * <code>orderlineadjustmentdetails.ordladjdt_ordladjtyp_orderlineadjustmenttypeid</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, OrderLineAdjustmentTypePK> ORDER_LINE_ADJUSTMENT_TYPE = createField(DSL.name("ordladjdt_ordladjtyp_orderlineadjustmenttypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLineAdjustmentTypePK.class, id -> new com.echothree.model.data.order.common.pk.OrderLineAdjustmentTypePK(id), primaryKey -> primaryKey.getEntityId()));
093
094    /**
095     * The column <code>orderlineadjustmentdetails.ordladjdt_amount</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, Long> AMOUNT = createField(DSL.name("ordladjdt_amount"), SQLDataType.BIGINT.nullable(false), this, "");
098
099    /**
100     * The column <code>orderlineadjustmentdetails.ordladjdt_fromtime</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, Long> FROM_TIME = createField(DSL.name("ordladjdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
103
104    /**
105     * The column <code>orderlineadjustmentdetails.ordladjdt_thrutime</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, Long> THRU_TIME = createField(DSL.name("ordladjdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
108
109    private OrderLineAdjustmentDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> aliased) {
110        this(alias, aliased, (Field<?>[]) null, null);
111    }
112
113    private OrderLineAdjustmentDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> aliased, Field<?>[] parameters, Condition where) {
114        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
115    }
116
117    /**
118     * Create an aliased <code>orderlineadjustmentdetails</code> table reference
119     */
120    public OrderLineAdjustmentDetails(String alias) {
121        this(DSL.name(alias), OrderLineAdjustmentDetails);
122    }
123
124    /**
125     * Create an aliased <code>orderlineadjustmentdetails</code> table reference
126     */
127    public OrderLineAdjustmentDetails(Name alias) {
128        this(alias, OrderLineAdjustmentDetails);
129    }
130
131    /**
132     * Create a <code>orderlineadjustmentdetails</code> table reference
133     */
134    public OrderLineAdjustmentDetails() {
135        this(DSL.name("orderlineadjustmentdetails"), null);
136    }
137
138    public <O extends Record> OrderLineAdjustmentDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> parentPath) {
139        super(path, childPath, parentPath, OrderLineAdjustmentDetails);
140    }
141
142    /**
143     * A subtype implementing {@link Path} for simplified path-based joins.
144     */
145    public static class OrderLineAdjustmentDetailsPath extends OrderLineAdjustmentDetails implements Path<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> {
146
147        private static final long serialVersionUID = 1L;
148        public <O extends Record> OrderLineAdjustmentDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> parentPath) {
149            super(path, childPath, parentPath);
150        }
151        private OrderLineAdjustmentDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> aliased) {
152            super(alias, aliased);
153        }
154
155        @Override
156        public OrderLineAdjustmentDetailsPath as(String alias) {
157            return new OrderLineAdjustmentDetailsPath(DSL.name(alias), this);
158        }
159
160        @Override
161        public OrderLineAdjustmentDetailsPath as(Name alias) {
162            return new OrderLineAdjustmentDetailsPath(alias, this);
163        }
164
165        @Override
166        public OrderLineAdjustmentDetailsPath as(Table<?> alias) {
167            return new OrderLineAdjustmentDetailsPath(alias.getQualifiedName(), this);
168        }
169    }
170
171    @Override
172    public UniqueKey<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails> getPrimaryKey() {
173        return KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_PK;
174    }
175
176    @Override
177    public List<UniqueKey<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails>> getUniqueKeys() {
178        return Arrays.asList(KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_ADJUSTMENT_AND_THRU_TIME_UK, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_AND_ORDER_LINE_ADJUSTMENT_SEQUENCE_AND_THRU_TIME_UK);
179    }
180
181    @Override
182    public List<ForeignKey<com.echothree.model.jooq.server.records.order.OrderLineAdjustmentDetails, ?>> getReferences() {
183        return Arrays.asList(KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_FK, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_ADJUSTMENT_FK, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_ADJUSTMENT_TYPE_FK);
184    }
185
186    private transient OrderLinesPath _ordladjdt_ordl_orderlineid_fk;
187
188    /**
189     * Get the implicit join path to the <code>orderlines</code> table.
190     */
191    public OrderLinesPath ordladjdt_ordl_orderlineid_fk() {
192        if (_ordladjdt_ordl_orderlineid_fk == null)
193            _ordladjdt_ordl_orderlineid_fk = new OrderLinesPath(this, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_FK, null);
194
195        return _ordladjdt_ordl_orderlineid_fk;
196    }
197
198    private transient OrderLineAdjustmentsPath _ordladjdt_ordladj_orderlineadjustmentid_fk;
199
200    /**
201     * Get the implicit join path to the <code>orderlineadjustments</code>
202     * table.
203     */
204    public OrderLineAdjustmentsPath ordladjdt_ordladj_orderlineadjustmentid_fk() {
205        if (_ordladjdt_ordladj_orderlineadjustmentid_fk == null)
206            _ordladjdt_ordladj_orderlineadjustmentid_fk = new OrderLineAdjustmentsPath(this, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_ADJUSTMENT_FK, null);
207
208        return _ordladjdt_ordladj_orderlineadjustmentid_fk;
209    }
210
211    private transient OrderLineAdjustmentTypesPath _ordladjdt_ordladjtyp_orderlineadjustmenttypeid_fk;
212
213    /**
214     * Get the implicit join path to the <code>orderlineadjustmenttypes</code>
215     * table.
216     */
217    public OrderLineAdjustmentTypesPath ordladjdt_ordladjtyp_orderlineadjustmenttypeid_fk() {
218        if (_ordladjdt_ordladjtyp_orderlineadjustmenttypeid_fk == null)
219            _ordladjdt_ordladjtyp_orderlineadjustmenttypeid_fk = new OrderLineAdjustmentTypesPath(this, KeyRegistry.ORDER_LINE_ADJUSTMENT_DETAILS_ORDER_LINE_ADJUSTMENT_TYPE_FK, null);
220
221        return _ordladjdt_ordladjtyp_orderlineadjustmenttypeid_fk;
222    }
223
224    @Override
225    public OrderLineAdjustmentDetails as(String alias) {
226        return new OrderLineAdjustmentDetails(DSL.name(alias), this);
227    }
228
229    @Override
230    public OrderLineAdjustmentDetails as(Name alias) {
231        return new OrderLineAdjustmentDetails(alias, this);
232    }
233
234    @Override
235    public OrderLineAdjustmentDetails as(Table<?> alias) {
236        return new OrderLineAdjustmentDetails(alias.getQualifiedName(), this);
237    }
238
239    /**
240     * Rename this table
241     */
242    @Override
243    public OrderLineAdjustmentDetails rename(String name) {
244        return new OrderLineAdjustmentDetails(DSL.name(name), null);
245    }
246
247    /**
248     * Rename this table
249     */
250    @Override
251    public OrderLineAdjustmentDetails rename(Name name) {
252        return new OrderLineAdjustmentDetails(name, null);
253    }
254
255    /**
256     * Rename this table
257     */
258    @Override
259    public OrderLineAdjustmentDetails rename(Table<?> name) {
260        return new OrderLineAdjustmentDetails(name.getQualifiedName(), null);
261    }
262
263    /**
264     * Create an inline derived table from this table
265     */
266    @Override
267    public OrderLineAdjustmentDetails where(Condition condition) {
268        return new OrderLineAdjustmentDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
269    }
270
271    /**
272     * Create an inline derived table from this table
273     */
274    @Override
275    public OrderLineAdjustmentDetails where(Collection<? extends Condition> conditions) {
276        return where(DSL.and(conditions));
277    }
278
279    /**
280     * Create an inline derived table from this table
281     */
282    @Override
283    public OrderLineAdjustmentDetails where(Condition... conditions) {
284        return where(DSL.and(conditions));
285    }
286
287    /**
288     * Create an inline derived table from this table
289     */
290    @Override
291    public OrderLineAdjustmentDetails where(Field<Boolean> condition) {
292        return where(DSL.condition(condition));
293    }
294
295    /**
296     * Create an inline derived table from this table
297     */
298    @Override
299    @PlainSQL
300    public OrderLineAdjustmentDetails where(SQL condition) {
301        return where(DSL.condition(condition));
302    }
303
304    /**
305     * Create an inline derived table from this table
306     */
307    @Override
308    @PlainSQL
309    public OrderLineAdjustmentDetails where(@Stringly.SQL String condition) {
310        return where(DSL.condition(condition));
311    }
312
313    /**
314     * Create an inline derived table from this table
315     */
316    @Override
317    @PlainSQL
318    public OrderLineAdjustmentDetails where(@Stringly.SQL String condition, Object... binds) {
319        return where(DSL.condition(condition, binds));
320    }
321
322    /**
323     * Create an inline derived table from this table
324     */
325    @Override
326    @PlainSQL
327    public OrderLineAdjustmentDetails where(@Stringly.SQL String condition, QueryPart... parts) {
328        return where(DSL.condition(condition, parts));
329    }
330
331    /**
332     * Create an inline derived table from this table
333     */
334    @Override
335    public OrderLineAdjustmentDetails whereExists(TableLike<?> select) {
336        return where(DSL.exists(select));
337    }
338
339    /**
340     * Create an inline derived table from this table
341     */
342    @Override
343    public OrderLineAdjustmentDetails whereNotExists(TableLike<?> select) {
344        return where(DSL.notExists(select));
345    }
346}