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.TransactionEntityRolePK;
008import com.echothree.model.data.accounting.common.pk.TransactionEntityRoleTypePK;
009import com.echothree.model.data.accounting.common.pk.TransactionPK;
010import com.echothree.model.data.core.common.pk.EntityInstancePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.accounting.TransactionEntityRoleTypes.TransactionEntityRoleTypesPath;
013import com.echothree.model.jooq.server.tables.accounting.Transactions.TransactionsPath;
014import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath;
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.Name;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.SQL;
028import org.jooq.Stringly;
029import org.jooq.Table;
030import org.jooq.TableField;
031import org.jooq.TableLike;
032import org.jooq.TableOptions;
033import org.jooq.UniqueKey;
034import org.jooq.impl.DSL;
035import org.jooq.impl.Internal;
036import org.jooq.impl.SQLDataType;
037import org.jooq.impl.TableImpl;
038
039
040/**
041 * This class is generated by jOOQ.
042 */
043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
044public class TransactionEntityRoles extends TableImpl<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>transactionentityroles</code>
050     */
051    public static final TransactionEntityRoles TransactionEntityRoles = new TransactionEntityRoles();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles> getRecordType() {
058        return com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles.class;
059    }
060
061    /**
062     * The column
063     * <code>transactionentityroles.trxer_transactionentityroleid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, TransactionEntityRolePK> TRANSACTION_ENTITY_ROLE = createField(DSL.name("trxer_transactionentityroleid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TransactionEntityRolePK.class, id -> new com.echothree.model.data.accounting.common.pk.TransactionEntityRolePK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column <code>transactionentityroles.trxer_trx_transactionid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, TransactionPK> TRANSACTION = createField(DSL.name("trxer_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()));
071
072    /**
073     * The column
074     * <code>transactionentityroles.trxer_trxertyp_transactionentityroletypeid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, TransactionEntityRoleTypePK> TRANSACTION_ENTITY_ROLE_TYPE = createField(DSL.name("trxer_trxertyp_transactionentityroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TransactionEntityRoleTypePK.class, id -> new com.echothree.model.data.accounting.common.pk.TransactionEntityRoleTypePK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column
080     * <code>transactionentityroles.trxer_eni_entityinstanceid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("trxer_eni_entityinstanceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column <code>transactionentityroles.trxer_fromtime</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, Long> FROM_TIME = createField(DSL.name("trxer_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
088
089    /**
090     * The column <code>transactionentityroles.trxer_thrutime</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, Long> THRU_TIME = createField(DSL.name("trxer_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
093
094    private TransactionEntityRoles(Name alias, Table<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles> aliased) {
095        this(alias, aliased, (Field<?>[]) null, null);
096    }
097
098    private TransactionEntityRoles(Name alias, Table<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles> aliased, Field<?>[] parameters, Condition where) {
099        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
100    }
101
102    /**
103     * Create an aliased <code>transactionentityroles</code> table reference
104     */
105    public TransactionEntityRoles(String alias) {
106        this(DSL.name(alias), TransactionEntityRoles);
107    }
108
109    /**
110     * Create an aliased <code>transactionentityroles</code> table reference
111     */
112    public TransactionEntityRoles(Name alias) {
113        this(alias, TransactionEntityRoles);
114    }
115
116    /**
117     * Create a <code>transactionentityroles</code> table reference
118     */
119    public TransactionEntityRoles() {
120        this(DSL.name("transactionentityroles"), null);
121    }
122
123    @Override
124    public UniqueKey<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles> getPrimaryKey() {
125        return KeyRegistry.TRANSACTION_ENTITY_ROLES_PK;
126    }
127
128    @Override
129    public List<UniqueKey<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles>> getUniqueKeys() {
130        return Arrays.asList(KeyRegistry.TRANSACTION_ENTITY_ROLES_TRANSACTION_AND_TRANSACTION_ENTITY_ROLE_TYPE_AND_THRU_TIME_UK);
131    }
132
133    @Override
134    public List<ForeignKey<com.echothree.model.jooq.server.records.accounting.TransactionEntityRoles, ?>> getReferences() {
135        return Arrays.asList(KeyRegistry.TRANSACTION_ENTITY_ROLES_ENTITY_INSTANCE_FK, KeyRegistry.TRANSACTION_ENTITY_ROLES_TRANSACTION_FK, KeyRegistry.TRANSACTION_ENTITY_ROLES_TRANSACTION_ENTITY_ROLE_TYPE_FK);
136    }
137
138    private transient EntityInstancesPath _trxer_eni_entityinstanceid_fk;
139
140    /**
141     * Get the implicit join path to the <code>entityinstances</code> table.
142     */
143    public EntityInstancesPath trxer_eni_entityinstanceid_fk() {
144        if (_trxer_eni_entityinstanceid_fk == null)
145            _trxer_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.TRANSACTION_ENTITY_ROLES_ENTITY_INSTANCE_FK, null);
146
147        return _trxer_eni_entityinstanceid_fk;
148    }
149
150    private transient TransactionsPath _trxer_trx_transactionid_fk;
151
152    /**
153     * Get the implicit join path to the <code>transactions</code> table.
154     */
155    public TransactionsPath trxer_trx_transactionid_fk() {
156        if (_trxer_trx_transactionid_fk == null)
157            _trxer_trx_transactionid_fk = new TransactionsPath(this, KeyRegistry.TRANSACTION_ENTITY_ROLES_TRANSACTION_FK, null);
158
159        return _trxer_trx_transactionid_fk;
160    }
161
162    private transient TransactionEntityRoleTypesPath _trxer_trxertyp_transactionentityroletypeid_fk;
163
164    /**
165     * Get the implicit join path to the <code>transactionentityroletypes</code>
166     * table.
167     */
168    public TransactionEntityRoleTypesPath trxer_trxertyp_transactionentityroletypeid_fk() {
169        if (_trxer_trxertyp_transactionentityroletypeid_fk == null)
170            _trxer_trxertyp_transactionentityroletypeid_fk = new TransactionEntityRoleTypesPath(this, KeyRegistry.TRANSACTION_ENTITY_ROLES_TRANSACTION_ENTITY_ROLE_TYPE_FK, null);
171
172        return _trxer_trxertyp_transactionentityroletypeid_fk;
173    }
174
175    @Override
176    public TransactionEntityRoles as(String alias) {
177        return new TransactionEntityRoles(DSL.name(alias), this);
178    }
179
180    @Override
181    public TransactionEntityRoles as(Name alias) {
182        return new TransactionEntityRoles(alias, this);
183    }
184
185    @Override
186    public TransactionEntityRoles as(Table<?> alias) {
187        return new TransactionEntityRoles(alias.getQualifiedName(), this);
188    }
189
190    /**
191     * Rename this table
192     */
193    @Override
194    public TransactionEntityRoles rename(String name) {
195        return new TransactionEntityRoles(DSL.name(name), null);
196    }
197
198    /**
199     * Rename this table
200     */
201    @Override
202    public TransactionEntityRoles rename(Name name) {
203        return new TransactionEntityRoles(name, null);
204    }
205
206    /**
207     * Rename this table
208     */
209    @Override
210    public TransactionEntityRoles rename(Table<?> name) {
211        return new TransactionEntityRoles(name.getQualifiedName(), null);
212    }
213
214    /**
215     * Create an inline derived table from this table
216     */
217    @Override
218    public TransactionEntityRoles where(Condition condition) {
219        return new TransactionEntityRoles(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
220    }
221
222    /**
223     * Create an inline derived table from this table
224     */
225    @Override
226    public TransactionEntityRoles where(Collection<? extends Condition> conditions) {
227        return where(DSL.and(conditions));
228    }
229
230    /**
231     * Create an inline derived table from this table
232     */
233    @Override
234    public TransactionEntityRoles where(Condition... conditions) {
235        return where(DSL.and(conditions));
236    }
237
238    /**
239     * Create an inline derived table from this table
240     */
241    @Override
242    public TransactionEntityRoles where(Field<Boolean> condition) {
243        return where(DSL.condition(condition));
244    }
245
246    /**
247     * Create an inline derived table from this table
248     */
249    @Override
250    @PlainSQL
251    public TransactionEntityRoles where(SQL condition) {
252        return where(DSL.condition(condition));
253    }
254
255    /**
256     * Create an inline derived table from this table
257     */
258    @Override
259    @PlainSQL
260    public TransactionEntityRoles where(@Stringly.SQL String condition) {
261        return where(DSL.condition(condition));
262    }
263
264    /**
265     * Create an inline derived table from this table
266     */
267    @Override
268    @PlainSQL
269    public TransactionEntityRoles where(@Stringly.SQL String condition, Object... binds) {
270        return where(DSL.condition(condition, binds));
271    }
272
273    /**
274     * Create an inline derived table from this table
275     */
276    @Override
277    @PlainSQL
278    public TransactionEntityRoles where(@Stringly.SQL String condition, QueryPart... parts) {
279        return where(DSL.condition(condition, parts));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    public TransactionEntityRoles whereExists(TableLike<?> select) {
287        return where(DSL.exists(select));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    public TransactionEntityRoles whereNotExists(TableLike<?> select) {
295        return where(DSL.notExists(select));
296    }
297}