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