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.GlAccountPK;
009import com.echothree.model.data.accounting.common.pk.TransactionGlAccountCategoryPK;
010import com.echothree.model.data.accounting.common.pk.TransactionGlEntryPK;
011import com.echothree.model.data.accounting.common.pk.TransactionPK;
012import com.echothree.model.data.party.common.pk.PartyPK;
013import com.echothree.model.jooq.server.KeyRegistry;
014import com.echothree.model.jooq.server.tables.accounting.Currencies.CurrenciesPath;
015import com.echothree.model.jooq.server.tables.accounting.GlAccounts.GlAccountsPath;
016import com.echothree.model.jooq.server.tables.accounting.TransactionGlAccountCategories.TransactionGlAccountCategoriesPath;
017import com.echothree.model.jooq.server.tables.accounting.Transactions.TransactionsPath;
018import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
019
020import java.util.Arrays;
021import java.util.Collection;
022import java.util.List;
023
024import org.jooq.Condition;
025import org.jooq.Converter;
026import org.jooq.Field;
027import org.jooq.ForeignKey;
028import org.jooq.Name;
029import org.jooq.PlainSQL;
030import org.jooq.QueryPart;
031import org.jooq.SQL;
032import org.jooq.Stringly;
033import org.jooq.Table;
034import org.jooq.TableField;
035import org.jooq.TableLike;
036import org.jooq.TableOptions;
037import org.jooq.UniqueKey;
038import org.jooq.impl.DSL;
039import org.jooq.impl.Internal;
040import org.jooq.impl.SQLDataType;
041import org.jooq.impl.TableImpl;
042
043
044/**
045 * This class is generated by jOOQ.
046 */
047@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
048public class TransactionGlEntries extends TableImpl<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries> {
049
050    private static final long serialVersionUID = 1L;
051
052    /**
053     * The reference instance of <code>transactionglentries</code>
054     */
055    public static final TransactionGlEntries TransactionGlEntries = new TransactionGlEntries();
056
057    /**
058     * The class holding records for this type
059     */
060    @Override
061    public Class<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries> getRecordType() {
062        return com.echothree.model.jooq.server.records.accounting.TransactionGlEntries.class;
063    }
064
065    /**
066     * The column
067     * <code>transactionglentries.trxglent_transactionglentryid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, TransactionGlEntryPK> TRANSACTION_GL_ENTRY = createField(DSL.name("trxglent_transactionglentryid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TransactionGlEntryPK.class, id -> new com.echothree.model.data.accounting.common.pk.TransactionGlEntryPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column <code>transactionglentries.trxglent_trx_transactionid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, TransactionPK> TRANSACTION = createField(DSL.name("trxglent_trx_transactionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TransactionPK.class, id -> new com.echothree.model.data.accounting.common.pk.TransactionPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column
078     * <code>transactionglentries.trxglent_transactionglentrysequence</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Integer> TRANSACTION_GL_ENTRY_SEQUENCE = createField(DSL.name("trxglent_transactionglentrysequence"), SQLDataType.INTEGER.nullable(false), this, "");
081
082    /**
083     * The column <code>transactionglentries.trxglent_grouppartyid</code>.
084     */
085    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, PartyPK> GROUP_PARTY = createField(DSL.name("trxglent_grouppartyid"), 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()));
086
087    /**
088     * The column
089     * <code>transactionglentries.trxglent_trxglac_transactionglaccountcategoryid</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, TransactionGlAccountCategoryPK> TRANSACTION_GL_ACCOUNT_CATEGORY = createField(DSL.name("trxglent_trxglac_transactionglaccountcategoryid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, TransactionGlAccountCategoryPK.class, id -> new com.echothree.model.data.accounting.common.pk.TransactionGlAccountCategoryPK(id), primaryKey -> primaryKey.getEntityId()));
092
093    /**
094     * The column <code>transactionglentries.trxglent_gla_glaccountid</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, GlAccountPK> GL_ACCOUNT = createField(DSL.name("trxglent_gla_glaccountid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId()));
097
098    /**
099     * The column <code>transactionglentries.trxglent_originalcurrencyid</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, CurrencyPK> ORIGINAL_CURRENCY = createField(DSL.name("trxglent_originalcurrencyid"), 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()));
102
103    /**
104     * The column <code>transactionglentries.trxglent_originaldebit</code>.
105     */
106    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> ORIGINAL_DEBIT = createField(DSL.name("trxglent_originaldebit"), SQLDataType.BIGINT, this, "");
107
108    /**
109     * The column <code>transactionglentries.trxglent_originalcredit</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> ORIGINAL_CREDIT = createField(DSL.name("trxglent_originalcredit"), SQLDataType.BIGINT, this, "");
112
113    /**
114     * The column <code>transactionglentries.trxglent_debit</code>.
115     */
116    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> DEBIT = createField(DSL.name("trxglent_debit"), SQLDataType.BIGINT, this, "");
117
118    /**
119     * The column <code>transactionglentries.trxglent_credit</code>.
120     */
121    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> CREDIT = createField(DSL.name("trxglent_credit"), SQLDataType.BIGINT, this, "");
122
123    /**
124     * The column <code>transactionglentries.trxglent_fromtime</code>.
125     */
126    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> FROM_TIME = createField(DSL.name("trxglent_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
127
128    /**
129     * The column <code>transactionglentries.trxglent_thrutime</code>.
130     */
131    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, Long> THRU_TIME = createField(DSL.name("trxglent_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
132
133    private TransactionGlEntries(Name alias, Table<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries> aliased) {
134        this(alias, aliased, (Field<?>[]) null, null);
135    }
136
137    private TransactionGlEntries(Name alias, Table<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries> aliased, Field<?>[] parameters, Condition where) {
138        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
139    }
140
141    /**
142     * Create an aliased <code>transactionglentries</code> table reference
143     */
144    public TransactionGlEntries(String alias) {
145        this(DSL.name(alias), TransactionGlEntries);
146    }
147
148    /**
149     * Create an aliased <code>transactionglentries</code> table reference
150     */
151    public TransactionGlEntries(Name alias) {
152        this(alias, TransactionGlEntries);
153    }
154
155    /**
156     * Create a <code>transactionglentries</code> table reference
157     */
158    public TransactionGlEntries() {
159        this(DSL.name("transactionglentries"), null);
160    }
161
162    @Override
163    public UniqueKey<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries> getPrimaryKey() {
164        return KeyRegistry.TRANSACTION_GL_ENTRIES_PK;
165    }
166
167    @Override
168    public List<UniqueKey<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries>> getUniqueKeys() {
169        return Arrays.asList(KeyRegistry.TRANSACTION_GL_ENTRIES_TRANSACTION_AND_TRANSACTION_GL_ENTRY_SEQUENCE_AND_THRU_TIME_UK);
170    }
171
172    @Override
173    public List<ForeignKey<com.echothree.model.jooq.server.records.accounting.TransactionGlEntries, ?>> getReferences() {
174        return Arrays.asList(KeyRegistry.TRANSACTION_GL_ENTRIES_GL_ACCOUNT_FK, KeyRegistry.TRANSACTION_GL_ENTRIES_GROUP_PARTY_FK, KeyRegistry.TRANSACTION_GL_ENTRIES_ORIGINAL_CURRENCY_FK, KeyRegistry.TRANSACTION_GL_ENTRIES_TRANSACTION_FK, KeyRegistry.TRANSACTION_GL_ENTRIES_TRANSACTION_GL_ACCOUNT_CATEGORY_FK);
175    }
176
177    private transient GlAccountsPath _trxglent_gla_glaccountid_fk;
178
179    /**
180     * Get the implicit join path to the <code>glaccounts</code> table.
181     */
182    public GlAccountsPath trxglent_gla_glaccountid_fk() {
183        if (_trxglent_gla_glaccountid_fk == null)
184            _trxglent_gla_glaccountid_fk = new GlAccountsPath(this, KeyRegistry.TRANSACTION_GL_ENTRIES_GL_ACCOUNT_FK, null);
185
186        return _trxglent_gla_glaccountid_fk;
187    }
188
189    private transient PartiesPath _trxglent_grouppartyid_fk;
190
191    /**
192     * Get the implicit join path to the <code>parties</code> table.
193     */
194    public PartiesPath trxglent_grouppartyid_fk() {
195        if (_trxglent_grouppartyid_fk == null)
196            _trxglent_grouppartyid_fk = new PartiesPath(this, KeyRegistry.TRANSACTION_GL_ENTRIES_GROUP_PARTY_FK, null);
197
198        return _trxglent_grouppartyid_fk;
199    }
200
201    private transient CurrenciesPath _trxglent_originalcurrencyid_fk;
202
203    /**
204     * Get the implicit join path to the <code>currencies</code> table.
205     */
206    public CurrenciesPath trxglent_originalcurrencyid_fk() {
207        if (_trxglent_originalcurrencyid_fk == null)
208            _trxglent_originalcurrencyid_fk = new CurrenciesPath(this, KeyRegistry.TRANSACTION_GL_ENTRIES_ORIGINAL_CURRENCY_FK, null);
209
210        return _trxglent_originalcurrencyid_fk;
211    }
212
213    private transient TransactionsPath _trxglent_trx_transactionid_fk;
214
215    /**
216     * Get the implicit join path to the <code>transactions</code> table.
217     */
218    public TransactionsPath trxglent_trx_transactionid_fk() {
219        if (_trxglent_trx_transactionid_fk == null)
220            _trxglent_trx_transactionid_fk = new TransactionsPath(this, KeyRegistry.TRANSACTION_GL_ENTRIES_TRANSACTION_FK, null);
221
222        return _trxglent_trx_transactionid_fk;
223    }
224
225    private transient TransactionGlAccountCategoriesPath _trxglent_trxglac_transactionglaccountcategoryid_fk;
226
227    /**
228     * Get the implicit join path to the
229     * <code>transactionglaccountcategories</code> table.
230     */
231    public TransactionGlAccountCategoriesPath trxglent_trxglac_transactionglaccountcategoryid_fk() {
232        if (_trxglent_trxglac_transactionglaccountcategoryid_fk == null)
233            _trxglent_trxglac_transactionglaccountcategoryid_fk = new TransactionGlAccountCategoriesPath(this, KeyRegistry.TRANSACTION_GL_ENTRIES_TRANSACTION_GL_ACCOUNT_CATEGORY_FK, null);
234
235        return _trxglent_trxglac_transactionglaccountcategoryid_fk;
236    }
237
238    @Override
239    public TransactionGlEntries as(String alias) {
240        return new TransactionGlEntries(DSL.name(alias), this);
241    }
242
243    @Override
244    public TransactionGlEntries as(Name alias) {
245        return new TransactionGlEntries(alias, this);
246    }
247
248    @Override
249    public TransactionGlEntries as(Table<?> alias) {
250        return new TransactionGlEntries(alias.getQualifiedName(), this);
251    }
252
253    /**
254     * Rename this table
255     */
256    @Override
257    public TransactionGlEntries rename(String name) {
258        return new TransactionGlEntries(DSL.name(name), null);
259    }
260
261    /**
262     * Rename this table
263     */
264    @Override
265    public TransactionGlEntries rename(Name name) {
266        return new TransactionGlEntries(name, null);
267    }
268
269    /**
270     * Rename this table
271     */
272    @Override
273    public TransactionGlEntries rename(Table<?> name) {
274        return new TransactionGlEntries(name.getQualifiedName(), null);
275    }
276
277    /**
278     * Create an inline derived table from this table
279     */
280    @Override
281    public TransactionGlEntries where(Condition condition) {
282        return new TransactionGlEntries(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
283    }
284
285    /**
286     * Create an inline derived table from this table
287     */
288    @Override
289    public TransactionGlEntries where(Collection<? extends Condition> conditions) {
290        return where(DSL.and(conditions));
291    }
292
293    /**
294     * Create an inline derived table from this table
295     */
296    @Override
297    public TransactionGlEntries where(Condition... conditions) {
298        return where(DSL.and(conditions));
299    }
300
301    /**
302     * Create an inline derived table from this table
303     */
304    @Override
305    public TransactionGlEntries where(Field<Boolean> condition) {
306        return where(DSL.condition(condition));
307    }
308
309    /**
310     * Create an inline derived table from this table
311     */
312    @Override
313    @PlainSQL
314    public TransactionGlEntries where(SQL condition) {
315        return where(DSL.condition(condition));
316    }
317
318    /**
319     * Create an inline derived table from this table
320     */
321    @Override
322    @PlainSQL
323    public TransactionGlEntries where(@Stringly.SQL String condition) {
324        return where(DSL.condition(condition));
325    }
326
327    /**
328     * Create an inline derived table from this table
329     */
330    @Override
331    @PlainSQL
332    public TransactionGlEntries where(@Stringly.SQL String condition, Object... binds) {
333        return where(DSL.condition(condition, binds));
334    }
335
336    /**
337     * Create an inline derived table from this table
338     */
339    @Override
340    @PlainSQL
341    public TransactionGlEntries where(@Stringly.SQL String condition, QueryPart... parts) {
342        return where(DSL.condition(condition, parts));
343    }
344
345    /**
346     * Create an inline derived table from this table
347     */
348    @Override
349    public TransactionGlEntries whereExists(TableLike<?> select) {
350        return where(DSL.exists(select));
351    }
352
353    /**
354     * Create an inline derived table from this table
355     */
356    @Override
357    public TransactionGlEntries whereNotExists(TableLike<?> select) {
358        return where(DSL.notExists(select));
359    }
360}