001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.vendor;
005
006
007import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK;
008import com.echothree.model.data.item.common.pk.ItemPK;
009import com.echothree.model.data.party.common.pk.PartyPK;
010import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK;
011import com.echothree.model.data.vendor.common.pk.VendorItemDetailPK;
012import com.echothree.model.data.vendor.common.pk.VendorItemPK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationPolicies.CancellationPoliciesPath;
015import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
017import com.echothree.model.jooq.server.tables.returnpolicy.ReturnPolicies.ReturnPoliciesPath;
018import com.echothree.model.jooq.server.tables.vendor.VendorItems.VendorItemsPath;
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 VendorItemDetails extends TableImpl<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> {
052
053    private static final long serialVersionUID = 1L;
054
055    /**
056     * The reference instance of <code>vendoritemdetails</code>
057     */
058    public static final VendorItemDetails VendorItemDetails = new VendorItemDetails();
059
060    /**
061     * The class holding records for this type
062     */
063    @Override
064    public Class<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> getRecordType() {
065        return com.echothree.model.jooq.server.records.vendor.VendorItemDetails.class;
066    }
067
068    /**
069     * The column <code>vendoritemdetails.vndritmdt_vendoritemdetailid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, VendorItemDetailPK> VENDOR_ITEM_DETAIL = createField(DSL.name("vndritmdt_vendoritemdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, VendorItemDetailPK.class, id -> new com.echothree.model.data.vendor.common.pk.VendorItemDetailPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column <code>vendoritemdetails.vndritmdt_vndritm_vendoritemid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, VendorItemPK> VENDOR_ITEM = createField(DSL.name("vndritmdt_vndritm_vendoritemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, VendorItemPK.class, id -> new com.echothree.model.data.vendor.common.pk.VendorItemPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column <code>vendoritemdetails.vndritmdt_itm_itemid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, ItemPK> ITEM = createField(DSL.name("vndritmdt_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()));
082
083    /**
084     * The column <code>vendoritemdetails.vndritmdt_vendorpartyid</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, PartyPK> VENDOR_PARTY = createField(DSL.name("vndritmdt_vendorpartyid"), 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()));
087
088    /**
089     * The column <code>vendoritemdetails.vndritmdt_vendoritemname</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, String> VENDOR_ITEM_NAME = createField(DSL.name("vndritmdt_vendoritemname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
092
093    /**
094     * The column <code>vendoritemdetails.vndritmdt_description</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, String> DESCRIPTION = createField(DSL.name("vndritmdt_description"), SQLDataType.VARCHAR(132), this, "");
097
098    /**
099     * The column <code>vendoritemdetails.vndritmdt_priority</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, Integer> PRIORITY = createField(DSL.name("vndritmdt_priority"), SQLDataType.INTEGER.nullable(false), this, "");
102
103    /**
104     * The column
105     * <code>vendoritemdetails.vndritmdt_cnclplcy_cancellationpolicyid</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, CancellationPolicyPK> CANCELLATION_POLICY = createField(DSL.name("vndritmdt_cnclplcy_cancellationpolicyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CancellationPolicyPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK(id), primaryKey -> primaryKey.getEntityId()));
108
109    /**
110     * The column
111     * <code>vendoritemdetails.vndritmdt_rtnplcy_returnpolicyid</code>.
112     */
113    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, ReturnPolicyPK> RETURN_POLICY = createField(DSL.name("vndritmdt_rtnplcy_returnpolicyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ReturnPolicyPK.class, id -> new com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK(id), primaryKey -> primaryKey.getEntityId()));
114
115    /**
116     * The column <code>vendoritemdetails.vndritmdt_fromtime</code>.
117     */
118    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, Long> FROM_TIME = createField(DSL.name("vndritmdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
119
120    /**
121     * The column <code>vendoritemdetails.vndritmdt_thrutime</code>.
122     */
123    public final TableField<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, Long> THRU_TIME = createField(DSL.name("vndritmdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
124
125    private VendorItemDetails(Name alias, Table<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> aliased) {
126        this(alias, aliased, (Field<?>[]) null, null);
127    }
128
129    private VendorItemDetails(Name alias, Table<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> aliased, Field<?>[] parameters, Condition where) {
130        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
131    }
132
133    /**
134     * Create an aliased <code>vendoritemdetails</code> table reference
135     */
136    public VendorItemDetails(String alias) {
137        this(DSL.name(alias), VendorItemDetails);
138    }
139
140    /**
141     * Create an aliased <code>vendoritemdetails</code> table reference
142     */
143    public VendorItemDetails(Name alias) {
144        this(alias, VendorItemDetails);
145    }
146
147    /**
148     * Create a <code>vendoritemdetails</code> table reference
149     */
150    public VendorItemDetails() {
151        this(DSL.name("vendoritemdetails"), null);
152    }
153
154    public <O extends Record> VendorItemDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.vendor.VendorItemDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.vendor.VendorItemDetails> parentPath) {
155        super(path, childPath, parentPath, VendorItemDetails);
156    }
157
158    /**
159     * A subtype implementing {@link Path} for simplified path-based joins.
160     */
161    public static class VendorItemDetailsPath extends VendorItemDetails implements Path<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> {
162
163        private static final long serialVersionUID = 1L;
164        public <O extends Record> VendorItemDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.vendor.VendorItemDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.vendor.VendorItemDetails> parentPath) {
165            super(path, childPath, parentPath);
166        }
167        private VendorItemDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> aliased) {
168            super(alias, aliased);
169        }
170
171        @Override
172        public VendorItemDetailsPath as(String alias) {
173            return new VendorItemDetailsPath(DSL.name(alias), this);
174        }
175
176        @Override
177        public VendorItemDetailsPath as(Name alias) {
178            return new VendorItemDetailsPath(alias, this);
179        }
180
181        @Override
182        public VendorItemDetailsPath as(Table<?> alias) {
183            return new VendorItemDetailsPath(alias.getQualifiedName(), this);
184        }
185    }
186
187    @Override
188    public UniqueKey<com.echothree.model.jooq.server.records.vendor.VendorItemDetails> getPrimaryKey() {
189        return KeyRegistry.VENDOR_ITEM_DETAILS_PK;
190    }
191
192    @Override
193    public List<UniqueKey<com.echothree.model.jooq.server.records.vendor.VendorItemDetails>> getUniqueKeys() {
194        return Arrays.asList(KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_ITEM_AND_THRU_TIME_UK, KeyRegistry.VENDOR_ITEM_DETAILS_ITEM_AND_VENDOR_PARTY_AND_THRU_TIME_UK, KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_PARTY_AND_THRU_TIME_AND_VENDOR_ITEM_NAME_UK);
195    }
196
197    @Override
198    public List<ForeignKey<com.echothree.model.jooq.server.records.vendor.VendorItemDetails, ?>> getReferences() {
199        return Arrays.asList(KeyRegistry.VENDOR_ITEM_DETAILS_CANCELLATION_POLICY_FK, KeyRegistry.VENDOR_ITEM_DETAILS_ITEM_FK, KeyRegistry.VENDOR_ITEM_DETAILS_RETURN_POLICY_FK, KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_PARTY_FK, KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_ITEM_FK);
200    }
201
202    private transient CancellationPoliciesPath _vndritmdt_cnclplcy_cancellationpolicyid_fk;
203
204    /**
205     * Get the implicit join path to the <code>cancellationpolicies</code>
206     * table.
207     */
208    public CancellationPoliciesPath vndritmdt_cnclplcy_cancellationpolicyid_fk() {
209        if (_vndritmdt_cnclplcy_cancellationpolicyid_fk == null)
210            _vndritmdt_cnclplcy_cancellationpolicyid_fk = new CancellationPoliciesPath(this, KeyRegistry.VENDOR_ITEM_DETAILS_CANCELLATION_POLICY_FK, null);
211
212        return _vndritmdt_cnclplcy_cancellationpolicyid_fk;
213    }
214
215    private transient ItemsPath _vndritmdt_itm_itemid_fk;
216
217    /**
218     * Get the implicit join path to the <code>items</code> table.
219     */
220    public ItemsPath vndritmdt_itm_itemid_fk() {
221        if (_vndritmdt_itm_itemid_fk == null)
222            _vndritmdt_itm_itemid_fk = new ItemsPath(this, KeyRegistry.VENDOR_ITEM_DETAILS_ITEM_FK, null);
223
224        return _vndritmdt_itm_itemid_fk;
225    }
226
227    private transient ReturnPoliciesPath _vndritmdt_rtnplcy_returnpolicyid_fk;
228
229    /**
230     * Get the implicit join path to the <code>returnpolicies</code> table.
231     */
232    public ReturnPoliciesPath vndritmdt_rtnplcy_returnpolicyid_fk() {
233        if (_vndritmdt_rtnplcy_returnpolicyid_fk == null)
234            _vndritmdt_rtnplcy_returnpolicyid_fk = new ReturnPoliciesPath(this, KeyRegistry.VENDOR_ITEM_DETAILS_RETURN_POLICY_FK, null);
235
236        return _vndritmdt_rtnplcy_returnpolicyid_fk;
237    }
238
239    private transient PartiesPath _vndritmdt_vendorpartyid_fk;
240
241    /**
242     * Get the implicit join path to the <code>parties</code> table.
243     */
244    public PartiesPath vndritmdt_vendorpartyid_fk() {
245        if (_vndritmdt_vendorpartyid_fk == null)
246            _vndritmdt_vendorpartyid_fk = new PartiesPath(this, KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_PARTY_FK, null);
247
248        return _vndritmdt_vendorpartyid_fk;
249    }
250
251    private transient VendorItemsPath _vndritmdt_vndritm_vendoritemid_fk;
252
253    /**
254     * Get the implicit join path to the <code>vendoritems</code> table.
255     */
256    public VendorItemsPath vndritmdt_vndritm_vendoritemid_fk() {
257        if (_vndritmdt_vndritm_vendoritemid_fk == null)
258            _vndritmdt_vndritm_vendoritemid_fk = new VendorItemsPath(this, KeyRegistry.VENDOR_ITEM_DETAILS_VENDOR_ITEM_FK, null);
259
260        return _vndritmdt_vndritm_vendoritemid_fk;
261    }
262
263    @Override
264    public VendorItemDetails as(String alias) {
265        return new VendorItemDetails(DSL.name(alias), this);
266    }
267
268    @Override
269    public VendorItemDetails as(Name alias) {
270        return new VendorItemDetails(alias, this);
271    }
272
273    @Override
274    public VendorItemDetails as(Table<?> alias) {
275        return new VendorItemDetails(alias.getQualifiedName(), this);
276    }
277
278    /**
279     * Rename this table
280     */
281    @Override
282    public VendorItemDetails rename(String name) {
283        return new VendorItemDetails(DSL.name(name), null);
284    }
285
286    /**
287     * Rename this table
288     */
289    @Override
290    public VendorItemDetails rename(Name name) {
291        return new VendorItemDetails(name, null);
292    }
293
294    /**
295     * Rename this table
296     */
297    @Override
298    public VendorItemDetails rename(Table<?> name) {
299        return new VendorItemDetails(name.getQualifiedName(), null);
300    }
301
302    /**
303     * Create an inline derived table from this table
304     */
305    @Override
306    public VendorItemDetails where(Condition condition) {
307        return new VendorItemDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
308    }
309
310    /**
311     * Create an inline derived table from this table
312     */
313    @Override
314    public VendorItemDetails where(Collection<? extends Condition> conditions) {
315        return where(DSL.and(conditions));
316    }
317
318    /**
319     * Create an inline derived table from this table
320     */
321    @Override
322    public VendorItemDetails where(Condition... conditions) {
323        return where(DSL.and(conditions));
324    }
325
326    /**
327     * Create an inline derived table from this table
328     */
329    @Override
330    public VendorItemDetails where(Field<Boolean> condition) {
331        return where(DSL.condition(condition));
332    }
333
334    /**
335     * Create an inline derived table from this table
336     */
337    @Override
338    @PlainSQL
339    public VendorItemDetails where(SQL condition) {
340        return where(DSL.condition(condition));
341    }
342
343    /**
344     * Create an inline derived table from this table
345     */
346    @Override
347    @PlainSQL
348    public VendorItemDetails where(@Stringly.SQL String condition) {
349        return where(DSL.condition(condition));
350    }
351
352    /**
353     * Create an inline derived table from this table
354     */
355    @Override
356    @PlainSQL
357    public VendorItemDetails where(@Stringly.SQL String condition, Object... binds) {
358        return where(DSL.condition(condition, binds));
359    }
360
361    /**
362     * Create an inline derived table from this table
363     */
364    @Override
365    @PlainSQL
366    public VendorItemDetails where(@Stringly.SQL String condition, QueryPart... parts) {
367        return where(DSL.condition(condition, parts));
368    }
369
370    /**
371     * Create an inline derived table from this table
372     */
373    @Override
374    public VendorItemDetails whereExists(TableLike<?> select) {
375        return where(DSL.exists(select));
376    }
377
378    /**
379     * Create an inline derived table from this table
380     */
381    @Override
382    public VendorItemDetails whereNotExists(TableLike<?> select) {
383        return where(DSL.notExists(select));
384    }
385}