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.CurrencyPK;
008import com.echothree.model.data.accounting.common.pk.SymbolPositionPK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.accounting.SymbolPositions.SymbolPositionsPath;
011
012import java.util.Arrays;
013import java.util.Collection;
014import java.util.List;
015
016import org.jooq.Condition;
017import org.jooq.Converter;
018import org.jooq.Field;
019import org.jooq.ForeignKey;
020import org.jooq.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class Currencies extends TableImpl<com.echothree.model.jooq.server.records.accounting.Currencies> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of <code>currencies</code>
049     */
050    public static final Currencies Currencies = new Currencies();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.accounting.Currencies> getRecordType() {
057        return com.echothree.model.jooq.server.records.accounting.Currencies.class;
058    }
059
060    /**
061     * The column <code>currencies.cur_currencyid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, CurrencyPK> CURRENCY = createField(DSL.name("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()));
064
065    /**
066     * The column <code>currencies.cur_currencyisoname</code>.
067     */
068    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, String> CURRENCY_ISO_NAME = createField(DSL.name("cur_currencyisoname"), SQLDataType.VARCHAR(3).nullable(false), this, "");
069
070    /**
071     * The column <code>currencies.cur_symbol</code>.
072     */
073    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, String> SYMBOL = createField(DSL.name("cur_symbol"), SQLDataType.VARCHAR(20), this, "");
074
075    /**
076     * The column <code>currencies.cur_sympos_symbolpositionid</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, SymbolPositionPK> SYMBOL_POSITION = createField(DSL.name("cur_sympos_symbolpositionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SymbolPositionPK.class, id -> new com.echothree.model.data.accounting.common.pk.SymbolPositionPK(id), primaryKey -> primaryKey.getEntityId()));
079
080    /**
081     * The column <code>currencies.cur_symbolonliststart</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Boolean> SYMBOL_ON_LIST_START = createField(DSL.name("cur_symbolonliststart"), SQLDataType.BIT, this, "");
084
085    /**
086     * The column <code>currencies.cur_symbolonlistmember</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Boolean> SYMBOL_ON_LIST_MEMBER = createField(DSL.name("cur_symbolonlistmember"), SQLDataType.BIT, this, "");
089
090    /**
091     * The column <code>currencies.cur_symbolonsubtotal</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Boolean> SYMBOL_ON_SUBTOTAL = createField(DSL.name("cur_symbolonsubtotal"), SQLDataType.BIT, this, "");
094
095    /**
096     * The column <code>currencies.cur_symbolontotal</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Boolean> SYMBOL_ON_TOTAL = createField(DSL.name("cur_symbolontotal"), SQLDataType.BIT, this, "");
099
100    /**
101     * The column <code>currencies.cur_groupingseparator</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, String> GROUPING_SEPARATOR = createField(DSL.name("cur_groupingseparator"), SQLDataType.VARCHAR(1).nullable(false), this, "");
104
105    /**
106     * The column <code>currencies.cur_groupingsize</code>.
107     */
108    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> GROUPING_SIZE = createField(DSL.name("cur_groupingsize"), SQLDataType.INTEGER.nullable(false), this, "");
109
110    /**
111     * The column <code>currencies.cur_fractionseparator</code>.
112     */
113    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, String> FRACTION_SEPARATOR = createField(DSL.name("cur_fractionseparator"), SQLDataType.VARCHAR(1), this, "");
114
115    /**
116     * The column <code>currencies.cur_defaultfractiondigits</code>.
117     */
118    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> DEFAULT_FRACTION_DIGITS = createField(DSL.name("cur_defaultfractiondigits"), SQLDataType.INTEGER, this, "");
119
120    /**
121     * The column <code>currencies.cur_priceunitfractiondigits</code>.
122     */
123    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> PRICE_UNIT_FRACTION_DIGITS = createField(DSL.name("cur_priceunitfractiondigits"), SQLDataType.INTEGER, this, "");
124
125    /**
126     * The column <code>currencies.cur_pricelinefractiondigits</code>.
127     */
128    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> PRICE_LINE_FRACTION_DIGITS = createField(DSL.name("cur_pricelinefractiondigits"), SQLDataType.INTEGER, this, "");
129
130    /**
131     * The column <code>currencies.cur_costunitfractiondigits</code>.
132     */
133    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> COST_UNIT_FRACTION_DIGITS = createField(DSL.name("cur_costunitfractiondigits"), SQLDataType.INTEGER, this, "");
134
135    /**
136     * The column <code>currencies.cur_costlinefractiondigits</code>.
137     */
138    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> COST_LINE_FRACTION_DIGITS = createField(DSL.name("cur_costlinefractiondigits"), SQLDataType.INTEGER, this, "");
139
140    /**
141     * The column <code>currencies.cur_minussign</code>.
142     */
143    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, String> MINUS_SIGN = createField(DSL.name("cur_minussign"), SQLDataType.VARCHAR(1).nullable(false), this, "");
144
145    /**
146     * The column <code>currencies.cur_isdefault</code>.
147     */
148    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Boolean> IS_DEFAULT = createField(DSL.name("cur_isdefault"), SQLDataType.BIT.nullable(false), this, "");
149
150    /**
151     * The column <code>currencies.cur_sortorder</code>.
152     */
153    public final TableField<com.echothree.model.jooq.server.records.accounting.Currencies, Integer> SORT_ORDER = createField(DSL.name("cur_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
154
155    private Currencies(Name alias, Table<com.echothree.model.jooq.server.records.accounting.Currencies> aliased) {
156        this(alias, aliased, (Field<?>[]) null, null);
157    }
158
159    private Currencies(Name alias, Table<com.echothree.model.jooq.server.records.accounting.Currencies> aliased, Field<?>[] parameters, Condition where) {
160        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
161    }
162
163    /**
164     * Create an aliased <code>currencies</code> table reference
165     */
166    public Currencies(String alias) {
167        this(DSL.name(alias), Currencies);
168    }
169
170    /**
171     * Create an aliased <code>currencies</code> table reference
172     */
173    public Currencies(Name alias) {
174        this(alias, Currencies);
175    }
176
177    /**
178     * Create a <code>currencies</code> table reference
179     */
180    public Currencies() {
181        this(DSL.name("currencies"), null);
182    }
183
184    public <O extends Record> Currencies(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.accounting.Currencies> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.accounting.Currencies> parentPath) {
185        super(path, childPath, parentPath, Currencies);
186    }
187
188    /**
189     * A subtype implementing {@link Path} for simplified path-based joins.
190     */
191    public static class CurrenciesPath extends Currencies implements Path<com.echothree.model.jooq.server.records.accounting.Currencies> {
192
193        private static final long serialVersionUID = 1L;
194        public <O extends Record> CurrenciesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.accounting.Currencies> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.accounting.Currencies> parentPath) {
195            super(path, childPath, parentPath);
196        }
197        private CurrenciesPath(Name alias, Table<com.echothree.model.jooq.server.records.accounting.Currencies> aliased) {
198            super(alias, aliased);
199        }
200
201        @Override
202        public CurrenciesPath as(String alias) {
203            return new CurrenciesPath(DSL.name(alias), this);
204        }
205
206        @Override
207        public CurrenciesPath as(Name alias) {
208            return new CurrenciesPath(alias, this);
209        }
210
211        @Override
212        public CurrenciesPath as(Table<?> alias) {
213            return new CurrenciesPath(alias.getQualifiedName(), this);
214        }
215    }
216
217    @Override
218    public UniqueKey<com.echothree.model.jooq.server.records.accounting.Currencies> getPrimaryKey() {
219        return KeyRegistry.CURRENCIES_PK;
220    }
221
222    @Override
223    public List<UniqueKey<com.echothree.model.jooq.server.records.accounting.Currencies>> getUniqueKeys() {
224        return Arrays.asList(KeyRegistry.CURRENCIES_CURRENCY_ISO_NAME_UK);
225    }
226
227    @Override
228    public List<ForeignKey<com.echothree.model.jooq.server.records.accounting.Currencies, ?>> getReferences() {
229        return Arrays.asList(KeyRegistry.CURRENCIES_SYMBOL_POSITION_FK);
230    }
231
232    private transient SymbolPositionsPath _cur_sympos_symbolpositionid_fk;
233
234    /**
235     * Get the implicit join path to the <code>symbolpositions</code> table.
236     */
237    public SymbolPositionsPath cur_sympos_symbolpositionid_fk() {
238        if (_cur_sympos_symbolpositionid_fk == null)
239            _cur_sympos_symbolpositionid_fk = new SymbolPositionsPath(this, KeyRegistry.CURRENCIES_SYMBOL_POSITION_FK, null);
240
241        return _cur_sympos_symbolpositionid_fk;
242    }
243
244    @Override
245    public Currencies as(String alias) {
246        return new Currencies(DSL.name(alias), this);
247    }
248
249    @Override
250    public Currencies as(Name alias) {
251        return new Currencies(alias, this);
252    }
253
254    @Override
255    public Currencies as(Table<?> alias) {
256        return new Currencies(alias.getQualifiedName(), this);
257    }
258
259    /**
260     * Rename this table
261     */
262    @Override
263    public Currencies rename(String name) {
264        return new Currencies(DSL.name(name), null);
265    }
266
267    /**
268     * Rename this table
269     */
270    @Override
271    public Currencies rename(Name name) {
272        return new Currencies(name, null);
273    }
274
275    /**
276     * Rename this table
277     */
278    @Override
279    public Currencies rename(Table<?> name) {
280        return new Currencies(name.getQualifiedName(), null);
281    }
282
283    /**
284     * Create an inline derived table from this table
285     */
286    @Override
287    public Currencies where(Condition condition) {
288        return new Currencies(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
289    }
290
291    /**
292     * Create an inline derived table from this table
293     */
294    @Override
295    public Currencies where(Collection<? extends Condition> conditions) {
296        return where(DSL.and(conditions));
297    }
298
299    /**
300     * Create an inline derived table from this table
301     */
302    @Override
303    public Currencies where(Condition... conditions) {
304        return where(DSL.and(conditions));
305    }
306
307    /**
308     * Create an inline derived table from this table
309     */
310    @Override
311    public Currencies where(Field<Boolean> condition) {
312        return where(DSL.condition(condition));
313    }
314
315    /**
316     * Create an inline derived table from this table
317     */
318    @Override
319    @PlainSQL
320    public Currencies where(SQL condition) {
321        return where(DSL.condition(condition));
322    }
323
324    /**
325     * Create an inline derived table from this table
326     */
327    @Override
328    @PlainSQL
329    public Currencies where(@Stringly.SQL String condition) {
330        return where(DSL.condition(condition));
331    }
332
333    /**
334     * Create an inline derived table from this table
335     */
336    @Override
337    @PlainSQL
338    public Currencies where(@Stringly.SQL String condition, Object... binds) {
339        return where(DSL.condition(condition, binds));
340    }
341
342    /**
343     * Create an inline derived table from this table
344     */
345    @Override
346    @PlainSQL
347    public Currencies where(@Stringly.SQL String condition, QueryPart... parts) {
348        return where(DSL.condition(condition, parts));
349    }
350
351    /**
352     * Create an inline derived table from this table
353     */
354    @Override
355    public Currencies whereExists(TableLike<?> select) {
356        return where(DSL.exists(select));
357    }
358
359    /**
360     * Create an inline derived table from this table
361     */
362    @Override
363    public Currencies whereNotExists(TableLike<?> select) {
364        return where(DSL.notExists(select));
365    }
366}