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.InventoryTransactionReasonDetailPK;
008import com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonPK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.inventory.InventoryTransactionReasonDetails.InventoryTransactionReasonDetailsPath;
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.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class InventoryTransactionReasons extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of <code>inventorytransactionreasons</code>
049     */
050    public static final InventoryTransactionReasons InventoryTransactionReasons = new InventoryTransactionReasons();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> getRecordType() {
057        return com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons.class;
058    }
059
060    /**
061     * The column
062     * <code>inventorytransactionreasons.invtrxrsn_inventorytransactionreasonid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons, InventoryTransactionReasonPK> INVENTORY_TRANSACTION_REASON = createField(DSL.name("invtrxrsn_inventorytransactionreasonid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryTransactionReasonPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column
068     * <code>inventorytransactionreasons.invtrxrsn_activedetailid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons, InventoryTransactionReasonDetailPK> ACTIVE_DETAIL = createField(DSL.name("invtrxrsn_activedetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, InventoryTransactionReasonDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonDetailPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column
074     * <code>inventorytransactionreasons.invtrxrsn_lastdetailid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons, InventoryTransactionReasonDetailPK> LAST_DETAIL = createField(DSL.name("invtrxrsn_lastdetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, InventoryTransactionReasonDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonDetailPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    private InventoryTransactionReasons(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> aliased) {
079        this(alias, aliased, (Field<?>[]) null, null);
080    }
081
082    private InventoryTransactionReasons(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> aliased, Field<?>[] parameters, Condition where) {
083        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
084    }
085
086    /**
087     * Create an aliased <code>inventorytransactionreasons</code> table
088     * reference
089     */
090    public InventoryTransactionReasons(String alias) {
091        this(DSL.name(alias), InventoryTransactionReasons);
092    }
093
094    /**
095     * Create an aliased <code>inventorytransactionreasons</code> table
096     * reference
097     */
098    public InventoryTransactionReasons(Name alias) {
099        this(alias, InventoryTransactionReasons);
100    }
101
102    /**
103     * Create a <code>inventorytransactionreasons</code> table reference
104     */
105    public InventoryTransactionReasons() {
106        this(DSL.name("inventorytransactionreasons"), null);
107    }
108
109    public <O extends Record> InventoryTransactionReasons(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> parentPath) {
110        super(path, childPath, parentPath, InventoryTransactionReasons);
111    }
112
113    /**
114     * A subtype implementing {@link Path} for simplified path-based joins.
115     */
116    public static class InventoryTransactionReasonsPath extends InventoryTransactionReasons implements Path<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> {
117
118        private static final long serialVersionUID = 1L;
119        public <O extends Record> InventoryTransactionReasonsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> parentPath) {
120            super(path, childPath, parentPath);
121        }
122        private InventoryTransactionReasonsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> aliased) {
123            super(alias, aliased);
124        }
125
126        @Override
127        public InventoryTransactionReasonsPath as(String alias) {
128            return new InventoryTransactionReasonsPath(DSL.name(alias), this);
129        }
130
131        @Override
132        public InventoryTransactionReasonsPath as(Name alias) {
133            return new InventoryTransactionReasonsPath(alias, this);
134        }
135
136        @Override
137        public InventoryTransactionReasonsPath as(Table<?> alias) {
138            return new InventoryTransactionReasonsPath(alias.getQualifiedName(), this);
139        }
140    }
141
142    @Override
143    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons> getPrimaryKey() {
144        return KeyRegistry.INVENTORY_TRANSACTION_REASONS_PK;
145    }
146
147    @Override
148    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons>> getUniqueKeys() {
149        return Arrays.asList(KeyRegistry.INVENTORY_TRANSACTION_REASONS_ACTIVE_DETAIL_UK, KeyRegistry.INVENTORY_TRANSACTION_REASONS_LAST_DETAIL_UK);
150    }
151
152    @Override
153    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionReasons, ?>> getReferences() {
154        return Arrays.asList(KeyRegistry.INVENTORY_TRANSACTION_REASONS_ACTIVE_DETAIL_FK, KeyRegistry.INVENTORY_TRANSACTION_REASONS_LAST_DETAIL_FK);
155    }
156
157    private transient InventoryTransactionReasonDetailsPath _invtrxrsn_activedetailid_fk;
158
159    /**
160     * Get the implicit join path to the
161     * <code>inventorytransactionreasondetails</code> table, via the
162     * <code>invtrxrsn_activedetailid_fk</code> key.
163     */
164    public InventoryTransactionReasonDetailsPath invtrxrsn_activedetailid_fk() {
165        if (_invtrxrsn_activedetailid_fk == null)
166            _invtrxrsn_activedetailid_fk = new InventoryTransactionReasonDetailsPath(this, KeyRegistry.INVENTORY_TRANSACTION_REASONS_ACTIVE_DETAIL_FK, null);
167
168        return _invtrxrsn_activedetailid_fk;
169    }
170
171    private transient InventoryTransactionReasonDetailsPath _invtrxrsn_lastdetailid_fk;
172
173    /**
174     * Get the implicit join path to the
175     * <code>inventorytransactionreasondetails</code> table, via the
176     * <code>invtrxrsn_lastdetailid_fk</code> key.
177     */
178    public InventoryTransactionReasonDetailsPath invtrxrsn_lastdetailid_fk() {
179        if (_invtrxrsn_lastdetailid_fk == null)
180            _invtrxrsn_lastdetailid_fk = new InventoryTransactionReasonDetailsPath(this, KeyRegistry.INVENTORY_TRANSACTION_REASONS_LAST_DETAIL_FK, null);
181
182        return _invtrxrsn_lastdetailid_fk;
183    }
184
185    @Override
186    public InventoryTransactionReasons as(String alias) {
187        return new InventoryTransactionReasons(DSL.name(alias), this);
188    }
189
190    @Override
191    public InventoryTransactionReasons as(Name alias) {
192        return new InventoryTransactionReasons(alias, this);
193    }
194
195    @Override
196    public InventoryTransactionReasons as(Table<?> alias) {
197        return new InventoryTransactionReasons(alias.getQualifiedName(), this);
198    }
199
200    /**
201     * Rename this table
202     */
203    @Override
204    public InventoryTransactionReasons rename(String name) {
205        return new InventoryTransactionReasons(DSL.name(name), null);
206    }
207
208    /**
209     * Rename this table
210     */
211    @Override
212    public InventoryTransactionReasons rename(Name name) {
213        return new InventoryTransactionReasons(name, null);
214    }
215
216    /**
217     * Rename this table
218     */
219    @Override
220    public InventoryTransactionReasons rename(Table<?> name) {
221        return new InventoryTransactionReasons(name.getQualifiedName(), null);
222    }
223
224    /**
225     * Create an inline derived table from this table
226     */
227    @Override
228    public InventoryTransactionReasons where(Condition condition) {
229        return new InventoryTransactionReasons(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
230    }
231
232    /**
233     * Create an inline derived table from this table
234     */
235    @Override
236    public InventoryTransactionReasons where(Collection<? extends Condition> conditions) {
237        return where(DSL.and(conditions));
238    }
239
240    /**
241     * Create an inline derived table from this table
242     */
243    @Override
244    public InventoryTransactionReasons where(Condition... conditions) {
245        return where(DSL.and(conditions));
246    }
247
248    /**
249     * Create an inline derived table from this table
250     */
251    @Override
252    public InventoryTransactionReasons where(Field<Boolean> condition) {
253        return where(DSL.condition(condition));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    @PlainSQL
261    public InventoryTransactionReasons where(SQL condition) {
262        return where(DSL.condition(condition));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    @PlainSQL
270    public InventoryTransactionReasons where(@Stringly.SQL String condition) {
271        return where(DSL.condition(condition));
272    }
273
274    /**
275     * Create an inline derived table from this table
276     */
277    @Override
278    @PlainSQL
279    public InventoryTransactionReasons where(@Stringly.SQL String condition, Object... binds) {
280        return where(DSL.condition(condition, binds));
281    }
282
283    /**
284     * Create an inline derived table from this table
285     */
286    @Override
287    @PlainSQL
288    public InventoryTransactionReasons where(@Stringly.SQL String condition, QueryPart... parts) {
289        return where(DSL.condition(condition, parts));
290    }
291
292    /**
293     * Create an inline derived table from this table
294     */
295    @Override
296    public InventoryTransactionReasons whereExists(TableLike<?> select) {
297        return where(DSL.exists(select));
298    }
299
300    /**
301     * Create an inline derived table from this table
302     */
303    @Override
304    public InventoryTransactionReasons whereNotExists(TableLike<?> select) {
305        return where(DSL.notExists(select));
306    }
307}