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.OrderPriorityDetailPK;
008import com.echothree.model.data.order.common.pk.OrderPriorityPK;
009import com.echothree.model.data.order.common.pk.OrderTypePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.order.OrderPriorities.OrderPrioritiesPath;
012import com.echothree.model.jooq.server.tables.order.OrderTypes.OrderTypesPath;
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 OrderPriorityDetails extends TableImpl<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>orderprioritydetails</code>
051     */
052    public static final OrderPriorityDetails OrderPriorityDetails = new OrderPriorityDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.order.OrderPriorityDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>orderprioritydetails.ordprdt_orderprioritydetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, OrderPriorityDetailPK> ORDER_PRIORITY_DETAIL = createField(DSL.name("ordprdt_orderprioritydetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderPriorityDetailPK.class, id -> new com.echothree.model.data.order.common.pk.OrderPriorityDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>orderprioritydetails.ordprdt_ordpr_orderpriorityid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, OrderPriorityPK> ORDER_PRIORITY = createField(DSL.name("ordprdt_ordpr_orderpriorityid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderPriorityPK.class, id -> new com.echothree.model.data.order.common.pk.OrderPriorityPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column <code>orderprioritydetails.ordprdt_ordtyp_ordertypeid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, OrderTypePK> ORDER_TYPE = createField(DSL.name("ordprdt_ordtyp_ordertypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderTypePK.class, id -> new com.echothree.model.data.order.common.pk.OrderTypePK(id), primaryKey -> primaryKey.getEntityId()));
078
079    /**
080     * The column <code>orderprioritydetails.ordprdt_orderpriorityname</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, String> ORDER_PRIORITY_NAME = createField(DSL.name("ordprdt_orderpriorityname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
083
084    /**
085     * The column <code>orderprioritydetails.ordprdt_priority</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, Integer> PRIORITY = createField(DSL.name("ordprdt_priority"), SQLDataType.INTEGER.nullable(false), this, "");
088
089    /**
090     * The column <code>orderprioritydetails.ordprdt_isdefault</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, Boolean> IS_DEFAULT = createField(DSL.name("ordprdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
093
094    /**
095     * The column <code>orderprioritydetails.ordprdt_sortorder</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, Integer> SORT_ORDER = createField(DSL.name("ordprdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
098
099    /**
100     * The column <code>orderprioritydetails.ordprdt_fromtime</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, Long> FROM_TIME = createField(DSL.name("ordprdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
103
104    /**
105     * The column <code>orderprioritydetails.ordprdt_thrutime</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, Long> THRU_TIME = createField(DSL.name("ordprdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
108
109    private OrderPriorityDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> aliased) {
110        this(alias, aliased, (Field<?>[]) null, null);
111    }
112
113    private OrderPriorityDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> aliased, Field<?>[] parameters, Condition where) {
114        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
115    }
116
117    /**
118     * Create an aliased <code>orderprioritydetails</code> table reference
119     */
120    public OrderPriorityDetails(String alias) {
121        this(DSL.name(alias), OrderPriorityDetails);
122    }
123
124    /**
125     * Create an aliased <code>orderprioritydetails</code> table reference
126     */
127    public OrderPriorityDetails(Name alias) {
128        this(alias, OrderPriorityDetails);
129    }
130
131    /**
132     * Create a <code>orderprioritydetails</code> table reference
133     */
134    public OrderPriorityDetails() {
135        this(DSL.name("orderprioritydetails"), null);
136    }
137
138    public <O extends Record> OrderPriorityDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderPriorityDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderPriorityDetails> parentPath) {
139        super(path, childPath, parentPath, OrderPriorityDetails);
140    }
141
142    /**
143     * A subtype implementing {@link Path} for simplified path-based joins.
144     */
145    public static class OrderPriorityDetailsPath extends OrderPriorityDetails implements Path<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> {
146
147        private static final long serialVersionUID = 1L;
148        public <O extends Record> OrderPriorityDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderPriorityDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderPriorityDetails> parentPath) {
149            super(path, childPath, parentPath);
150        }
151        private OrderPriorityDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> aliased) {
152            super(alias, aliased);
153        }
154
155        @Override
156        public OrderPriorityDetailsPath as(String alias) {
157            return new OrderPriorityDetailsPath(DSL.name(alias), this);
158        }
159
160        @Override
161        public OrderPriorityDetailsPath as(Name alias) {
162            return new OrderPriorityDetailsPath(alias, this);
163        }
164
165        @Override
166        public OrderPriorityDetailsPath as(Table<?> alias) {
167            return new OrderPriorityDetailsPath(alias.getQualifiedName(), this);
168        }
169    }
170
171    @Override
172    public UniqueKey<com.echothree.model.jooq.server.records.order.OrderPriorityDetails> getPrimaryKey() {
173        return KeyRegistry.ORDER_PRIORITY_DETAILS_PK;
174    }
175
176    @Override
177    public List<UniqueKey<com.echothree.model.jooq.server.records.order.OrderPriorityDetails>> getUniqueKeys() {
178        return Arrays.asList(KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_PRIORITY_AND_THRU_TIME_UK, KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_TYPE_AND_ORDER_PRIORITY_NAME_AND_THRU_TIME_UK);
179    }
180
181    @Override
182    public List<ForeignKey<com.echothree.model.jooq.server.records.order.OrderPriorityDetails, ?>> getReferences() {
183        return Arrays.asList(KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_PRIORITY_FK, KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_TYPE_FK);
184    }
185
186    private transient OrderPrioritiesPath _ordprdt_ordpr_orderpriorityid_fk;
187
188    /**
189     * Get the implicit join path to the <code>orderpriorities</code> table.
190     */
191    public OrderPrioritiesPath ordprdt_ordpr_orderpriorityid_fk() {
192        if (_ordprdt_ordpr_orderpriorityid_fk == null)
193            _ordprdt_ordpr_orderpriorityid_fk = new OrderPrioritiesPath(this, KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_PRIORITY_FK, null);
194
195        return _ordprdt_ordpr_orderpriorityid_fk;
196    }
197
198    private transient OrderTypesPath _ordprdt_ordtyp_ordertypeid_fk;
199
200    /**
201     * Get the implicit join path to the <code>ordertypes</code> table.
202     */
203    public OrderTypesPath ordprdt_ordtyp_ordertypeid_fk() {
204        if (_ordprdt_ordtyp_ordertypeid_fk == null)
205            _ordprdt_ordtyp_ordertypeid_fk = new OrderTypesPath(this, KeyRegistry.ORDER_PRIORITY_DETAILS_ORDER_TYPE_FK, null);
206
207        return _ordprdt_ordtyp_ordertypeid_fk;
208    }
209
210    @Override
211    public OrderPriorityDetails as(String alias) {
212        return new OrderPriorityDetails(DSL.name(alias), this);
213    }
214
215    @Override
216    public OrderPriorityDetails as(Name alias) {
217        return new OrderPriorityDetails(alias, this);
218    }
219
220    @Override
221    public OrderPriorityDetails as(Table<?> alias) {
222        return new OrderPriorityDetails(alias.getQualifiedName(), this);
223    }
224
225    /**
226     * Rename this table
227     */
228    @Override
229    public OrderPriorityDetails rename(String name) {
230        return new OrderPriorityDetails(DSL.name(name), null);
231    }
232
233    /**
234     * Rename this table
235     */
236    @Override
237    public OrderPriorityDetails rename(Name name) {
238        return new OrderPriorityDetails(name, null);
239    }
240
241    /**
242     * Rename this table
243     */
244    @Override
245    public OrderPriorityDetails rename(Table<?> name) {
246        return new OrderPriorityDetails(name.getQualifiedName(), null);
247    }
248
249    /**
250     * Create an inline derived table from this table
251     */
252    @Override
253    public OrderPriorityDetails where(Condition condition) {
254        return new OrderPriorityDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
255    }
256
257    /**
258     * Create an inline derived table from this table
259     */
260    @Override
261    public OrderPriorityDetails where(Collection<? extends Condition> conditions) {
262        return where(DSL.and(conditions));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    public OrderPriorityDetails where(Condition... conditions) {
270        return where(DSL.and(conditions));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    public OrderPriorityDetails where(Field<Boolean> condition) {
278        return where(DSL.condition(condition));
279    }
280
281    /**
282     * Create an inline derived table from this table
283     */
284    @Override
285    @PlainSQL
286    public OrderPriorityDetails where(SQL condition) {
287        return where(DSL.condition(condition));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    @PlainSQL
295    public OrderPriorityDetails where(@Stringly.SQL String condition) {
296        return where(DSL.condition(condition));
297    }
298
299    /**
300     * Create an inline derived table from this table
301     */
302    @Override
303    @PlainSQL
304    public OrderPriorityDetails where(@Stringly.SQL String condition, Object... binds) {
305        return where(DSL.condition(condition, binds));
306    }
307
308    /**
309     * Create an inline derived table from this table
310     */
311    @Override
312    @PlainSQL
313    public OrderPriorityDetails where(@Stringly.SQL String condition, QueryPart... parts) {
314        return where(DSL.condition(condition, parts));
315    }
316
317    /**
318     * Create an inline derived table from this table
319     */
320    @Override
321    public OrderPriorityDetails whereExists(TableLike<?> select) {
322        return where(DSL.exists(select));
323    }
324
325    /**
326     * Create an inline derived table from this table
327     */
328    @Override
329    public OrderPriorityDetails whereNotExists(TableLike<?> select) {
330        return where(DSL.notExists(select));
331    }
332}