001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.warehouse;
005
006
007import com.echothree.model.data.inventory.common.pk.InventoryLocationGroupPK;
008import com.echothree.model.data.party.common.pk.PartyPK;
009import com.echothree.model.data.warehouse.common.pk.LocationDetailPK;
010import com.echothree.model.data.warehouse.common.pk.LocationPK;
011import com.echothree.model.data.warehouse.common.pk.LocationTypePK;
012import com.echothree.model.data.warehouse.common.pk.LocationUseTypePK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.inventory.InventoryLocationGroups.InventoryLocationGroupsPath;
015import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
016import com.echothree.model.jooq.server.tables.warehouse.LocationTypes.LocationTypesPath;
017import com.echothree.model.jooq.server.tables.warehouse.LocationUseTypes.LocationUseTypesPath;
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 LocationDetails extends TableImpl<com.echothree.model.jooq.server.records.warehouse.LocationDetails> {
052
053    private static final long serialVersionUID = 1L;
054
055    /**
056     * The reference instance of <code>locationdetails</code>
057     */
058    public static final LocationDetails LocationDetails = new LocationDetails();
059
060    /**
061     * The class holding records for this type
062     */
063    @Override
064    public Class<com.echothree.model.jooq.server.records.warehouse.LocationDetails> getRecordType() {
065        return com.echothree.model.jooq.server.records.warehouse.LocationDetails.class;
066    }
067
068    /**
069     * The column <code>locationdetails.locdt_locationdetailid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, LocationDetailPK> LOCATION_DETAIL = createField(DSL.name("locdt_locationdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LocationDetailPK.class, id -> new com.echothree.model.data.warehouse.common.pk.LocationDetailPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column <code>locationdetails.locdt_loc_locationid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, LocationPK> LOCATION = createField(DSL.name("locdt_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>locationdetails.locdt_warehousepartyid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, PartyPK> WAREHOUSE_PARTY = createField(DSL.name("locdt_warehousepartyid"), 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>locationdetails.locdt_locationname</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, String> LOCATION_NAME = createField(DSL.name("locdt_locationname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
087
088    /**
089     * The column <code>locationdetails.locdt_loctyp_locationtypeid</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, LocationTypePK> LOCATION_TYPE = createField(DSL.name("locdt_loctyp_locationtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LocationTypePK.class, id -> new com.echothree.model.data.warehouse.common.pk.LocationTypePK(id), primaryKey -> primaryKey.getEntityId()));
092
093    /**
094     * The column <code>locationdetails.locdt_locutyp_locationusetypeid</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, LocationUseTypePK> LOCATION_USE_TYPE = createField(DSL.name("locdt_locutyp_locationusetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LocationUseTypePK.class, id -> new com.echothree.model.data.warehouse.common.pk.LocationUseTypePK(id), primaryKey -> primaryKey.getEntityId()));
097
098    /**
099     * The column <code>locationdetails.locdt_velocity</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, Integer> VELOCITY = createField(DSL.name("locdt_velocity"), SQLDataType.INTEGER.nullable(false), this, "");
102
103    /**
104     * The column
105     * <code>locationdetails.locdt_invlocgrp_inventorylocationgroupid</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, InventoryLocationGroupPK> INVENTORY_LOCATION_GROUP = createField(DSL.name("locdt_invlocgrp_inventorylocationgroupid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLocationGroupPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLocationGroupPK(id), primaryKey -> primaryKey.getEntityId()));
108
109    /**
110     * The column <code>locationdetails.locdt_fromtime</code>.
111     */
112    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, Long> FROM_TIME = createField(DSL.name("locdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
113
114    /**
115     * The column <code>locationdetails.locdt_thrutime</code>.
116     */
117    public final TableField<com.echothree.model.jooq.server.records.warehouse.LocationDetails, Long> THRU_TIME = createField(DSL.name("locdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
118
119    private LocationDetails(Name alias, Table<com.echothree.model.jooq.server.records.warehouse.LocationDetails> aliased) {
120        this(alias, aliased, (Field<?>[]) null, null);
121    }
122
123    private LocationDetails(Name alias, Table<com.echothree.model.jooq.server.records.warehouse.LocationDetails> aliased, Field<?>[] parameters, Condition where) {
124        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
125    }
126
127    /**
128     * Create an aliased <code>locationdetails</code> table reference
129     */
130    public LocationDetails(String alias) {
131        this(DSL.name(alias), LocationDetails);
132    }
133
134    /**
135     * Create an aliased <code>locationdetails</code> table reference
136     */
137    public LocationDetails(Name alias) {
138        this(alias, LocationDetails);
139    }
140
141    /**
142     * Create a <code>locationdetails</code> table reference
143     */
144    public LocationDetails() {
145        this(DSL.name("locationdetails"), null);
146    }
147
148    public <O extends Record> LocationDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.warehouse.LocationDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.warehouse.LocationDetails> parentPath) {
149        super(path, childPath, parentPath, LocationDetails);
150    }
151
152    /**
153     * A subtype implementing {@link Path} for simplified path-based joins.
154     */
155    public static class LocationDetailsPath extends LocationDetails implements Path<com.echothree.model.jooq.server.records.warehouse.LocationDetails> {
156
157        private static final long serialVersionUID = 1L;
158        public <O extends Record> LocationDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.warehouse.LocationDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.warehouse.LocationDetails> parentPath) {
159            super(path, childPath, parentPath);
160        }
161        private LocationDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.warehouse.LocationDetails> aliased) {
162            super(alias, aliased);
163        }
164
165        @Override
166        public LocationDetailsPath as(String alias) {
167            return new LocationDetailsPath(DSL.name(alias), this);
168        }
169
170        @Override
171        public LocationDetailsPath as(Name alias) {
172            return new LocationDetailsPath(alias, this);
173        }
174
175        @Override
176        public LocationDetailsPath as(Table<?> alias) {
177            return new LocationDetailsPath(alias.getQualifiedName(), this);
178        }
179    }
180
181    @Override
182    public UniqueKey<com.echothree.model.jooq.server.records.warehouse.LocationDetails> getPrimaryKey() {
183        return KeyRegistry.LOCATION_DETAILS_PK;
184    }
185
186    @Override
187    public List<UniqueKey<com.echothree.model.jooq.server.records.warehouse.LocationDetails>> getUniqueKeys() {
188        return Arrays.asList(KeyRegistry.LOCATION_DETAILS_LOCATION_AND_THRU_TIME_UK, KeyRegistry.LOCATION_DETAILS_WAREHOUSE_PARTY_AND_LOCATION_NAME_AND_THRU_TIME_UK);
189    }
190
191    @Override
192    public List<ForeignKey<com.echothree.model.jooq.server.records.warehouse.LocationDetails, ?>> getReferences() {
193        return Arrays.asList(KeyRegistry.LOCATION_DETAILS_INVENTORY_LOCATION_GROUP_FK, KeyRegistry.LOCATION_DETAILS_LOCATION_FK, KeyRegistry.LOCATION_DETAILS_LOCATION_TYPE_FK, KeyRegistry.LOCATION_DETAILS_LOCATION_USE_TYPE_FK, KeyRegistry.LOCATION_DETAILS_WAREHOUSE_PARTY_FK);
194    }
195
196    private transient InventoryLocationGroupsPath _locdt_invlocgrp_inventorylocationgroupid_fk;
197
198    /**
199     * Get the implicit join path to the <code>inventorylocationgroups</code>
200     * table.
201     */
202    public InventoryLocationGroupsPath locdt_invlocgrp_inventorylocationgroupid_fk() {
203        if (_locdt_invlocgrp_inventorylocationgroupid_fk == null)
204            _locdt_invlocgrp_inventorylocationgroupid_fk = new InventoryLocationGroupsPath(this, KeyRegistry.LOCATION_DETAILS_INVENTORY_LOCATION_GROUP_FK, null);
205
206        return _locdt_invlocgrp_inventorylocationgroupid_fk;
207    }
208
209    private transient LocationsPath _locdt_loc_locationid_fk;
210
211    /**
212     * Get the implicit join path to the <code>locations</code> table.
213     */
214    public LocationsPath locdt_loc_locationid_fk() {
215        if (_locdt_loc_locationid_fk == null)
216            _locdt_loc_locationid_fk = new LocationsPath(this, KeyRegistry.LOCATION_DETAILS_LOCATION_FK, null);
217
218        return _locdt_loc_locationid_fk;
219    }
220
221    private transient LocationTypesPath _locdt_loctyp_locationtypeid_fk;
222
223    /**
224     * Get the implicit join path to the <code>locationtypes</code> table.
225     */
226    public LocationTypesPath locdt_loctyp_locationtypeid_fk() {
227        if (_locdt_loctyp_locationtypeid_fk == null)
228            _locdt_loctyp_locationtypeid_fk = new LocationTypesPath(this, KeyRegistry.LOCATION_DETAILS_LOCATION_TYPE_FK, null);
229
230        return _locdt_loctyp_locationtypeid_fk;
231    }
232
233    private transient LocationUseTypesPath _locdt_locutyp_locationusetypeid_fk;
234
235    /**
236     * Get the implicit join path to the <code>locationusetypes</code> table.
237     */
238    public LocationUseTypesPath locdt_locutyp_locationusetypeid_fk() {
239        if (_locdt_locutyp_locationusetypeid_fk == null)
240            _locdt_locutyp_locationusetypeid_fk = new LocationUseTypesPath(this, KeyRegistry.LOCATION_DETAILS_LOCATION_USE_TYPE_FK, null);
241
242        return _locdt_locutyp_locationusetypeid_fk;
243    }
244
245    private transient PartiesPath _locdt_warehousepartyid_fk;
246
247    /**
248     * Get the implicit join path to the <code>parties</code> table.
249     */
250    public PartiesPath locdt_warehousepartyid_fk() {
251        if (_locdt_warehousepartyid_fk == null)
252            _locdt_warehousepartyid_fk = new PartiesPath(this, KeyRegistry.LOCATION_DETAILS_WAREHOUSE_PARTY_FK, null);
253
254        return _locdt_warehousepartyid_fk;
255    }
256
257    @Override
258    public LocationDetails as(String alias) {
259        return new LocationDetails(DSL.name(alias), this);
260    }
261
262    @Override
263    public LocationDetails as(Name alias) {
264        return new LocationDetails(alias, this);
265    }
266
267    @Override
268    public LocationDetails as(Table<?> alias) {
269        return new LocationDetails(alias.getQualifiedName(), this);
270    }
271
272    /**
273     * Rename this table
274     */
275    @Override
276    public LocationDetails rename(String name) {
277        return new LocationDetails(DSL.name(name), null);
278    }
279
280    /**
281     * Rename this table
282     */
283    @Override
284    public LocationDetails rename(Name name) {
285        return new LocationDetails(name, null);
286    }
287
288    /**
289     * Rename this table
290     */
291    @Override
292    public LocationDetails rename(Table<?> name) {
293        return new LocationDetails(name.getQualifiedName(), null);
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    public LocationDetails where(Condition condition) {
301        return new LocationDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
302    }
303
304    /**
305     * Create an inline derived table from this table
306     */
307    @Override
308    public LocationDetails where(Collection<? extends Condition> conditions) {
309        return where(DSL.and(conditions));
310    }
311
312    /**
313     * Create an inline derived table from this table
314     */
315    @Override
316    public LocationDetails where(Condition... conditions) {
317        return where(DSL.and(conditions));
318    }
319
320    /**
321     * Create an inline derived table from this table
322     */
323    @Override
324    public LocationDetails where(Field<Boolean> 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 LocationDetails where(SQL condition) {
334        return where(DSL.condition(condition));
335    }
336
337    /**
338     * Create an inline derived table from this table
339     */
340    @Override
341    @PlainSQL
342    public LocationDetails where(@Stringly.SQL String condition) {
343        return where(DSL.condition(condition));
344    }
345
346    /**
347     * Create an inline derived table from this table
348     */
349    @Override
350    @PlainSQL
351    public LocationDetails where(@Stringly.SQL String condition, Object... binds) {
352        return where(DSL.condition(condition, binds));
353    }
354
355    /**
356     * Create an inline derived table from this table
357     */
358    @Override
359    @PlainSQL
360    public LocationDetails where(@Stringly.SQL String condition, QueryPart... parts) {
361        return where(DSL.condition(condition, parts));
362    }
363
364    /**
365     * Create an inline derived table from this table
366     */
367    @Override
368    public LocationDetails whereExists(TableLike<?> select) {
369        return where(DSL.exists(select));
370    }
371
372    /**
373     * Create an inline derived table from this table
374     */
375    @Override
376    public LocationDetails whereNotExists(TableLike<?> select) {
377        return where(DSL.notExists(select));
378    }
379}