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