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.InventoryBucketTypePK;
008import com.echothree.model.data.inventory.common.pk.InventoryLocationBucketPK;
009import com.echothree.model.data.inventory.common.pk.InventoryLocationPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.inventory.InventoryBucketTypes.InventoryBucketTypesPath;
012import com.echothree.model.jooq.server.tables.inventory.InventoryLocations.InventoryLocationsPath;
013
014import java.util.Arrays;
015import java.util.Collection;
016import java.util.List;
017
018import org.jooq.Condition;
019import org.jooq.Converter;
020import org.jooq.Field;
021import org.jooq.ForeignKey;
022import org.jooq.Name;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.SQL;
026import org.jooq.Stringly;
027import org.jooq.Table;
028import org.jooq.TableField;
029import org.jooq.TableLike;
030import org.jooq.TableOptions;
031import org.jooq.UniqueKey;
032import org.jooq.impl.DSL;
033import org.jooq.impl.Internal;
034import org.jooq.impl.SQLDataType;
035import org.jooq.impl.TableImpl;
036
037
038/**
039 * This class is generated by jOOQ.
040 */
041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
042public class InventoryLocationBuckets extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>inventorylocationbuckets</code>
048     */
049    public static final InventoryLocationBuckets InventoryLocationBuckets = new InventoryLocationBuckets();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets> getRecordType() {
056        return com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets.class;
057    }
058
059    /**
060     * The column
061     * <code>inventorylocationbuckets.invlocbcktd_inventorylocationbucketid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets, InventoryLocationBucketPK> INVENTORY_LOCATION_BUCKET = createField(DSL.name("invlocbcktd_inventorylocationbucketid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLocationBucketPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLocationBucketPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>inventorylocationbuckets.invlocbcktd_invloc_inventorylocationid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets, InventoryLocationPK> INVENTORY_LOCATION = createField(DSL.name("invlocbcktd_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()));
070
071    /**
072     * The column
073     * <code>inventorylocationbuckets.invlocbcktd_invbckttyp_inventorybuckettypeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets, InventoryBucketTypePK> INVENTORY_BUCKET_TYPE = createField(DSL.name("invlocbcktd_invbckttyp_inventorybuckettypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryBucketTypePK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryBucketTypePK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column <code>inventorylocationbuckets.invlocbcktd_quantity</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets, Long> QUANTITY = createField(DSL.name("invlocbcktd_quantity"), SQLDataType.BIGINT.nullable(false), this, "");
081
082    private InventoryLocationBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets> aliased) {
083        this(alias, aliased, (Field<?>[]) null, null);
084    }
085
086    private InventoryLocationBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets> aliased, Field<?>[] parameters, Condition where) {
087        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
088    }
089
090    /**
091     * Create an aliased <code>inventorylocationbuckets</code> table reference
092     */
093    public InventoryLocationBuckets(String alias) {
094        this(DSL.name(alias), InventoryLocationBuckets);
095    }
096
097    /**
098     * Create an aliased <code>inventorylocationbuckets</code> table reference
099     */
100    public InventoryLocationBuckets(Name alias) {
101        this(alias, InventoryLocationBuckets);
102    }
103
104    /**
105     * Create a <code>inventorylocationbuckets</code> table reference
106     */
107    public InventoryLocationBuckets() {
108        this(DSL.name("inventorylocationbuckets"), null);
109    }
110
111    @Override
112    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets> getPrimaryKey() {
113        return KeyRegistry.INVENTORY_LOCATION_BUCKETS_PK;
114    }
115
116    @Override
117    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets>> getUniqueKeys() {
118        return Arrays.asList(KeyRegistry.INVENTORY_LOCATION_BUCKETS_INVENTORY_LOCATION_AND_INVENTORY_BUCKET_TYPE_UK);
119    }
120
121    @Override
122    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryLocationBuckets, ?>> getReferences() {
123        return Arrays.asList(KeyRegistry.INVENTORY_LOCATION_BUCKETS_INVENTORY_BUCKET_TYPE_FK, KeyRegistry.INVENTORY_LOCATION_BUCKETS_INVENTORY_LOCATION_FK);
124    }
125
126    private transient InventoryBucketTypesPath _invlocbcktd_invbckttyp_inventorybuckettypeid_fk;
127
128    /**
129     * Get the implicit join path to the <code>inventorybuckettypes</code>
130     * table.
131     */
132    public InventoryBucketTypesPath invlocbcktd_invbckttyp_inventorybuckettypeid_fk() {
133        if (_invlocbcktd_invbckttyp_inventorybuckettypeid_fk == null)
134            _invlocbcktd_invbckttyp_inventorybuckettypeid_fk = new InventoryBucketTypesPath(this, KeyRegistry.INVENTORY_LOCATION_BUCKETS_INVENTORY_BUCKET_TYPE_FK, null);
135
136        return _invlocbcktd_invbckttyp_inventorybuckettypeid_fk;
137    }
138
139    private transient InventoryLocationsPath _invlocbcktd_invloc_inventorylocationid_fk;
140
141    /**
142     * Get the implicit join path to the <code>inventorylocations</code> table.
143     */
144    public InventoryLocationsPath invlocbcktd_invloc_inventorylocationid_fk() {
145        if (_invlocbcktd_invloc_inventorylocationid_fk == null)
146            _invlocbcktd_invloc_inventorylocationid_fk = new InventoryLocationsPath(this, KeyRegistry.INVENTORY_LOCATION_BUCKETS_INVENTORY_LOCATION_FK, null);
147
148        return _invlocbcktd_invloc_inventorylocationid_fk;
149    }
150
151    @Override
152    public InventoryLocationBuckets as(String alias) {
153        return new InventoryLocationBuckets(DSL.name(alias), this);
154    }
155
156    @Override
157    public InventoryLocationBuckets as(Name alias) {
158        return new InventoryLocationBuckets(alias, this);
159    }
160
161    @Override
162    public InventoryLocationBuckets as(Table<?> alias) {
163        return new InventoryLocationBuckets(alias.getQualifiedName(), this);
164    }
165
166    /**
167     * Rename this table
168     */
169    @Override
170    public InventoryLocationBuckets rename(String name) {
171        return new InventoryLocationBuckets(DSL.name(name), null);
172    }
173
174    /**
175     * Rename this table
176     */
177    @Override
178    public InventoryLocationBuckets rename(Name name) {
179        return new InventoryLocationBuckets(name, null);
180    }
181
182    /**
183     * Rename this table
184     */
185    @Override
186    public InventoryLocationBuckets rename(Table<?> name) {
187        return new InventoryLocationBuckets(name.getQualifiedName(), null);
188    }
189
190    /**
191     * Create an inline derived table from this table
192     */
193    @Override
194    public InventoryLocationBuckets where(Condition condition) {
195        return new InventoryLocationBuckets(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
196    }
197
198    /**
199     * Create an inline derived table from this table
200     */
201    @Override
202    public InventoryLocationBuckets where(Collection<? extends Condition> conditions) {
203        return where(DSL.and(conditions));
204    }
205
206    /**
207     * Create an inline derived table from this table
208     */
209    @Override
210    public InventoryLocationBuckets where(Condition... conditions) {
211        return where(DSL.and(conditions));
212    }
213
214    /**
215     * Create an inline derived table from this table
216     */
217    @Override
218    public InventoryLocationBuckets where(Field<Boolean> condition) {
219        return where(DSL.condition(condition));
220    }
221
222    /**
223     * Create an inline derived table from this table
224     */
225    @Override
226    @PlainSQL
227    public InventoryLocationBuckets where(SQL condition) {
228        return where(DSL.condition(condition));
229    }
230
231    /**
232     * Create an inline derived table from this table
233     */
234    @Override
235    @PlainSQL
236    public InventoryLocationBuckets where(@Stringly.SQL String condition) {
237        return where(DSL.condition(condition));
238    }
239
240    /**
241     * Create an inline derived table from this table
242     */
243    @Override
244    @PlainSQL
245    public InventoryLocationBuckets where(@Stringly.SQL String condition, Object... binds) {
246        return where(DSL.condition(condition, binds));
247    }
248
249    /**
250     * Create an inline derived table from this table
251     */
252    @Override
253    @PlainSQL
254    public InventoryLocationBuckets where(@Stringly.SQL String condition, QueryPart... parts) {
255        return where(DSL.condition(condition, parts));
256    }
257
258    /**
259     * Create an inline derived table from this table
260     */
261    @Override
262    public InventoryLocationBuckets whereExists(TableLike<?> select) {
263        return where(DSL.exists(select));
264    }
265
266    /**
267     * Create an inline derived table from this table
268     */
269    @Override
270    public InventoryLocationBuckets whereNotExists(TableLike<?> select) {
271        return where(DSL.notExists(select));
272    }
273}