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