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