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