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.InventoryTransactionDetailPK;
008import com.echothree.model.data.inventory.common.pk.InventoryTransactionPK;
009import com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonPK;
010import com.echothree.model.data.inventory.common.pk.InventoryTransactionTypePK;
011import com.echothree.model.data.party.common.pk.PartyPK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.inventory.InventoryTransactionReasons.InventoryTransactionReasonsPath;
014import com.echothree.model.jooq.server.tables.inventory.InventoryTransactionTypes.InventoryTransactionTypesPath;
015import com.echothree.model.jooq.server.tables.inventory.InventoryTransactions.InventoryTransactionsPath;
016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
017
018import java.util.Arrays;
019import java.util.Collection;
020import java.util.List;
021
022import org.jooq.Condition;
023import org.jooq.Converter;
024import org.jooq.Field;
025import org.jooq.ForeignKey;
026import org.jooq.InverseForeignKey;
027import org.jooq.Name;
028import org.jooq.Path;
029import org.jooq.PlainSQL;
030import org.jooq.QueryPart;
031import org.jooq.Record;
032import org.jooq.SQL;
033import org.jooq.Stringly;
034import org.jooq.Table;
035import org.jooq.TableField;
036import org.jooq.TableLike;
037import org.jooq.TableOptions;
038import org.jooq.UniqueKey;
039import org.jooq.impl.DSL;
040import org.jooq.impl.Internal;
041import org.jooq.impl.SQLDataType;
042import org.jooq.impl.TableImpl;
043
044
045/**
046 * This class is generated by jOOQ.
047 */
048@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
049public class InventoryTransactionDetails extends TableImpl<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>inventorytransactiondetails</code>
055     */
056    public static final InventoryTransactionDetails InventoryTransactionDetails = new InventoryTransactionDetails();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> getRecordType() {
063        return com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails.class;
064    }
065
066    /**
067     * The column
068     * <code>inventorytransactiondetails.invtrxdt_inventorytransactiondetailid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, InventoryTransactionDetailPK> INVENTORY_TRANSACTION_DETAIL = createField(DSL.name("invtrxdt_inventorytransactiondetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryTransactionDetailPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionDetailPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column
074     * <code>inventorytransactiondetails.invtrxdt_invtrx_inventorytransactionid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, InventoryTransactionPK> INVENTORY_TRANSACTION = createField(DSL.name("invtrxdt_invtrx_inventorytransactionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryTransactionPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column
080     * <code>inventorytransactiondetails.invtrxdt_invtrxtyp_inventorytransactiontypeid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, InventoryTransactionTypePK> INVENTORY_TRANSACTION_TYPE = createField(DSL.name("invtrxdt_invtrxtyp_inventorytransactiontypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryTransactionTypePK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionTypePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column
086     * <code>inventorytransactiondetails.invtrxdt_inventorytransactionname</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, String> INVENTORY_TRANSACTION_NAME = createField(DSL.name("invtrxdt_inventorytransactionname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
089
090    /**
091     * The column
092     * <code>inventorytransactiondetails.invtrxdt_companypartyid</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, PartyPK> COMPANY_PARTY = createField(DSL.name("invtrxdt_companypartyid"), 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()));
095
096    /**
097     * The column
098     * <code>inventorytransactiondetails.invtrxdt_locationpartyid</code>.
099     */
100    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, PartyPK> LOCATION_PARTY = createField(DSL.name("invtrxdt_locationpartyid"), 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()));
101
102    /**
103     * The column
104     * <code>inventorytransactiondetails.invtrxdt_invtrxrsn_inventorytransactionreasonid</code>.
105     */
106    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, InventoryTransactionReasonPK> INVENTORY_TRANSACTION_REASON = createField(DSL.name("invtrxdt_invtrxrsn_inventorytransactionreasonid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, InventoryTransactionReasonPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryTransactionReasonPK(id), primaryKey -> primaryKey.getEntityId()));
107
108    /**
109     * The column <code>inventorytransactiondetails.invtrxdt_reference</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, String> REFERENCE = createField(DSL.name("invtrxdt_reference"), SQLDataType.VARCHAR(40), this, "");
112
113    /**
114     * The column <code>inventorytransactiondetails.invtrxdt_description</code>.
115     */
116    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, String> DESCRIPTION = createField(DSL.name("invtrxdt_description"), SQLDataType.VARCHAR(132), this, "");
117
118    /**
119     * The column <code>inventorytransactiondetails.invtrxdt_fromtime</code>.
120     */
121    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, Long> FROM_TIME = createField(DSL.name("invtrxdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
122
123    /**
124     * The column <code>inventorytransactiondetails.invtrxdt_thrutime</code>.
125     */
126    public final TableField<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, Long> THRU_TIME = createField(DSL.name("invtrxdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
127
128    private InventoryTransactionDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> aliased) {
129        this(alias, aliased, (Field<?>[]) null, null);
130    }
131
132    private InventoryTransactionDetails(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> aliased, Field<?>[] parameters, Condition where) {
133        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
134    }
135
136    /**
137     * Create an aliased <code>inventorytransactiondetails</code> table
138     * reference
139     */
140    public InventoryTransactionDetails(String alias) {
141        this(DSL.name(alias), InventoryTransactionDetails);
142    }
143
144    /**
145     * Create an aliased <code>inventorytransactiondetails</code> table
146     * reference
147     */
148    public InventoryTransactionDetails(Name alias) {
149        this(alias, InventoryTransactionDetails);
150    }
151
152    /**
153     * Create a <code>inventorytransactiondetails</code> table reference
154     */
155    public InventoryTransactionDetails() {
156        this(DSL.name("inventorytransactiondetails"), null);
157    }
158
159    public <O extends Record> InventoryTransactionDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> parentPath) {
160        super(path, childPath, parentPath, InventoryTransactionDetails);
161    }
162
163    /**
164     * A subtype implementing {@link Path} for simplified path-based joins.
165     */
166    public static class InventoryTransactionDetailsPath extends InventoryTransactionDetails implements Path<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> {
167
168        private static final long serialVersionUID = 1L;
169        public <O extends Record> InventoryTransactionDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> parentPath) {
170            super(path, childPath, parentPath);
171        }
172        private InventoryTransactionDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> aliased) {
173            super(alias, aliased);
174        }
175
176        @Override
177        public InventoryTransactionDetailsPath as(String alias) {
178            return new InventoryTransactionDetailsPath(DSL.name(alias), this);
179        }
180
181        @Override
182        public InventoryTransactionDetailsPath as(Name alias) {
183            return new InventoryTransactionDetailsPath(alias, this);
184        }
185
186        @Override
187        public InventoryTransactionDetailsPath as(Table<?> alias) {
188            return new InventoryTransactionDetailsPath(alias.getQualifiedName(), this);
189        }
190    }
191
192    @Override
193    public UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails> getPrimaryKey() {
194        return KeyRegistry.INVENTORY_TRANSACTION_DETAILS_PK;
195    }
196
197    @Override
198    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails>> getUniqueKeys() {
199        return Arrays.asList(KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_AND_THRU_TIME_UK, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_TYPE_AND_INVENTORY_TRANSACTION_NAME_AND_THRU_TIME_UK);
200    }
201
202    @Override
203    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.InventoryTransactionDetails, ?>> getReferences() {
204        return Arrays.asList(KeyRegistry.INVENTORY_TRANSACTION_DETAILS_COMPANY_PARTY_FK, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_FK, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_REASON_FK, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_TYPE_FK, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_LOCATION_PARTY_FK);
205    }
206
207    private transient PartiesPath _invtrxdt_companypartyid_fk;
208
209    /**
210     * Get the implicit join path to the <code>parties</code> table, via the
211     * <code>invtrxdt_companypartyid_fk</code> key.
212     */
213    public PartiesPath invtrxdt_companypartyid_fk() {
214        if (_invtrxdt_companypartyid_fk == null)
215            _invtrxdt_companypartyid_fk = new PartiesPath(this, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_COMPANY_PARTY_FK, null);
216
217        return _invtrxdt_companypartyid_fk;
218    }
219
220    private transient InventoryTransactionsPath _invtrxdt_invtrx_inventorytransactionid_fk;
221
222    /**
223     * Get the implicit join path to the <code>inventorytransactions</code>
224     * table.
225     */
226    public InventoryTransactionsPath invtrxdt_invtrx_inventorytransactionid_fk() {
227        if (_invtrxdt_invtrx_inventorytransactionid_fk == null)
228            _invtrxdt_invtrx_inventorytransactionid_fk = new InventoryTransactionsPath(this, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_FK, null);
229
230        return _invtrxdt_invtrx_inventorytransactionid_fk;
231    }
232
233    private transient InventoryTransactionReasonsPath _invtrxdt_invtrxrsn_inventorytransactionreasonid_fk;
234
235    /**
236     * Get the implicit join path to the
237     * <code>inventorytransactionreasons</code> table.
238     */
239    public InventoryTransactionReasonsPath invtrxdt_invtrxrsn_inventorytransactionreasonid_fk() {
240        if (_invtrxdt_invtrxrsn_inventorytransactionreasonid_fk == null)
241            _invtrxdt_invtrxrsn_inventorytransactionreasonid_fk = new InventoryTransactionReasonsPath(this, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_REASON_FK, null);
242
243        return _invtrxdt_invtrxrsn_inventorytransactionreasonid_fk;
244    }
245
246    private transient InventoryTransactionTypesPath _invtrxdt_invtrxtyp_inventorytransactiontypeid_fk;
247
248    /**
249     * Get the implicit join path to the <code>inventorytransactiontypes</code>
250     * table.
251     */
252    public InventoryTransactionTypesPath invtrxdt_invtrxtyp_inventorytransactiontypeid_fk() {
253        if (_invtrxdt_invtrxtyp_inventorytransactiontypeid_fk == null)
254            _invtrxdt_invtrxtyp_inventorytransactiontypeid_fk = new InventoryTransactionTypesPath(this, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_INVENTORY_TRANSACTION_TYPE_FK, null);
255
256        return _invtrxdt_invtrxtyp_inventorytransactiontypeid_fk;
257    }
258
259    private transient PartiesPath _invtrxdt_locationpartyid_fk;
260
261    /**
262     * Get the implicit join path to the <code>parties</code> table, via the
263     * <code>invtrxdt_locationpartyid_fk</code> key.
264     */
265    public PartiesPath invtrxdt_locationpartyid_fk() {
266        if (_invtrxdt_locationpartyid_fk == null)
267            _invtrxdt_locationpartyid_fk = new PartiesPath(this, KeyRegistry.INVENTORY_TRANSACTION_DETAILS_LOCATION_PARTY_FK, null);
268
269        return _invtrxdt_locationpartyid_fk;
270    }
271
272    @Override
273    public InventoryTransactionDetails as(String alias) {
274        return new InventoryTransactionDetails(DSL.name(alias), this);
275    }
276
277    @Override
278    public InventoryTransactionDetails as(Name alias) {
279        return new InventoryTransactionDetails(alias, this);
280    }
281
282    @Override
283    public InventoryTransactionDetails as(Table<?> alias) {
284        return new InventoryTransactionDetails(alias.getQualifiedName(), this);
285    }
286
287    /**
288     * Rename this table
289     */
290    @Override
291    public InventoryTransactionDetails rename(String name) {
292        return new InventoryTransactionDetails(DSL.name(name), null);
293    }
294
295    /**
296     * Rename this table
297     */
298    @Override
299    public InventoryTransactionDetails rename(Name name) {
300        return new InventoryTransactionDetails(name, null);
301    }
302
303    /**
304     * Rename this table
305     */
306    @Override
307    public InventoryTransactionDetails rename(Table<?> name) {
308        return new InventoryTransactionDetails(name.getQualifiedName(), null);
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    public InventoryTransactionDetails where(Condition condition) {
316        return new InventoryTransactionDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    public InventoryTransactionDetails where(Collection<? extends Condition> conditions) {
324        return where(DSL.and(conditions));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    public InventoryTransactionDetails where(Condition... conditions) {
332        return where(DSL.and(conditions));
333    }
334
335    /**
336     * Create an inline derived table from this table
337     */
338    @Override
339    public InventoryTransactionDetails where(Field<Boolean> condition) {
340        return where(DSL.condition(condition));
341    }
342
343    /**
344     * Create an inline derived table from this table
345     */
346    @Override
347    @PlainSQL
348    public InventoryTransactionDetails where(SQL condition) {
349        return where(DSL.condition(condition));
350    }
351
352    /**
353     * Create an inline derived table from this table
354     */
355    @Override
356    @PlainSQL
357    public InventoryTransactionDetails where(@Stringly.SQL String condition) {
358        return where(DSL.condition(condition));
359    }
360
361    /**
362     * Create an inline derived table from this table
363     */
364    @Override
365    @PlainSQL
366    public InventoryTransactionDetails where(@Stringly.SQL String condition, Object... binds) {
367        return where(DSL.condition(condition, binds));
368    }
369
370    /**
371     * Create an inline derived table from this table
372     */
373    @Override
374    @PlainSQL
375    public InventoryTransactionDetails where(@Stringly.SQL String condition, QueryPart... parts) {
376        return where(DSL.condition(condition, parts));
377    }
378
379    /**
380     * Create an inline derived table from this table
381     */
382    @Override
383    public InventoryTransactionDetails whereExists(TableLike<?> select) {
384        return where(DSL.exists(select));
385    }
386
387    /**
388     * Create an inline derived table from this table
389     */
390    @Override
391    public InventoryTransactionDetails whereNotExists(TableLike<?> select) {
392        return where(DSL.notExists(select));
393    }
394}