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.InventoryLayerBucketPK;
009import com.echothree.model.data.inventory.common.pk.InventoryLayerPK;
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.InventoryLayers.InventoryLayersPath;
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 InventoryLayerBuckets extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>inventorylayerbuckets</code>
048     */
049    public static final InventoryLayerBuckets InventoryLayerBuckets = new InventoryLayerBuckets();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets> getRecordType() {
056        return com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets.class;
057    }
058
059    /**
060     * The column
061     * <code>inventorylayerbuckets.invlbcktd_inventorylayerbucketid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets, InventoryLayerBucketPK> INVENTORY_LAYER_BUCKET = createField(DSL.name("invlbcktd_inventorylayerbucketid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLayerBucketPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLayerBucketPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>inventorylayerbuckets.invlbcktd_invl_inventorylayerid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets, InventoryLayerPK> INVENTORY_LAYER = createField(DSL.name("invlbcktd_invl_inventorylayerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryLayerPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryLayerPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>inventorylayerbuckets.invlbcktd_invbckttyp_inventorybuckettypeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets, InventoryBucketTypePK> INVENTORY_BUCKET_TYPE = createField(DSL.name("invlbcktd_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>inventorylayerbuckets.invlbcktd_quantity</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets, Long> QUANTITY = createField(DSL.name("invlbcktd_quantity"), SQLDataType.BIGINT.nullable(false), this, "");
081
082    private InventoryLayerBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets> aliased) {
083        this(alias, aliased, (Field<?>[]) null, null);
084    }
085
086    private InventoryLayerBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets> aliased, Field<?>[] parameters, Condition where) {
087        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
088    }
089
090    /**
091     * Create an aliased <code>inventorylayerbuckets</code> table reference
092     */
093    public InventoryLayerBuckets(String alias) {
094        this(DSL.name(alias), InventoryLayerBuckets);
095    }
096
097    /**
098     * Create an aliased <code>inventorylayerbuckets</code> table reference
099     */
100    public InventoryLayerBuckets(Name alias) {
101        this(alias, InventoryLayerBuckets);
102    }
103
104    /**
105     * Create a <code>inventorylayerbuckets</code> table reference
106     */
107    public InventoryLayerBuckets() {
108        this(DSL.name("inventorylayerbuckets"), null);
109    }
110
111    @Override
112    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets> getPrimaryKey() {
113        return KeyRegistry.INVENTORY_LAYER_BUCKETS_PK;
114    }
115
116    @Override
117    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets>> getUniqueKeys() {
118        return Arrays.asList(KeyRegistry.INVENTORY_LAYER_BUCKETS_INVENTORY_LAYER_AND_INVENTORY_BUCKET_TYPE_UK);
119    }
120
121    @Override
122    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryLayerBuckets, ?>> getReferences() {
123        return Arrays.asList(KeyRegistry.INVENTORY_LAYER_BUCKETS_INVENTORY_BUCKET_TYPE_FK, KeyRegistry.INVENTORY_LAYER_BUCKETS_INVENTORY_LAYER_FK);
124    }
125
126    private transient InventoryBucketTypesPath _invlbcktd_invbckttyp_inventorybuckettypeid_fk;
127
128    /**
129     * Get the implicit join path to the <code>inventorybuckettypes</code>
130     * table.
131     */
132    public InventoryBucketTypesPath invlbcktd_invbckttyp_inventorybuckettypeid_fk() {
133        if (_invlbcktd_invbckttyp_inventorybuckettypeid_fk == null)
134            _invlbcktd_invbckttyp_inventorybuckettypeid_fk = new InventoryBucketTypesPath(this, KeyRegistry.INVENTORY_LAYER_BUCKETS_INVENTORY_BUCKET_TYPE_FK, null);
135
136        return _invlbcktd_invbckttyp_inventorybuckettypeid_fk;
137    }
138
139    private transient InventoryLayersPath _invlbcktd_invl_inventorylayerid_fk;
140
141    /**
142     * Get the implicit join path to the <code>inventorylayers</code> table.
143     */
144    public InventoryLayersPath invlbcktd_invl_inventorylayerid_fk() {
145        if (_invlbcktd_invl_inventorylayerid_fk == null)
146            _invlbcktd_invl_inventorylayerid_fk = new InventoryLayersPath(this, KeyRegistry.INVENTORY_LAYER_BUCKETS_INVENTORY_LAYER_FK, null);
147
148        return _invlbcktd_invl_inventorylayerid_fk;
149    }
150
151    @Override
152    public InventoryLayerBuckets as(String alias) {
153        return new InventoryLayerBuckets(DSL.name(alias), this);
154    }
155
156    @Override
157    public InventoryLayerBuckets as(Name alias) {
158        return new InventoryLayerBuckets(alias, this);
159    }
160
161    @Override
162    public InventoryLayerBuckets as(Table<?> alias) {
163        return new InventoryLayerBuckets(alias.getQualifiedName(), this);
164    }
165
166    /**
167     * Rename this table
168     */
169    @Override
170    public InventoryLayerBuckets rename(String name) {
171        return new InventoryLayerBuckets(DSL.name(name), null);
172    }
173
174    /**
175     * Rename this table
176     */
177    @Override
178    public InventoryLayerBuckets rename(Name name) {
179        return new InventoryLayerBuckets(name, null);
180    }
181
182    /**
183     * Rename this table
184     */
185    @Override
186    public InventoryLayerBuckets rename(Table<?> name) {
187        return new InventoryLayerBuckets(name.getQualifiedName(), null);
188    }
189
190    /**
191     * Create an inline derived table from this table
192     */
193    @Override
194    public InventoryLayerBuckets where(Condition condition) {
195        return new InventoryLayerBuckets(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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets 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 InventoryLayerBuckets whereNotExists(TableLike<?> select) {
271        return where(DSL.notExists(select));
272    }
273}