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.InventoryCostingMethodPK;
008import com.echothree.model.data.inventory.common.pk.PartyInventoryCostingMethodPK;
009import com.echothree.model.data.party.common.pk.PartyPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.inventory.InventoryCostingMethods.InventoryCostingMethodsPath;
012import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
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 PartyInventoryCostingMethods extends TableImpl<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>partyinventorycostingmethods</code>
048     */
049    public static final PartyInventoryCostingMethods PartyInventoryCostingMethods = new PartyInventoryCostingMethods();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods> getRecordType() {
056        return com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods.class;
057    }
058
059    /**
060     * The column
061     * <code>partyinventorycostingmethods.parinvcm_partyinventorycostingmethodid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, PartyInventoryCostingMethodPK> PARTY_INVENTORY_COSTING_METHOD = createField(DSL.name("parinvcm_partyinventorycostingmethodid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyInventoryCostingMethodPK.class, id -> new com.echothree.model.data.inventory.common.pk.PartyInventoryCostingMethodPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>partyinventorycostingmethods.parinvcm_par_partyid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, PartyPK> PARTY = createField(DSL.name("parinvcm_par_partyid"), 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()));
070
071    /**
072     * The column
073     * <code>partyinventorycostingmethods.parinvcm_invcm_inventorycostingmethodid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, InventoryCostingMethodPK> INVENTORY_COSTING_METHOD = createField(DSL.name("parinvcm_invcm_inventorycostingmethodid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryCostingMethodPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryCostingMethodPK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column <code>partyinventorycostingmethods.parinvcm_fromtime</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, Long> FROM_TIME = createField(DSL.name("parinvcm_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
081
082    /**
083     * The column <code>partyinventorycostingmethods.parinvcm_thrutime</code>.
084     */
085    public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, Long> THRU_TIME = createField(DSL.name("parinvcm_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
086
087    private PartyInventoryCostingMethods(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods> aliased) {
088        this(alias, aliased, (Field<?>[]) null, null);
089    }
090
091    private PartyInventoryCostingMethods(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods> aliased, Field<?>[] parameters, Condition where) {
092        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
093    }
094
095    /**
096     * Create an aliased <code>partyinventorycostingmethods</code> table
097     * reference
098     */
099    public PartyInventoryCostingMethods(String alias) {
100        this(DSL.name(alias), PartyInventoryCostingMethods);
101    }
102
103    /**
104     * Create an aliased <code>partyinventorycostingmethods</code> table
105     * reference
106     */
107    public PartyInventoryCostingMethods(Name alias) {
108        this(alias, PartyInventoryCostingMethods);
109    }
110
111    /**
112     * Create a <code>partyinventorycostingmethods</code> table reference
113     */
114    public PartyInventoryCostingMethods() {
115        this(DSL.name("partyinventorycostingmethods"), null);
116    }
117
118    @Override
119    public UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods> getPrimaryKey() {
120        return KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_PK;
121    }
122
123    @Override
124    public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods>> getUniqueKeys() {
125        return Arrays.asList(KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_PARTY_AND_INVENTORY_COSTING_METHOD_AND_THRU_TIME_UK, KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_PARTY_AND_THRU_TIME_UK);
126    }
127
128    @Override
129    public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryCostingMethods, ?>> getReferences() {
130        return Arrays.asList(KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_INVENTORY_COSTING_METHOD_FK, KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_PARTY_FK);
131    }
132
133    private transient InventoryCostingMethodsPath _parinvcm_invcm_inventorycostingmethodid_fk;
134
135    /**
136     * Get the implicit join path to the <code>inventorycostingmethods</code>
137     * table.
138     */
139    public InventoryCostingMethodsPath parinvcm_invcm_inventorycostingmethodid_fk() {
140        if (_parinvcm_invcm_inventorycostingmethodid_fk == null)
141            _parinvcm_invcm_inventorycostingmethodid_fk = new InventoryCostingMethodsPath(this, KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_INVENTORY_COSTING_METHOD_FK, null);
142
143        return _parinvcm_invcm_inventorycostingmethodid_fk;
144    }
145
146    private transient PartiesPath _parinvcm_par_partyid_fk;
147
148    /**
149     * Get the implicit join path to the <code>parties</code> table.
150     */
151    public PartiesPath parinvcm_par_partyid_fk() {
152        if (_parinvcm_par_partyid_fk == null)
153            _parinvcm_par_partyid_fk = new PartiesPath(this, KeyRegistry.PARTY_INVENTORY_COSTING_METHODS_PARTY_FK, null);
154
155        return _parinvcm_par_partyid_fk;
156    }
157
158    @Override
159    public PartyInventoryCostingMethods as(String alias) {
160        return new PartyInventoryCostingMethods(DSL.name(alias), this);
161    }
162
163    @Override
164    public PartyInventoryCostingMethods as(Name alias) {
165        return new PartyInventoryCostingMethods(alias, this);
166    }
167
168    @Override
169    public PartyInventoryCostingMethods as(Table<?> alias) {
170        return new PartyInventoryCostingMethods(alias.getQualifiedName(), this);
171    }
172
173    /**
174     * Rename this table
175     */
176    @Override
177    public PartyInventoryCostingMethods rename(String name) {
178        return new PartyInventoryCostingMethods(DSL.name(name), null);
179    }
180
181    /**
182     * Rename this table
183     */
184    @Override
185    public PartyInventoryCostingMethods rename(Name name) {
186        return new PartyInventoryCostingMethods(name, null);
187    }
188
189    /**
190     * Rename this table
191     */
192    @Override
193    public PartyInventoryCostingMethods rename(Table<?> name) {
194        return new PartyInventoryCostingMethods(name.getQualifiedName(), null);
195    }
196
197    /**
198     * Create an inline derived table from this table
199     */
200    @Override
201    public PartyInventoryCostingMethods where(Condition condition) {
202        return new PartyInventoryCostingMethods(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
203    }
204
205    /**
206     * Create an inline derived table from this table
207     */
208    @Override
209    public PartyInventoryCostingMethods where(Collection<? extends Condition> conditions) {
210        return where(DSL.and(conditions));
211    }
212
213    /**
214     * Create an inline derived table from this table
215     */
216    @Override
217    public PartyInventoryCostingMethods where(Condition... conditions) {
218        return where(DSL.and(conditions));
219    }
220
221    /**
222     * Create an inline derived table from this table
223     */
224    @Override
225    public PartyInventoryCostingMethods where(Field<Boolean> condition) {
226        return where(DSL.condition(condition));
227    }
228
229    /**
230     * Create an inline derived table from this table
231     */
232    @Override
233    @PlainSQL
234    public PartyInventoryCostingMethods where(SQL condition) {
235        return where(DSL.condition(condition));
236    }
237
238    /**
239     * Create an inline derived table from this table
240     */
241    @Override
242    @PlainSQL
243    public PartyInventoryCostingMethods where(@Stringly.SQL String condition) {
244        return where(DSL.condition(condition));
245    }
246
247    /**
248     * Create an inline derived table from this table
249     */
250    @Override
251    @PlainSQL
252    public PartyInventoryCostingMethods where(@Stringly.SQL String condition, Object... binds) {
253        return where(DSL.condition(condition, binds));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    @PlainSQL
261    public PartyInventoryCostingMethods where(@Stringly.SQL String condition, QueryPart... parts) {
262        return where(DSL.condition(condition, parts));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    public PartyInventoryCostingMethods whereExists(TableLike<?> select) {
270        return where(DSL.exists(select));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    public PartyInventoryCostingMethods whereNotExists(TableLike<?> select) {
278        return where(DSL.notExists(select));
279    }
280}