001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.inventory;
005
006
007import com.echothree.model.data.inventory.common.pk.InventoryCostingMethodDetailPK;
008import com.echothree.model.data.inventory.common.pk.InventoryCostingMethodPK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.inventory.InventoryCostingMethodDetails.InventoryCostingMethodDetailsPath;
011
012import java.util.Arrays;
013import java.util.Collection;
014import java.util.List;
015
016import org.jooq.Condition;
017import org.jooq.Converter;
018import org.jooq.Field;
019import org.jooq.ForeignKey;
020import org.jooq.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class InventoryCostingMethods extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of <code>inventorycostingmethods</code>
049     */
050    public static final InventoryCostingMethods InventoryCostingMethods = new InventoryCostingMethods();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> getRecordType() {
057        return com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods.class;
058    }
059
060    /**
061     * The column
062     * <code>inventorycostingmethods.invcm_inventorycostingmethodid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods, InventoryCostingMethodPK> INVENTORY_COSTING_METHOD = createField(DSL.name("invcm_inventorycostingmethodid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryCostingMethodPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingMethodPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column <code>inventorycostingmethods.invcm_activedetailid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods, InventoryCostingMethodDetailPK> ACTIVE_DETAIL = createField(DSL.name("invcm_activedetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, InventoryCostingMethodDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingMethodDetailPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column <code>inventorycostingmethods.invcm_lastdetailid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods, InventoryCostingMethodDetailPK> LAST_DETAIL = createField(DSL.name("invcm_lastdetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, InventoryCostingMethodDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingMethodDetailPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    private InventoryCostingMethods(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> aliased) {
077        this(alias, aliased, (Field<?>[]) null, null);
078    }
079
080    private InventoryCostingMethods(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> aliased, Field<?>[] parameters, Condition where) {
081        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
082    }
083
084    /**
085     * Create an aliased <code>inventorycostingmethods</code> table reference
086     */
087    public InventoryCostingMethods(String alias) {
088        this(DSL.name(alias), InventoryCostingMethods);
089    }
090
091    /**
092     * Create an aliased <code>inventorycostingmethods</code> table reference
093     */
094    public InventoryCostingMethods(Name alias) {
095        this(alias, InventoryCostingMethods);
096    }
097
098    /**
099     * Create a <code>inventorycostingmethods</code> table reference
100     */
101    public InventoryCostingMethods() {
102        this(DSL.name("inventorycostingmethods"), null);
103    }
104
105    public <O extends Record> InventoryCostingMethods(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> parentPath) {
106        super(path, childPath, parentPath, InventoryCostingMethods);
107    }
108
109    /**
110     * A subtype implementing {@link Path} for simplified path-based joins.
111     */
112    public static class InventoryCostingMethodsPath extends InventoryCostingMethods implements Path<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> {
113
114        private static final long serialVersionUID = 1L;
115        public <O extends Record> InventoryCostingMethodsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> parentPath) {
116            super(path, childPath, parentPath);
117        }
118        private InventoryCostingMethodsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> aliased) {
119            super(alias, aliased);
120        }
121
122        @Override
123        public InventoryCostingMethodsPath as(String alias) {
124            return new InventoryCostingMethodsPath(DSL.name(alias), this);
125        }
126
127        @Override
128        public InventoryCostingMethodsPath as(Name alias) {
129            return new InventoryCostingMethodsPath(alias, this);
130        }
131
132        @Override
133        public InventoryCostingMethodsPath as(Table<?> alias) {
134            return new InventoryCostingMethodsPath(alias.getQualifiedName(), this);
135        }
136    }
137
138    @Override
139    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods> getPrimaryKey() {
140        return KeyRegistry.INVENTORY_COSTING_METHODS_PK;
141    }
142
143    @Override
144    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods>> getUniqueKeys() {
145        return Arrays.asList(KeyRegistry.INVENTORY_COSTING_METHODS_ACTIVE_DETAIL_UK, KeyRegistry.INVENTORY_COSTING_METHODS_LAST_DETAIL_UK);
146    }
147
148    @Override
149    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingMethods, ?>> getReferences() {
150        return Arrays.asList(KeyRegistry.INVENTORY_COSTING_METHODS_ACTIVE_DETAIL_FK, KeyRegistry.INVENTORY_COSTING_METHODS_LAST_DETAIL_FK);
151    }
152
153    private transient InventoryCostingMethodDetailsPath _invcm_activedetailid_fk;
154
155    /**
156     * Get the implicit join path to the
157     * <code>inventorycostingmethoddetails</code> table, via the
158     * <code>invcm_activedetailid_fk</code> key.
159     */
160    public InventoryCostingMethodDetailsPath invcm_activedetailid_fk() {
161        if (_invcm_activedetailid_fk == null)
162            _invcm_activedetailid_fk = new InventoryCostingMethodDetailsPath(this, KeyRegistry.INVENTORY_COSTING_METHODS_ACTIVE_DETAIL_FK, null);
163
164        return _invcm_activedetailid_fk;
165    }
166
167    private transient InventoryCostingMethodDetailsPath _invcm_lastdetailid_fk;
168
169    /**
170     * Get the implicit join path to the
171     * <code>inventorycostingmethoddetails</code> table, via the
172     * <code>invcm_lastdetailid_fk</code> key.
173     */
174    public InventoryCostingMethodDetailsPath invcm_lastdetailid_fk() {
175        if (_invcm_lastdetailid_fk == null)
176            _invcm_lastdetailid_fk = new InventoryCostingMethodDetailsPath(this, KeyRegistry.INVENTORY_COSTING_METHODS_LAST_DETAIL_FK, null);
177
178        return _invcm_lastdetailid_fk;
179    }
180
181    @Override
182    public InventoryCostingMethods as(String alias) {
183        return new InventoryCostingMethods(DSL.name(alias), this);
184    }
185
186    @Override
187    public InventoryCostingMethods as(Name alias) {
188        return new InventoryCostingMethods(alias, this);
189    }
190
191    @Override
192    public InventoryCostingMethods as(Table<?> alias) {
193        return new InventoryCostingMethods(alias.getQualifiedName(), this);
194    }
195
196    /**
197     * Rename this table
198     */
199    @Override
200    public InventoryCostingMethods rename(String name) {
201        return new InventoryCostingMethods(DSL.name(name), null);
202    }
203
204    /**
205     * Rename this table
206     */
207    @Override
208    public InventoryCostingMethods rename(Name name) {
209        return new InventoryCostingMethods(name, null);
210    }
211
212    /**
213     * Rename this table
214     */
215    @Override
216    public InventoryCostingMethods rename(Table<?> name) {
217        return new InventoryCostingMethods(name.getQualifiedName(), null);
218    }
219
220    /**
221     * Create an inline derived table from this table
222     */
223    @Override
224    public InventoryCostingMethods where(Condition condition) {
225        return new InventoryCostingMethods(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
226    }
227
228    /**
229     * Create an inline derived table from this table
230     */
231    @Override
232    public InventoryCostingMethods where(Collection<? extends Condition> conditions) {
233        return where(DSL.and(conditions));
234    }
235
236    /**
237     * Create an inline derived table from this table
238     */
239    @Override
240    public InventoryCostingMethods where(Condition... conditions) {
241        return where(DSL.and(conditions));
242    }
243
244    /**
245     * Create an inline derived table from this table
246     */
247    @Override
248    public InventoryCostingMethods where(Field<Boolean> condition) {
249        return where(DSL.condition(condition));
250    }
251
252    /**
253     * Create an inline derived table from this table
254     */
255    @Override
256    @PlainSQL
257    public InventoryCostingMethods where(SQL condition) {
258        return where(DSL.condition(condition));
259    }
260
261    /**
262     * Create an inline derived table from this table
263     */
264    @Override
265    @PlainSQL
266    public InventoryCostingMethods where(@Stringly.SQL String condition) {
267        return where(DSL.condition(condition));
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    @PlainSQL
275    public InventoryCostingMethods where(@Stringly.SQL String condition, Object... binds) {
276        return where(DSL.condition(condition, binds));
277    }
278
279    /**
280     * Create an inline derived table from this table
281     */
282    @Override
283    @PlainSQL
284    public InventoryCostingMethods where(@Stringly.SQL String condition, QueryPart... parts) {
285        return where(DSL.condition(condition, parts));
286    }
287
288    /**
289     * Create an inline derived table from this table
290     */
291    @Override
292    public InventoryCostingMethods whereExists(TableLike<?> select) {
293        return where(DSL.exists(select));
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    public InventoryCostingMethods whereNotExists(TableLike<?> select) {
301        return where(DSL.notExists(select));
302    }
303}