001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.payment;
005
006
007import com.echothree.model.data.accounting.common.pk.CurrencyPK;
008import com.echothree.model.data.payment.common.pk.BillingAccountDetailPK;
009import com.echothree.model.data.payment.common.pk.BillingAccountPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.accounting.Currencies.CurrenciesPath;
012import com.echothree.model.jooq.server.tables.payment.BillingAccounts.BillingAccountsPath;
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 BillingAccountDetails extends TableImpl<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>billingaccountdetails</code>
051     */
052    public static final BillingAccountDetails BillingAccountDetails = new BillingAccountDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.payment.BillingAccountDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>billingaccountdetails.bllactdt_billingaccountdetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, BillingAccountDetailPK> BILLING_ACCOUNT_DETAIL = createField(DSL.name("bllactdt_billingaccountdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, BillingAccountDetailPK.class, id -> new com.echothree.model.data.payment.common.pk.BillingAccountDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>billingaccountdetails.bllactdt_bllact_billingaccountid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, BillingAccountPK> BILLING_ACCOUNT = createField(DSL.name("bllactdt_bllact_billingaccountid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, BillingAccountPK.class, id -> new com.echothree.model.data.payment.common.pk.BillingAccountPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column
076     * <code>billingaccountdetails.bllactdt_billingaccountname</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, String> BILLING_ACCOUNT_NAME = createField(DSL.name("bllactdt_billingaccountname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
079
080    /**
081     * The column <code>billingaccountdetails.bllactdt_cur_currencyid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, CurrencyPK> CURRENCY = createField(DSL.name("bllactdt_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()));
084
085    /**
086     * The column <code>billingaccountdetails.bllactdt_reference</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, String> REFERENCE = createField(DSL.name("bllactdt_reference"), SQLDataType.VARCHAR(40), this, "");
089
090    /**
091     * The column <code>billingaccountdetails.bllactdt_description</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, String> DESCRIPTION = createField(DSL.name("bllactdt_description"), SQLDataType.VARCHAR(132), this, "");
094
095    /**
096     * The column <code>billingaccountdetails.bllactdt_fromtime</code>.
097     */
098    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, Long> FROM_TIME = createField(DSL.name("bllactdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
099
100    /**
101     * The column <code>billingaccountdetails.bllactdt_thrutime</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, Long> THRU_TIME = createField(DSL.name("bllactdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
104
105    private BillingAccountDetails(Name alias, Table<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> aliased) {
106        this(alias, aliased, (Field<?>[]) null, null);
107    }
108
109    private BillingAccountDetails(Name alias, Table<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> aliased, Field<?>[] parameters, Condition where) {
110        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
111    }
112
113    /**
114     * Create an aliased <code>billingaccountdetails</code> table reference
115     */
116    public BillingAccountDetails(String alias) {
117        this(DSL.name(alias), BillingAccountDetails);
118    }
119
120    /**
121     * Create an aliased <code>billingaccountdetails</code> table reference
122     */
123    public BillingAccountDetails(Name alias) {
124        this(alias, BillingAccountDetails);
125    }
126
127    /**
128     * Create a <code>billingaccountdetails</code> table reference
129     */
130    public BillingAccountDetails() {
131        this(DSL.name("billingaccountdetails"), null);
132    }
133
134    public <O extends Record> BillingAccountDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.payment.BillingAccountDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.payment.BillingAccountDetails> parentPath) {
135        super(path, childPath, parentPath, BillingAccountDetails);
136    }
137
138    /**
139     * A subtype implementing {@link Path} for simplified path-based joins.
140     */
141    public static class BillingAccountDetailsPath extends BillingAccountDetails implements Path<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> {
142
143        private static final long serialVersionUID = 1L;
144        public <O extends Record> BillingAccountDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.payment.BillingAccountDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.payment.BillingAccountDetails> parentPath) {
145            super(path, childPath, parentPath);
146        }
147        private BillingAccountDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> aliased) {
148            super(alias, aliased);
149        }
150
151        @Override
152        public BillingAccountDetailsPath as(String alias) {
153            return new BillingAccountDetailsPath(DSL.name(alias), this);
154        }
155
156        @Override
157        public BillingAccountDetailsPath as(Name alias) {
158            return new BillingAccountDetailsPath(alias, this);
159        }
160
161        @Override
162        public BillingAccountDetailsPath as(Table<?> alias) {
163            return new BillingAccountDetailsPath(alias.getQualifiedName(), this);
164        }
165    }
166
167    @Override
168    public UniqueKey<com.echothree.model.jooq.server.records.payment.BillingAccountDetails> getPrimaryKey() {
169        return KeyRegistry.BILLING_ACCOUNT_DETAILS_PK;
170    }
171
172    @Override
173    public List<UniqueKey<com.echothree.model.jooq.server.records.payment.BillingAccountDetails>> getUniqueKeys() {
174        return Arrays.asList(KeyRegistry.BILLING_ACCOUNT_DETAILS_BILLING_ACCOUNT_AND_THRU_TIME_UK, KeyRegistry.BILLING_ACCOUNT_DETAILS_BILLING_ACCOUNT_NAME_AND_THRU_TIME_UK);
175    }
176
177    @Override
178    public List<ForeignKey<com.echothree.model.jooq.server.records.payment.BillingAccountDetails, ?>> getReferences() {
179        return Arrays.asList(KeyRegistry.BILLING_ACCOUNT_DETAILS_BILLING_ACCOUNT_FK, KeyRegistry.BILLING_ACCOUNT_DETAILS_CURRENCY_FK);
180    }
181
182    private transient BillingAccountsPath _bllactdt_bllact_billingaccountid_fk;
183
184    /**
185     * Get the implicit join path to the <code>billingaccounts</code> table.
186     */
187    public BillingAccountsPath bllactdt_bllact_billingaccountid_fk() {
188        if (_bllactdt_bllact_billingaccountid_fk == null)
189            _bllactdt_bllact_billingaccountid_fk = new BillingAccountsPath(this, KeyRegistry.BILLING_ACCOUNT_DETAILS_BILLING_ACCOUNT_FK, null);
190
191        return _bllactdt_bllact_billingaccountid_fk;
192    }
193
194    private transient CurrenciesPath _bllactdt_cur_currencyid_fk;
195
196    /**
197     * Get the implicit join path to the <code>currencies</code> table.
198     */
199    public CurrenciesPath bllactdt_cur_currencyid_fk() {
200        if (_bllactdt_cur_currencyid_fk == null)
201            _bllactdt_cur_currencyid_fk = new CurrenciesPath(this, KeyRegistry.BILLING_ACCOUNT_DETAILS_CURRENCY_FK, null);
202
203        return _bllactdt_cur_currencyid_fk;
204    }
205
206    @Override
207    public BillingAccountDetails as(String alias) {
208        return new BillingAccountDetails(DSL.name(alias), this);
209    }
210
211    @Override
212    public BillingAccountDetails as(Name alias) {
213        return new BillingAccountDetails(alias, this);
214    }
215
216    @Override
217    public BillingAccountDetails as(Table<?> alias) {
218        return new BillingAccountDetails(alias.getQualifiedName(), this);
219    }
220
221    /**
222     * Rename this table
223     */
224    @Override
225    public BillingAccountDetails rename(String name) {
226        return new BillingAccountDetails(DSL.name(name), null);
227    }
228
229    /**
230     * Rename this table
231     */
232    @Override
233    public BillingAccountDetails rename(Name name) {
234        return new BillingAccountDetails(name, null);
235    }
236
237    /**
238     * Rename this table
239     */
240    @Override
241    public BillingAccountDetails rename(Table<?> name) {
242        return new BillingAccountDetails(name.getQualifiedName(), null);
243    }
244
245    /**
246     * Create an inline derived table from this table
247     */
248    @Override
249    public BillingAccountDetails where(Condition condition) {
250        return new BillingAccountDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
251    }
252
253    /**
254     * Create an inline derived table from this table
255     */
256    @Override
257    public BillingAccountDetails where(Collection<? extends Condition> conditions) {
258        return where(DSL.and(conditions));
259    }
260
261    /**
262     * Create an inline derived table from this table
263     */
264    @Override
265    public BillingAccountDetails where(Condition... conditions) {
266        return where(DSL.and(conditions));
267    }
268
269    /**
270     * Create an inline derived table from this table
271     */
272    @Override
273    public BillingAccountDetails where(Field<Boolean> condition) {
274        return where(DSL.condition(condition));
275    }
276
277    /**
278     * Create an inline derived table from this table
279     */
280    @Override
281    @PlainSQL
282    public BillingAccountDetails where(SQL condition) {
283        return where(DSL.condition(condition));
284    }
285
286    /**
287     * Create an inline derived table from this table
288     */
289    @Override
290    @PlainSQL
291    public BillingAccountDetails where(@Stringly.SQL String condition) {
292        return where(DSL.condition(condition));
293    }
294
295    /**
296     * Create an inline derived table from this table
297     */
298    @Override
299    @PlainSQL
300    public BillingAccountDetails where(@Stringly.SQL String condition, Object... binds) {
301        return where(DSL.condition(condition, binds));
302    }
303
304    /**
305     * Create an inline derived table from this table
306     */
307    @Override
308    @PlainSQL
309    public BillingAccountDetails where(@Stringly.SQL String condition, QueryPart... parts) {
310        return where(DSL.condition(condition, parts));
311    }
312
313    /**
314     * Create an inline derived table from this table
315     */
316    @Override
317    public BillingAccountDetails whereExists(TableLike<?> select) {
318        return where(DSL.exists(select));
319    }
320
321    /**
322     * Create an inline derived table from this table
323     */
324    @Override
325    public BillingAccountDetails whereNotExists(TableLike<?> select) {
326        return where(DSL.notExists(select));
327    }
328}