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