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.GlAccountPK;
008import com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryDetailPK;
009import com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.accounting.GlAccounts.GlAccountsPath;
012import com.echothree.model.jooq.server.tables.accounting.ItemAccountingCategories.ItemAccountingCategoriesPath;
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.InverseForeignKey;
023import org.jooq.Name;
024import org.jooq.Path;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.Record;
028import org.jooq.SQL;
029import org.jooq.Stringly;
030import org.jooq.Table;
031import org.jooq.TableField;
032import org.jooq.TableLike;
033import org.jooq.TableOptions;
034import org.jooq.UniqueKey;
035import org.jooq.impl.DSL;
036import org.jooq.impl.Internal;
037import org.jooq.impl.SQLDataType;
038import org.jooq.impl.TableImpl;
039
040
041/**
042 * This class is generated by jOOQ.
043 */
044@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
045public class ItemAccountingCategoryDetails extends TableImpl<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>itemaccountingcategorydetails</code>
051     */
052    public static final ItemAccountingCategoryDetails ItemAccountingCategoryDetails = new ItemAccountingCategoryDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>itemaccountingcategorydetails.iactgcdt_itemaccountingcategorydetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, ItemAccountingCategoryDetailPK> ITEM_ACCOUNTING_CATEGORY_DETAIL = createField(DSL.name("iactgcdt_itemaccountingcategorydetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemAccountingCategoryDetailPK.class, id -> new com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>itemaccountingcategorydetails.iactgcdt_iactgc_itemaccountingcategoryid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, ItemAccountingCategoryPK> ITEM_ACCOUNTING_CATEGORY = createField(DSL.name("iactgcdt_iactgc_itemaccountingcategoryid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemAccountingCategoryPK.class, id -> new com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column
076     * <code>itemaccountingcategorydetails.iactgcdt_itemaccountingcategoryname</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, String> ITEM_ACCOUNTING_CATEGORY_NAME = createField(DSL.name("iactgcdt_itemaccountingcategoryname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
079
080    /**
081     * The column
082     * <code>itemaccountingcategorydetails.iactgcdt_parentitemaccountingcategoryid</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, ItemAccountingCategoryPK> PARENT_ITEM_ACCOUNTING_CATEGORY = createField(DSL.name("iactgcdt_parentitemaccountingcategoryid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ItemAccountingCategoryPK.class, id -> new com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryPK(id), primaryKey -> primaryKey.getEntityId()));
085
086    /**
087     * The column
088     * <code>itemaccountingcategorydetails.iactgcdt_inventoryglaccountid</code>.
089     */
090    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, GlAccountPK> INVENTORY_GL_ACCOUNT = createField(DSL.name("iactgcdt_inventoryglaccountid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId()));
091
092    /**
093     * The column
094     * <code>itemaccountingcategorydetails.iactgcdt_salesglaccountid</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, GlAccountPK> SALES_GL_ACCOUNT = createField(DSL.name("iactgcdt_salesglaccountid"), SQLDataType.BIGINT, 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
100     * <code>itemaccountingcategorydetails.iactgcdt_returnsglaccountid</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, GlAccountPK> RETURNS_GL_ACCOUNT = createField(DSL.name("iactgcdt_returnsglaccountid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId()));
103
104    /**
105     * The column
106     * <code>itemaccountingcategorydetails.iactgcdt_cogsglaccountid</code>.
107     */
108    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, GlAccountPK> COGS_GL_ACCOUNT = createField(DSL.name("iactgcdt_cogsglaccountid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId()));
109
110    /**
111     * The column
112     * <code>itemaccountingcategorydetails.iactgcdt_returnscogsglaccountid</code>.
113     */
114    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, GlAccountPK> RETURNS_COGS_GL_ACCOUNT = createField(DSL.name("iactgcdt_returnscogsglaccountid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId()));
115
116    /**
117     * The column <code>itemaccountingcategorydetails.iactgcdt_isdefault</code>.
118     */
119    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, Boolean> IS_DEFAULT = createField(DSL.name("iactgcdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
120
121    /**
122     * The column <code>itemaccountingcategorydetails.iactgcdt_sortorder</code>.
123     */
124    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, Integer> SORT_ORDER = createField(DSL.name("iactgcdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
125
126    /**
127     * The column <code>itemaccountingcategorydetails.iactgcdt_fromtime</code>.
128     */
129    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, Long> FROM_TIME = createField(DSL.name("iactgcdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
130
131    /**
132     * The column <code>itemaccountingcategorydetails.iactgcdt_thrutime</code>.
133     */
134    public final TableField<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, Long> THRU_TIME = createField(DSL.name("iactgcdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
135
136    private ItemAccountingCategoryDetails(Name alias, Table<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> aliased) {
137        this(alias, aliased, (Field<?>[]) null, null);
138    }
139
140    private ItemAccountingCategoryDetails(Name alias, Table<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> aliased, Field<?>[] parameters, Condition where) {
141        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
142    }
143
144    /**
145     * Create an aliased <code>itemaccountingcategorydetails</code> table
146     * reference
147     */
148    public ItemAccountingCategoryDetails(String alias) {
149        this(DSL.name(alias), ItemAccountingCategoryDetails);
150    }
151
152    /**
153     * Create an aliased <code>itemaccountingcategorydetails</code> table
154     * reference
155     */
156    public ItemAccountingCategoryDetails(Name alias) {
157        this(alias, ItemAccountingCategoryDetails);
158    }
159
160    /**
161     * Create a <code>itemaccountingcategorydetails</code> table reference
162     */
163    public ItemAccountingCategoryDetails() {
164        this(DSL.name("itemaccountingcategorydetails"), null);
165    }
166
167    public <O extends Record> ItemAccountingCategoryDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> parentPath) {
168        super(path, childPath, parentPath, ItemAccountingCategoryDetails);
169    }
170
171    /**
172     * A subtype implementing {@link Path} for simplified path-based joins.
173     */
174    public static class ItemAccountingCategoryDetailsPath extends ItemAccountingCategoryDetails implements Path<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> {
175
176        private static final long serialVersionUID = 1L;
177        public <O extends Record> ItemAccountingCategoryDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> parentPath) {
178            super(path, childPath, parentPath);
179        }
180        private ItemAccountingCategoryDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> aliased) {
181            super(alias, aliased);
182        }
183
184        @Override
185        public ItemAccountingCategoryDetailsPath as(String alias) {
186            return new ItemAccountingCategoryDetailsPath(DSL.name(alias), this);
187        }
188
189        @Override
190        public ItemAccountingCategoryDetailsPath as(Name alias) {
191            return new ItemAccountingCategoryDetailsPath(alias, this);
192        }
193
194        @Override
195        public ItemAccountingCategoryDetailsPath as(Table<?> alias) {
196            return new ItemAccountingCategoryDetailsPath(alias.getQualifiedName(), this);
197        }
198    }
199
200    @Override
201    public UniqueKey<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails> getPrimaryKey() {
202        return KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_PK;
203    }
204
205    @Override
206    public List<UniqueKey<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails>> getUniqueKeys() {
207        return Arrays.asList(KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_ITEM_ACCOUNTING_CATEGORY_AND_THRU_TIME_UK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_ITEM_ACCOUNTING_CATEGORY_NAME_AND_THRU_TIME_UK);
208    }
209
210    @Override
211    public List<ForeignKey<com.echothree.model.jooq.server.records.accounting.ItemAccountingCategoryDetails, ?>> getReferences() {
212        return Arrays.asList(KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_COGS_GL_ACCOUNT_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_ITEM_ACCOUNTING_CATEGORY_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_INVENTORY_GL_ACCOUNT_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_PARENT_ITEM_ACCOUNTING_CATEGORY_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_RETURNS_COGS_GL_ACCOUNT_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_RETURNS_GL_ACCOUNT_FK, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_SALES_GL_ACCOUNT_FK);
213    }
214
215    private transient GlAccountsPath _iactgcdt_cogsglaccountid_fk;
216
217    /**
218     * Get the implicit join path to the <code>glaccounts</code> table, via the
219     * <code>iactgcdt_cogsglaccountid_fk</code> key.
220     */
221    public GlAccountsPath iactgcdt_cogsglaccountid_fk() {
222        if (_iactgcdt_cogsglaccountid_fk == null)
223            _iactgcdt_cogsglaccountid_fk = new GlAccountsPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_COGS_GL_ACCOUNT_FK, null);
224
225        return _iactgcdt_cogsglaccountid_fk;
226    }
227
228    private transient ItemAccountingCategoriesPath _iactgcdt_iactgc_itemaccountingcategoryid_fk;
229
230    /**
231     * Get the implicit join path to the <code>itemaccountingcategories</code>
232     * table, via the <code>iactgcdt_iactgc_itemaccountingcategoryid_fk</code>
233     * key.
234     */
235    public ItemAccountingCategoriesPath iactgcdt_iactgc_itemaccountingcategoryid_fk() {
236        if (_iactgcdt_iactgc_itemaccountingcategoryid_fk == null)
237            _iactgcdt_iactgc_itemaccountingcategoryid_fk = new ItemAccountingCategoriesPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_ITEM_ACCOUNTING_CATEGORY_FK, null);
238
239        return _iactgcdt_iactgc_itemaccountingcategoryid_fk;
240    }
241
242    private transient GlAccountsPath _iactgcdt_inventoryglaccountid_fk;
243
244    /**
245     * Get the implicit join path to the <code>glaccounts</code> table, via the
246     * <code>iactgcdt_inventoryglaccountid_fk</code> key.
247     */
248    public GlAccountsPath iactgcdt_inventoryglaccountid_fk() {
249        if (_iactgcdt_inventoryglaccountid_fk == null)
250            _iactgcdt_inventoryglaccountid_fk = new GlAccountsPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_INVENTORY_GL_ACCOUNT_FK, null);
251
252        return _iactgcdt_inventoryglaccountid_fk;
253    }
254
255    private transient ItemAccountingCategoriesPath _iactgcdt_parentitemaccountingcategoryid_fk;
256
257    /**
258     * Get the implicit join path to the <code>itemaccountingcategories</code>
259     * table, via the <code>iactgcdt_parentitemaccountingcategoryid_fk</code>
260     * key.
261     */
262    public ItemAccountingCategoriesPath iactgcdt_parentitemaccountingcategoryid_fk() {
263        if (_iactgcdt_parentitemaccountingcategoryid_fk == null)
264            _iactgcdt_parentitemaccountingcategoryid_fk = new ItemAccountingCategoriesPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_PARENT_ITEM_ACCOUNTING_CATEGORY_FK, null);
265
266        return _iactgcdt_parentitemaccountingcategoryid_fk;
267    }
268
269    private transient GlAccountsPath _iactgcdt_returnscogsglaccountid_fk;
270
271    /**
272     * Get the implicit join path to the <code>glaccounts</code> table, via the
273     * <code>iactgcdt_returnscogsglaccountid_fk</code> key.
274     */
275    public GlAccountsPath iactgcdt_returnscogsglaccountid_fk() {
276        if (_iactgcdt_returnscogsglaccountid_fk == null)
277            _iactgcdt_returnscogsglaccountid_fk = new GlAccountsPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_RETURNS_COGS_GL_ACCOUNT_FK, null);
278
279        return _iactgcdt_returnscogsglaccountid_fk;
280    }
281
282    private transient GlAccountsPath _iactgcdt_returnsglaccountid_fk;
283
284    /**
285     * Get the implicit join path to the <code>glaccounts</code> table, via the
286     * <code>iactgcdt_returnsglaccountid_fk</code> key.
287     */
288    public GlAccountsPath iactgcdt_returnsglaccountid_fk() {
289        if (_iactgcdt_returnsglaccountid_fk == null)
290            _iactgcdt_returnsglaccountid_fk = new GlAccountsPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_RETURNS_GL_ACCOUNT_FK, null);
291
292        return _iactgcdt_returnsglaccountid_fk;
293    }
294
295    private transient GlAccountsPath _iactgcdt_salesglaccountid_fk;
296
297    /**
298     * Get the implicit join path to the <code>glaccounts</code> table, via the
299     * <code>iactgcdt_salesglaccountid_fk</code> key.
300     */
301    public GlAccountsPath iactgcdt_salesglaccountid_fk() {
302        if (_iactgcdt_salesglaccountid_fk == null)
303            _iactgcdt_salesglaccountid_fk = new GlAccountsPath(this, KeyRegistry.ITEM_ACCOUNTING_CATEGORY_DETAILS_SALES_GL_ACCOUNT_FK, null);
304
305        return _iactgcdt_salesglaccountid_fk;
306    }
307
308    @Override
309    public ItemAccountingCategoryDetails as(String alias) {
310        return new ItemAccountingCategoryDetails(DSL.name(alias), this);
311    }
312
313    @Override
314    public ItemAccountingCategoryDetails as(Name alias) {
315        return new ItemAccountingCategoryDetails(alias, this);
316    }
317
318    @Override
319    public ItemAccountingCategoryDetails as(Table<?> alias) {
320        return new ItemAccountingCategoryDetails(alias.getQualifiedName(), this);
321    }
322
323    /**
324     * Rename this table
325     */
326    @Override
327    public ItemAccountingCategoryDetails rename(String name) {
328        return new ItemAccountingCategoryDetails(DSL.name(name), null);
329    }
330
331    /**
332     * Rename this table
333     */
334    @Override
335    public ItemAccountingCategoryDetails rename(Name name) {
336        return new ItemAccountingCategoryDetails(name, null);
337    }
338
339    /**
340     * Rename this table
341     */
342    @Override
343    public ItemAccountingCategoryDetails rename(Table<?> name) {
344        return new ItemAccountingCategoryDetails(name.getQualifiedName(), null);
345    }
346
347    /**
348     * Create an inline derived table from this table
349     */
350    @Override
351    public ItemAccountingCategoryDetails where(Condition condition) {
352        return new ItemAccountingCategoryDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
353    }
354
355    /**
356     * Create an inline derived table from this table
357     */
358    @Override
359    public ItemAccountingCategoryDetails where(Collection<? extends Condition> conditions) {
360        return where(DSL.and(conditions));
361    }
362
363    /**
364     * Create an inline derived table from this table
365     */
366    @Override
367    public ItemAccountingCategoryDetails where(Condition... conditions) {
368        return where(DSL.and(conditions));
369    }
370
371    /**
372     * Create an inline derived table from this table
373     */
374    @Override
375    public ItemAccountingCategoryDetails where(Field<Boolean> condition) {
376        return where(DSL.condition(condition));
377    }
378
379    /**
380     * Create an inline derived table from this table
381     */
382    @Override
383    @PlainSQL
384    public ItemAccountingCategoryDetails where(SQL condition) {
385        return where(DSL.condition(condition));
386    }
387
388    /**
389     * Create an inline derived table from this table
390     */
391    @Override
392    @PlainSQL
393    public ItemAccountingCategoryDetails where(@Stringly.SQL String condition) {
394        return where(DSL.condition(condition));
395    }
396
397    /**
398     * Create an inline derived table from this table
399     */
400    @Override
401    @PlainSQL
402    public ItemAccountingCategoryDetails where(@Stringly.SQL String condition, Object... binds) {
403        return where(DSL.condition(condition, binds));
404    }
405
406    /**
407     * Create an inline derived table from this table
408     */
409    @Override
410    @PlainSQL
411    public ItemAccountingCategoryDetails where(@Stringly.SQL String condition, QueryPart... parts) {
412        return where(DSL.condition(condition, parts));
413    }
414
415    /**
416     * Create an inline derived table from this table
417     */
418    @Override
419    public ItemAccountingCategoryDetails whereExists(TableLike<?> select) {
420        return where(DSL.exists(select));
421    }
422
423    /**
424     * Create an inline derived table from this table
425     */
426    @Override
427    public ItemAccountingCategoryDetails whereNotExists(TableLike<?> select) {
428        return where(DSL.notExists(select));
429    }
430}