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