001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.offer;
005
006
007import com.echothree.model.data.filter.common.pk.FilterPK;
008import com.echothree.model.data.offer.common.pk.OfferDetailPK;
009import com.echothree.model.data.offer.common.pk.OfferPK;
010import com.echothree.model.data.party.common.pk.PartyPK;
011import com.echothree.model.data.selector.common.pk.SelectorPK;
012import com.echothree.model.data.sequence.common.pk.SequencePK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.filter.Filters.FiltersPath;
015import com.echothree.model.jooq.server.tables.offer.Offers.OffersPath;
016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
017import com.echothree.model.jooq.server.tables.selector.Selectors.SelectorsPath;
018import com.echothree.model.jooq.server.tables.sequence.Sequences.SequencesPath;
019
020import java.util.Arrays;
021import java.util.Collection;
022import java.util.List;
023
024import org.jooq.Condition;
025import org.jooq.Converter;
026import org.jooq.Field;
027import org.jooq.ForeignKey;
028import org.jooq.InverseForeignKey;
029import org.jooq.Name;
030import org.jooq.Path;
031import org.jooq.PlainSQL;
032import org.jooq.QueryPart;
033import org.jooq.Record;
034import org.jooq.SQL;
035import org.jooq.Stringly;
036import org.jooq.Table;
037import org.jooq.TableField;
038import org.jooq.TableLike;
039import org.jooq.TableOptions;
040import org.jooq.UniqueKey;
041import org.jooq.impl.DSL;
042import org.jooq.impl.Internal;
043import org.jooq.impl.SQLDataType;
044import org.jooq.impl.TableImpl;
045
046
047/**
048 * This class is generated by jOOQ.
049 */
050@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
051public class OfferDetails extends TableImpl<com.echothree.model.jooq.server.records.offer.OfferDetails> {
052
053    private static final long serialVersionUID = 1L;
054
055    /**
056     * The reference instance of <code>offerdetails</code>
057     */
058    public static final OfferDetails OfferDetails = new OfferDetails();
059
060    /**
061     * The class holding records for this type
062     */
063    @Override
064    public Class<com.echothree.model.jooq.server.records.offer.OfferDetails> getRecordType() {
065        return com.echothree.model.jooq.server.records.offer.OfferDetails.class;
066    }
067
068    /**
069     * The column <code>offerdetails.ofrdt_offerdetailid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, OfferDetailPK> OFFER_DETAIL = createField(DSL.name("ofrdt_offerdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OfferDetailPK.class, id -> new com.echothree.model.data.offer.common.pk.OfferDetailPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column <code>offerdetails.ofrdt_ofr_offerid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, OfferPK> OFFER = createField(DSL.name("ofrdt_ofr_offerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OfferPK.class, id -> new com.echothree.model.data.offer.common.pk.OfferPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column <code>offerdetails.ofrdt_offername</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, String> OFFER_NAME = createField(DSL.name("ofrdt_offername"), SQLDataType.VARCHAR(40).nullable(false), this, "");
082
083    /**
084     * The column <code>offerdetails.ofrdt_salesordersequenceid</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, SequencePK> SALES_ORDER_SEQUENCE = createField(DSL.name("ofrdt_salesordersequenceid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SequencePK.class, id -> new com.echothree.model.data.sequence.common.pk.SequencePK(id), primaryKey -> primaryKey.getEntityId()));
087
088    /**
089     * The column <code>offerdetails.ofrdt_departmentpartyid</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, PartyPK> DEPARTMENT_PARTY = createField(DSL.name("ofrdt_departmentpartyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId()));
092
093    /**
094     * The column <code>offerdetails.ofrdt_offeritemselectorid</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, SelectorPK> OFFER_ITEM_SELECTOR = createField(DSL.name("ofrdt_offeritemselectorid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorPK(id), primaryKey -> primaryKey.getEntityId()));
097
098    /**
099     * The column <code>offerdetails.ofrdt_offeritempricefilterid</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, FilterPK> OFFER_ITEM_PRICE_FILTER = createField(DSL.name("ofrdt_offeritempricefilterid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, FilterPK.class, id -> new com.echothree.model.data.filter.common.pk.FilterPK(id), primaryKey -> primaryKey.getEntityId()));
102
103    /**
104     * The column <code>offerdetails.ofrdt_isdefault</code>.
105     */
106    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, Boolean> IS_DEFAULT = createField(DSL.name("ofrdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
107
108    /**
109     * The column <code>offerdetails.ofrdt_sortorder</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, Integer> SORT_ORDER = createField(DSL.name("ofrdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
112
113    /**
114     * The column <code>offerdetails.ofrdt_fromtime</code>.
115     */
116    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, Long> FROM_TIME = createField(DSL.name("ofrdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
117
118    /**
119     * The column <code>offerdetails.ofrdt_thrutime</code>.
120     */
121    public final TableField<com.echothree.model.jooq.server.records.offer.OfferDetails, Long> THRU_TIME = createField(DSL.name("ofrdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
122
123    private OfferDetails(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferDetails> aliased) {
124        this(alias, aliased, (Field<?>[]) null, null);
125    }
126
127    private OfferDetails(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferDetails> aliased, Field<?>[] parameters, Condition where) {
128        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
129    }
130
131    /**
132     * Create an aliased <code>offerdetails</code> table reference
133     */
134    public OfferDetails(String alias) {
135        this(DSL.name(alias), OfferDetails);
136    }
137
138    /**
139     * Create an aliased <code>offerdetails</code> table reference
140     */
141    public OfferDetails(Name alias) {
142        this(alias, OfferDetails);
143    }
144
145    /**
146     * Create a <code>offerdetails</code> table reference
147     */
148    public OfferDetails() {
149        this(DSL.name("offerdetails"), null);
150    }
151
152    public <O extends Record> OfferDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferDetails> parentPath) {
153        super(path, childPath, parentPath, OfferDetails);
154    }
155
156    /**
157     * A subtype implementing {@link Path} for simplified path-based joins.
158     */
159    public static class OfferDetailsPath extends OfferDetails implements Path<com.echothree.model.jooq.server.records.offer.OfferDetails> {
160
161        private static final long serialVersionUID = 1L;
162        public <O extends Record> OfferDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferDetails> parentPath) {
163            super(path, childPath, parentPath);
164        }
165        private OfferDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferDetails> aliased) {
166            super(alias, aliased);
167        }
168
169        @Override
170        public OfferDetailsPath as(String alias) {
171            return new OfferDetailsPath(DSL.name(alias), this);
172        }
173
174        @Override
175        public OfferDetailsPath as(Name alias) {
176            return new OfferDetailsPath(alias, this);
177        }
178
179        @Override
180        public OfferDetailsPath as(Table<?> alias) {
181            return new OfferDetailsPath(alias.getQualifiedName(), this);
182        }
183    }
184
185    @Override
186    public UniqueKey<com.echothree.model.jooq.server.records.offer.OfferDetails> getPrimaryKey() {
187        return KeyRegistry.OFFER_DETAILS_PK;
188    }
189
190    @Override
191    public List<UniqueKey<com.echothree.model.jooq.server.records.offer.OfferDetails>> getUniqueKeys() {
192        return Arrays.asList(KeyRegistry.OFFER_DETAILS_OFFER_AND_THRU_TIME_UK, KeyRegistry.OFFER_DETAILS_OFFER_NAME_AND_THRU_TIME_UK);
193    }
194
195    @Override
196    public List<ForeignKey<com.echothree.model.jooq.server.records.offer.OfferDetails, ?>> getReferences() {
197        return Arrays.asList(KeyRegistry.OFFER_DETAILS_DEPARTMENT_PARTY_FK, KeyRegistry.OFFER_DETAILS_OFFER_ITEM_PRICE_FILTER_FK, KeyRegistry.OFFER_DETAILS_OFFER_ITEM_SELECTOR_FK, KeyRegistry.OFFER_DETAILS_OFFER_FK, KeyRegistry.OFFER_DETAILS_SALES_ORDER_SEQUENCE_FK);
198    }
199
200    private transient PartiesPath _ofrdt_departmentpartyid_fk;
201
202    /**
203     * Get the implicit join path to the <code>parties</code> table.
204     */
205    public PartiesPath ofrdt_departmentpartyid_fk() {
206        if (_ofrdt_departmentpartyid_fk == null)
207            _ofrdt_departmentpartyid_fk = new PartiesPath(this, KeyRegistry.OFFER_DETAILS_DEPARTMENT_PARTY_FK, null);
208
209        return _ofrdt_departmentpartyid_fk;
210    }
211
212    private transient FiltersPath _ofrdt_offeritempricefilterid_fk;
213
214    /**
215     * Get the implicit join path to the <code>filters</code> table.
216     */
217    public FiltersPath ofrdt_offeritempricefilterid_fk() {
218        if (_ofrdt_offeritempricefilterid_fk == null)
219            _ofrdt_offeritempricefilterid_fk = new FiltersPath(this, KeyRegistry.OFFER_DETAILS_OFFER_ITEM_PRICE_FILTER_FK, null);
220
221        return _ofrdt_offeritempricefilterid_fk;
222    }
223
224    private transient SelectorsPath _ofrdt_offeritemselectorid_fk;
225
226    /**
227     * Get the implicit join path to the <code>selectors</code> table.
228     */
229    public SelectorsPath ofrdt_offeritemselectorid_fk() {
230        if (_ofrdt_offeritemselectorid_fk == null)
231            _ofrdt_offeritemselectorid_fk = new SelectorsPath(this, KeyRegistry.OFFER_DETAILS_OFFER_ITEM_SELECTOR_FK, null);
232
233        return _ofrdt_offeritemselectorid_fk;
234    }
235
236    private transient OffersPath _ofrdt_ofr_offerid_fk;
237
238    /**
239     * Get the implicit join path to the <code>offers</code> table.
240     */
241    public OffersPath ofrdt_ofr_offerid_fk() {
242        if (_ofrdt_ofr_offerid_fk == null)
243            _ofrdt_ofr_offerid_fk = new OffersPath(this, KeyRegistry.OFFER_DETAILS_OFFER_FK, null);
244
245        return _ofrdt_ofr_offerid_fk;
246    }
247
248    private transient SequencesPath _ofrdt_salesordersequenceid_fk;
249
250    /**
251     * Get the implicit join path to the <code>sequences</code> table.
252     */
253    public SequencesPath ofrdt_salesordersequenceid_fk() {
254        if (_ofrdt_salesordersequenceid_fk == null)
255            _ofrdt_salesordersequenceid_fk = new SequencesPath(this, KeyRegistry.OFFER_DETAILS_SALES_ORDER_SEQUENCE_FK, null);
256
257        return _ofrdt_salesordersequenceid_fk;
258    }
259
260    @Override
261    public OfferDetails as(String alias) {
262        return new OfferDetails(DSL.name(alias), this);
263    }
264
265    @Override
266    public OfferDetails as(Name alias) {
267        return new OfferDetails(alias, this);
268    }
269
270    @Override
271    public OfferDetails as(Table<?> alias) {
272        return new OfferDetails(alias.getQualifiedName(), this);
273    }
274
275    /**
276     * Rename this table
277     */
278    @Override
279    public OfferDetails rename(String name) {
280        return new OfferDetails(DSL.name(name), null);
281    }
282
283    /**
284     * Rename this table
285     */
286    @Override
287    public OfferDetails rename(Name name) {
288        return new OfferDetails(name, null);
289    }
290
291    /**
292     * Rename this table
293     */
294    @Override
295    public OfferDetails rename(Table<?> name) {
296        return new OfferDetails(name.getQualifiedName(), null);
297    }
298
299    /**
300     * Create an inline derived table from this table
301     */
302    @Override
303    public OfferDetails where(Condition condition) {
304        return new OfferDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
305    }
306
307    /**
308     * Create an inline derived table from this table
309     */
310    @Override
311    public OfferDetails where(Collection<? extends Condition> conditions) {
312        return where(DSL.and(conditions));
313    }
314
315    /**
316     * Create an inline derived table from this table
317     */
318    @Override
319    public OfferDetails where(Condition... conditions) {
320        return where(DSL.and(conditions));
321    }
322
323    /**
324     * Create an inline derived table from this table
325     */
326    @Override
327    public OfferDetails where(Field<Boolean> condition) {
328        return where(DSL.condition(condition));
329    }
330
331    /**
332     * Create an inline derived table from this table
333     */
334    @Override
335    @PlainSQL
336    public OfferDetails where(SQL condition) {
337        return where(DSL.condition(condition));
338    }
339
340    /**
341     * Create an inline derived table from this table
342     */
343    @Override
344    @PlainSQL
345    public OfferDetails where(@Stringly.SQL String condition) {
346        return where(DSL.condition(condition));
347    }
348
349    /**
350     * Create an inline derived table from this table
351     */
352    @Override
353    @PlainSQL
354    public OfferDetails where(@Stringly.SQL String condition, Object... binds) {
355        return where(DSL.condition(condition, binds));
356    }
357
358    /**
359     * Create an inline derived table from this table
360     */
361    @Override
362    @PlainSQL
363    public OfferDetails where(@Stringly.SQL String condition, QueryPart... parts) {
364        return where(DSL.condition(condition, parts));
365    }
366
367    /**
368     * Create an inline derived table from this table
369     */
370    @Override
371    public OfferDetails whereExists(TableLike<?> select) {
372        return where(DSL.exists(select));
373    }
374
375    /**
376     * Create an inline derived table from this table
377     */
378    @Override
379    public OfferDetails whereNotExists(TableLike<?> select) {
380        return where(DSL.notExists(select));
381    }
382}