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.InventoryLocationPK;
009import com.echothree.model.data.item.common.pk.ItemPK;
010import com.echothree.model.data.party.common.pk.PartyPK;
011import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK;
012import com.echothree.model.data.warehouse.common.pk.LocationPK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath;
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.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath;
018import com.echothree.model.jooq.server.tables.warehouse.Locations.LocationsPath;
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 InventoryLocations extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryLocations> {
052
053    private static final long serialVersionUID = 1L;
054
055    /**
056     * The reference instance of <code>inventorylocations</code>
057     */
058    public static final InventoryLocations InventoryLocations = new InventoryLocations();
059
060    /**
061     * The class holding records for this type
062     */
063    @Override
064    public Class<com.echothree.model.jooq.server.records.inventory.InventoryLocations> getRecordType() {
065        return com.echothree.model.jooq.server.records.inventory.InventoryLocations.class;
066    }
067
068    /**
069     * The column <code>inventorylocations.invloc_inventorylocationid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, InventoryLocationPK> INVENTORY_LOCATION = createField(DSL.name("invloc_inventorylocationid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLocationPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLocationPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column <code>inventorylocations.invloc_loc_locationid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, LocationPK> LOCATION = createField(DSL.name("invloc_loc_locationid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LocationPK.class, id -> new com.echothree.model.data.warehouse.common.pk.LocationPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column <code>inventorylocations.invloc_ownerpartyid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, PartyPK> OWNER_PARTY = createField(DSL.name("invloc_ownerpartyid"), 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()));
082
083    /**
084     * The column <code>inventorylocations.invloc_itm_itemid</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, ItemPK> ITEM = createField(DSL.name("invloc_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()));
087
088    /**
089     * The column
090     * <code>inventorylocations.invloc_uomt_unitofmeasuretypeid</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("invloc_uomt_unitofmeasuretypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, UnitOfMeasureTypePK.class, id -> new com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK(id), primaryKey -> primaryKey.getEntityId()));
093
094    /**
095     * The column
096     * <code>inventorylocations.invloc_invcon_inventoryconditionid</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("invloc_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()));
099
100    /**
101     * The column <code>inventorylocations.invloc_fromtime</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, Long> FROM_TIME = createField(DSL.name("invloc_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
104
105    /**
106     * The column <code>inventorylocations.invloc_thrutime</code>.
107     */
108    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocations, Long> THRU_TIME = createField(DSL.name("invloc_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
109
110    private InventoryLocations(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLocations> aliased) {
111        this(alias, aliased, (Field<?>[]) null, null);
112    }
113
114    private InventoryLocations(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLocations> aliased, Field<?>[] parameters, Condition where) {
115        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
116    }
117
118    /**
119     * Create an aliased <code>inventorylocations</code> table reference
120     */
121    public InventoryLocations(String alias) {
122        this(DSL.name(alias), InventoryLocations);
123    }
124
125    /**
126     * Create an aliased <code>inventorylocations</code> table reference
127     */
128    public InventoryLocations(Name alias) {
129        this(alias, InventoryLocations);
130    }
131
132    /**
133     * Create a <code>inventorylocations</code> table reference
134     */
135    public InventoryLocations() {
136        this(DSL.name("inventorylocations"), null);
137    }
138
139    public <O extends Record> InventoryLocations(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLocations> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLocations> parentPath) {
140        super(path, childPath, parentPath, InventoryLocations);
141    }
142
143    /**
144     * A subtype implementing {@link Path} for simplified path-based joins.
145     */
146    public static class InventoryLocationsPath extends InventoryLocations implements Path<com.echothree.model.jooq.server.records.inventory.InventoryLocations> {
147
148        private static final long serialVersionUID = 1L;
149        public <O extends Record> InventoryLocationsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLocations> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryLocations> parentPath) {
150            super(path, childPath, parentPath);
151        }
152        private InventoryLocationsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLocations> aliased) {
153            super(alias, aliased);
154        }
155
156        @Override
157        public InventoryLocationsPath as(String alias) {
158            return new InventoryLocationsPath(DSL.name(alias), this);
159        }
160
161        @Override
162        public InventoryLocationsPath as(Name alias) {
163            return new InventoryLocationsPath(alias, this);
164        }
165
166        @Override
167        public InventoryLocationsPath as(Table<?> alias) {
168            return new InventoryLocationsPath(alias.getQualifiedName(), this);
169        }
170    }
171
172    @Override
173    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLocations> getPrimaryKey() {
174        return KeyRegistry.INVENTORY_LOCATIONS_PK;
175    }
176
177    @Override
178    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLocations>> getUniqueKeys() {
179        return Arrays.asList(KeyRegistry.INVENTORY_LOCATIONS_LOCATION_AND_ITEM_AND_THRU_TIME_UK, KeyRegistry.INVENTORY_LOCATIONS_LOCATION_AND_OWNER_PARTY_AND_ITEM_AND_UNIT_OF_MEASURE_TYPE_AND_INVENTORY_CONDITION_AND_THRU_TIME_UK);
180    }
181
182    @Override
183    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryLocations, ?>> getReferences() {
184        return Arrays.asList(KeyRegistry.INVENTORY_LOCATIONS_INVENTORY_CONDITION_FK, KeyRegistry.INVENTORY_LOCATIONS_ITEM_FK, KeyRegistry.INVENTORY_LOCATIONS_LOCATION_FK, KeyRegistry.INVENTORY_LOCATIONS_OWNER_PARTY_FK, KeyRegistry.INVENTORY_LOCATIONS_UNIT_OF_MEASURE_TYPE_FK);
185    }
186
187    private transient InventoryConditionsPath _invloc_invcon_inventoryconditionid_fk;
188
189    /**
190     * Get the implicit join path to the <code>inventoryconditions</code> table.
191     */
192    public InventoryConditionsPath invloc_invcon_inventoryconditionid_fk() {
193        if (_invloc_invcon_inventoryconditionid_fk == null)
194            _invloc_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.INVENTORY_LOCATIONS_INVENTORY_CONDITION_FK, null);
195
196        return _invloc_invcon_inventoryconditionid_fk;
197    }
198
199    private transient ItemsPath _invloc_itm_itemid_fk;
200
201    /**
202     * Get the implicit join path to the <code>items</code> table.
203     */
204    public ItemsPath invloc_itm_itemid_fk() {
205        if (_invloc_itm_itemid_fk == null)
206            _invloc_itm_itemid_fk = new ItemsPath(this, KeyRegistry.INVENTORY_LOCATIONS_ITEM_FK, null);
207
208        return _invloc_itm_itemid_fk;
209    }
210
211    private transient LocationsPath _invloc_loc_locationid_fk;
212
213    /**
214     * Get the implicit join path to the <code>locations</code> table.
215     */
216    public LocationsPath invloc_loc_locationid_fk() {
217        if (_invloc_loc_locationid_fk == null)
218            _invloc_loc_locationid_fk = new LocationsPath(this, KeyRegistry.INVENTORY_LOCATIONS_LOCATION_FK, null);
219
220        return _invloc_loc_locationid_fk;
221    }
222
223    private transient PartiesPath _invloc_ownerpartyid_fk;
224
225    /**
226     * Get the implicit join path to the <code>parties</code> table.
227     */
228    public PartiesPath invloc_ownerpartyid_fk() {
229        if (_invloc_ownerpartyid_fk == null)
230            _invloc_ownerpartyid_fk = new PartiesPath(this, KeyRegistry.INVENTORY_LOCATIONS_OWNER_PARTY_FK, null);
231
232        return _invloc_ownerpartyid_fk;
233    }
234
235    private transient UnitOfMeasureTypesPath _invloc_uomt_unitofmeasuretypeid_fk;
236
237    /**
238     * Get the implicit join path to the <code>unitofmeasuretypes</code> table.
239     */
240    public UnitOfMeasureTypesPath invloc_uomt_unitofmeasuretypeid_fk() {
241        if (_invloc_uomt_unitofmeasuretypeid_fk == null)
242            _invloc_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.INVENTORY_LOCATIONS_UNIT_OF_MEASURE_TYPE_FK, null);
243
244        return _invloc_uomt_unitofmeasuretypeid_fk;
245    }
246
247    @Override
248    public InventoryLocations as(String alias) {
249        return new InventoryLocations(DSL.name(alias), this);
250    }
251
252    @Override
253    public InventoryLocations as(Name alias) {
254        return new InventoryLocations(alias, this);
255    }
256
257    @Override
258    public InventoryLocations as(Table<?> alias) {
259        return new InventoryLocations(alias.getQualifiedName(), this);
260    }
261
262    /**
263     * Rename this table
264     */
265    @Override
266    public InventoryLocations rename(String name) {
267        return new InventoryLocations(DSL.name(name), null);
268    }
269
270    /**
271     * Rename this table
272     */
273    @Override
274    public InventoryLocations rename(Name name) {
275        return new InventoryLocations(name, null);
276    }
277
278    /**
279     * Rename this table
280     */
281    @Override
282    public InventoryLocations rename(Table<?> name) {
283        return new InventoryLocations(name.getQualifiedName(), null);
284    }
285
286    /**
287     * Create an inline derived table from this table
288     */
289    @Override
290    public InventoryLocations where(Condition condition) {
291        return new InventoryLocations(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
292    }
293
294    /**
295     * Create an inline derived table from this table
296     */
297    @Override
298    public InventoryLocations where(Collection<? extends 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 InventoryLocations where(Condition... conditions) {
307        return where(DSL.and(conditions));
308    }
309
310    /**
311     * Create an inline derived table from this table
312     */
313    @Override
314    public InventoryLocations where(Field<Boolean> condition) {
315        return where(DSL.condition(condition));
316    }
317
318    /**
319     * Create an inline derived table from this table
320     */
321    @Override
322    @PlainSQL
323    public InventoryLocations where(SQL condition) {
324        return where(DSL.condition(condition));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    @PlainSQL
332    public InventoryLocations where(@Stringly.SQL String condition) {
333        return where(DSL.condition(condition));
334    }
335
336    /**
337     * Create an inline derived table from this table
338     */
339    @Override
340    @PlainSQL
341    public InventoryLocations where(@Stringly.SQL String condition, Object... binds) {
342        return where(DSL.condition(condition, binds));
343    }
344
345    /**
346     * Create an inline derived table from this table
347     */
348    @Override
349    @PlainSQL
350    public InventoryLocations where(@Stringly.SQL String condition, QueryPart... parts) {
351        return where(DSL.condition(condition, parts));
352    }
353
354    /**
355     * Create an inline derived table from this table
356     */
357    @Override
358    public InventoryLocations whereExists(TableLike<?> select) {
359        return where(DSL.exists(select));
360    }
361
362    /**
363     * Create an inline derived table from this table
364     */
365    @Override
366    public InventoryLocations whereNotExists(TableLike<?> select) {
367        return where(DSL.notExists(select));
368    }
369}