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.InventoryConditionPK;
008import com.echothree.model.data.inventory.common.pk.InventoryCostingPoolDetailPK;
009import com.echothree.model.data.inventory.common.pk.InventoryCostingPoolPK;
010import com.echothree.model.data.item.common.pk.ItemPK;
011import com.echothree.model.data.party.common.pk.PartyPK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
014import com.echothree.model.jooq.server.tables.inventory.InventoryCostingPools.InventoryCostingPoolsPath;
015import com.echothree.model.jooq.server.tables.item.Items.ItemsPath;
016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
017
018import java.util.Arrays;
019import java.util.Collection;
020import java.util.List;
021
022import org.jooq.Condition;
023import org.jooq.Converter;
024import org.jooq.Field;
025import org.jooq.ForeignKey;
026import org.jooq.InverseForeignKey;
027import org.jooq.Name;
028import org.jooq.Path;
029import org.jooq.PlainSQL;
030import org.jooq.QueryPart;
031import org.jooq.Record;
032import org.jooq.SQL;
033import org.jooq.Stringly;
034import org.jooq.Table;
035import org.jooq.TableField;
036import org.jooq.TableLike;
037import org.jooq.TableOptions;
038import org.jooq.UniqueKey;
039import org.jooq.impl.DSL;
040import org.jooq.impl.Internal;
041import org.jooq.impl.SQLDataType;
042import org.jooq.impl.TableImpl;
043
044
045/**
046 * This class is generated by jOOQ.
047 */
048@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
049public class InventoryCostingPoolDetails extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>inventorycostingpooldetails</code>
055     */
056    public static final InventoryCostingPoolDetails InventoryCostingPoolDetails = new InventoryCostingPoolDetails();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> getRecordType() {
063        return com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails.class;
064    }
065
066    /**
067     * The column
068     * <code>inventorycostingpooldetails.invcpldt_inventorycostingpooldetailid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, InventoryCostingPoolDetailPK> INVENTORY_COSTING_POOL_DETAIL = createField(DSL.name("invcpldt_inventorycostingpooldetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryCostingPoolDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingPoolDetailPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column
074     * <code>inventorycostingpooldetails.invcpldt_invcpl_inventorycostingpoolid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, InventoryCostingPoolPK> INVENTORY_COSTING_POOL = createField(DSL.name("invcpldt_invcpl_inventorycostingpoolid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryCostingPoolPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingPoolPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column
080     * <code>inventorycostingpooldetails.invcpldt_inventorycostingpoolname</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, String> INVENTORY_COSTING_POOL_NAME = createField(DSL.name("invcpldt_inventorycostingpoolname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
083
084    /**
085     * The column
086     * <code>inventorycostingpooldetails.invcpldt_companypartyid</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, PartyPK> COMPANY_PARTY = createField(DSL.name("invcpldt_companypartyid"), 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()));
089
090    /**
091     * The column <code>inventorycostingpooldetails.invcpldt_itm_itemid</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, ItemPK> ITEM = createField(DSL.name("invcpldt_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()));
094
095    /**
096     * The column
097     * <code>inventorycostingpooldetails.invcpldt_invcon_inventoryconditionid</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("invcpldt_invcon_inventoryconditionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryConditionPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryConditionPK(id), primaryKey -> primaryKey.getEntityId()));
100
101    /**
102     * The column <code>inventorycostingpooldetails.invcpldt_fromtime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, Long> FROM_TIME = createField(DSL.name("invcpldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    /**
107     * The column <code>inventorycostingpooldetails.invcpldt_thrutime</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, Long> THRU_TIME = createField(DSL.name("invcpldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
110
111    private InventoryCostingPoolDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> aliased) {
112        this(alias, aliased, (Field<?>[]) null, null);
113    }
114
115    private InventoryCostingPoolDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> aliased, Field<?>[] parameters, Condition where) {
116        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
117    }
118
119    /**
120     * Create an aliased <code>inventorycostingpooldetails</code> table
121     * reference
122     */
123    public InventoryCostingPoolDetails(String alias) {
124        this(DSL.name(alias), InventoryCostingPoolDetails);
125    }
126
127    /**
128     * Create an aliased <code>inventorycostingpooldetails</code> table
129     * reference
130     */
131    public InventoryCostingPoolDetails(Name alias) {
132        this(alias, InventoryCostingPoolDetails);
133    }
134
135    /**
136     * Create a <code>inventorycostingpooldetails</code> table reference
137     */
138    public InventoryCostingPoolDetails() {
139        this(DSL.name("inventorycostingpooldetails"), null);
140    }
141
142    public <O extends Record> InventoryCostingPoolDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> parentPath) {
143        super(path, childPath, parentPath, InventoryCostingPoolDetails);
144    }
145
146    /**
147     * A subtype implementing {@link Path} for simplified path-based joins.
148     */
149    public static class InventoryCostingPoolDetailsPath extends InventoryCostingPoolDetails implements Path<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> {
150
151        private static final long serialVersionUID = 1L;
152        public <O extends Record> InventoryCostingPoolDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> parentPath) {
153            super(path, childPath, parentPath);
154        }
155        private InventoryCostingPoolDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> aliased) {
156            super(alias, aliased);
157        }
158
159        @Override
160        public InventoryCostingPoolDetailsPath as(String alias) {
161            return new InventoryCostingPoolDetailsPath(DSL.name(alias), this);
162        }
163
164        @Override
165        public InventoryCostingPoolDetailsPath as(Name alias) {
166            return new InventoryCostingPoolDetailsPath(alias, this);
167        }
168
169        @Override
170        public InventoryCostingPoolDetailsPath as(Table<?> alias) {
171            return new InventoryCostingPoolDetailsPath(alias.getQualifiedName(), this);
172        }
173    }
174
175    @Override
176    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails> getPrimaryKey() {
177        return KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_PK;
178    }
179
180    @Override
181    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails>> getUniqueKeys() {
182        return Arrays.asList(KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_COSTING_POOL_AND_THRU_TIME_UK, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_COSTING_POOL_NAME_AND_THRU_TIME_UK, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_ITEM_AND_INVENTORY_CONDITION_UK);
183    }
184
185    @Override
186    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryCostingPoolDetails, ?>> getReferences() {
187        return Arrays.asList(KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_COMPANY_PARTY_FK, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_CONDITION_FK, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_COSTING_POOL_FK, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_ITEM_FK);
188    }
189
190    private transient PartiesPath _invcpldt_companypartyid_fk;
191
192    /**
193     * Get the implicit join path to the <code>parties</code> table.
194     */
195    public PartiesPath invcpldt_companypartyid_fk() {
196        if (_invcpldt_companypartyid_fk == null)
197            _invcpldt_companypartyid_fk = new PartiesPath(this, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_COMPANY_PARTY_FK, null);
198
199        return _invcpldt_companypartyid_fk;
200    }
201
202    private transient InventoryConditionsPath _invcpldt_invcon_inventoryconditionid_fk;
203
204    /**
205     * Get the implicit join path to the <code>inventoryconditions</code> table.
206     */
207    public InventoryConditionsPath invcpldt_invcon_inventoryconditionid_fk() {
208        if (_invcpldt_invcon_inventoryconditionid_fk == null)
209            _invcpldt_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_CONDITION_FK, null);
210
211        return _invcpldt_invcon_inventoryconditionid_fk;
212    }
213
214    private transient InventoryCostingPoolsPath _invcpldt_invcpl_inventorycostingpoolid_fk;
215
216    /**
217     * Get the implicit join path to the <code>inventorycostingpools</code>
218     * table.
219     */
220    public InventoryCostingPoolsPath invcpldt_invcpl_inventorycostingpoolid_fk() {
221        if (_invcpldt_invcpl_inventorycostingpoolid_fk == null)
222            _invcpldt_invcpl_inventorycostingpoolid_fk = new InventoryCostingPoolsPath(this, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_INVENTORY_COSTING_POOL_FK, null);
223
224        return _invcpldt_invcpl_inventorycostingpoolid_fk;
225    }
226
227    private transient ItemsPath _invcpldt_itm_itemid_fk;
228
229    /**
230     * Get the implicit join path to the <code>items</code> table.
231     */
232    public ItemsPath invcpldt_itm_itemid_fk() {
233        if (_invcpldt_itm_itemid_fk == null)
234            _invcpldt_itm_itemid_fk = new ItemsPath(this, KeyRegistry.INVENTORY_COSTING_POOL_DETAILS_ITEM_FK, null);
235
236        return _invcpldt_itm_itemid_fk;
237    }
238
239    @Override
240    public InventoryCostingPoolDetails as(String alias) {
241        return new InventoryCostingPoolDetails(DSL.name(alias), this);
242    }
243
244    @Override
245    public InventoryCostingPoolDetails as(Name alias) {
246        return new InventoryCostingPoolDetails(alias, this);
247    }
248
249    @Override
250    public InventoryCostingPoolDetails as(Table<?> alias) {
251        return new InventoryCostingPoolDetails(alias.getQualifiedName(), this);
252    }
253
254    /**
255     * Rename this table
256     */
257    @Override
258    public InventoryCostingPoolDetails rename(String name) {
259        return new InventoryCostingPoolDetails(DSL.name(name), null);
260    }
261
262    /**
263     * Rename this table
264     */
265    @Override
266    public InventoryCostingPoolDetails rename(Name name) {
267        return new InventoryCostingPoolDetails(name, null);
268    }
269
270    /**
271     * Rename this table
272     */
273    @Override
274    public InventoryCostingPoolDetails rename(Table<?> name) {
275        return new InventoryCostingPoolDetails(name.getQualifiedName(), null);
276    }
277
278    /**
279     * Create an inline derived table from this table
280     */
281    @Override
282    public InventoryCostingPoolDetails where(Condition condition) {
283        return new InventoryCostingPoolDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
284    }
285
286    /**
287     * Create an inline derived table from this table
288     */
289    @Override
290    public InventoryCostingPoolDetails where(Collection<? extends Condition> conditions) {
291        return where(DSL.and(conditions));
292    }
293
294    /**
295     * Create an inline derived table from this table
296     */
297    @Override
298    public InventoryCostingPoolDetails where(Condition... conditions) {
299        return where(DSL.and(conditions));
300    }
301
302    /**
303     * Create an inline derived table from this table
304     */
305    @Override
306    public InventoryCostingPoolDetails where(Field<Boolean> condition) {
307        return where(DSL.condition(condition));
308    }
309
310    /**
311     * Create an inline derived table from this table
312     */
313    @Override
314    @PlainSQL
315    public InventoryCostingPoolDetails where(SQL condition) {
316        return where(DSL.condition(condition));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    @PlainSQL
324    public InventoryCostingPoolDetails where(@Stringly.SQL String condition) {
325        return where(DSL.condition(condition));
326    }
327
328    /**
329     * Create an inline derived table from this table
330     */
331    @Override
332    @PlainSQL
333    public InventoryCostingPoolDetails where(@Stringly.SQL String condition, Object... binds) {
334        return where(DSL.condition(condition, binds));
335    }
336
337    /**
338     * Create an inline derived table from this table
339     */
340    @Override
341    @PlainSQL
342    public InventoryCostingPoolDetails where(@Stringly.SQL String condition, QueryPart... parts) {
343        return where(DSL.condition(condition, parts));
344    }
345
346    /**
347     * Create an inline derived table from this table
348     */
349    @Override
350    public InventoryCostingPoolDetails whereExists(TableLike<?> select) {
351        return where(DSL.exists(select));
352    }
353
354    /**
355     * Create an inline derived table from this table
356     */
357    @Override
358    public InventoryCostingPoolDetails whereNotExists(TableLike<?> select) {
359        return where(DSL.notExists(select));
360    }
361}