001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.core;
005
006
007import com.echothree.model.data.core.common.pk.EntityInstancePK;
008import com.echothree.model.data.core.common.pk.EventSubscriberEntityInstancePK;
009import com.echothree.model.data.core.common.pk.EventSubscriberPK;
010import com.echothree.model.data.core.common.pk.EventTypePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath;
013import com.echothree.model.jooq.server.tables.core.EventSubscribers.EventSubscribersPath;
014import com.echothree.model.jooq.server.tables.core.EventTypes.EventTypesPath;
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 EventSubscriberEntityInstances extends TableImpl<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>eventsubscriberentityinstances</code>
050     */
051    public static final EventSubscriberEntityInstances EventSubscriberEntityInstances = new EventSubscriberEntityInstances();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances> getRecordType() {
058        return com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances.class;
059    }
060
061    /**
062     * The column
063     * <code>eventsubscriberentityinstances.evsei_eventsubscriberentityinstanceid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, EventSubscriberEntityInstancePK> EVENT_SUBSCRIBER_ENTITY_INSTANCE = createField(DSL.name("evsei_eventsubscriberentityinstanceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EventSubscriberEntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EventSubscriberEntityInstancePK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>eventsubscriberentityinstances.evsei_evs_eventsubscriberid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, EventSubscriberPK> EVENT_SUBSCRIBER = createField(DSL.name("evsei_evs_eventsubscriberid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EventSubscriberPK.class, id -> new com.echothree.model.data.core.common.pk.EventSubscriberPK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column
075     * <code>eventsubscriberentityinstances.evsei_eni_entityinstanceid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("evsei_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()));
078
079    /**
080     * The column
081     * <code>eventsubscriberentityinstances.evsei_evty_eventtypeid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, EventTypePK> EVENT_TYPE = createField(DSL.name("evsei_evty_eventtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EventTypePK.class, id -> new com.echothree.model.data.core.common.pk.EventTypePK(id), primaryKey -> primaryKey.getEntityId()));
084
085    /**
086     * The column <code>eventsubscriberentityinstances.evsei_fromtime</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, Long> FROM_TIME = createField(DSL.name("evsei_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
089
090    /**
091     * The column <code>eventsubscriberentityinstances.evsei_thrutime</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, Long> THRU_TIME = createField(DSL.name("evsei_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
094
095    private EventSubscriberEntityInstances(Name alias, Table<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances> aliased) {
096        this(alias, aliased, (Field<?>[]) null, null);
097    }
098
099    private EventSubscriberEntityInstances(Name alias, Table<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances> aliased, Field<?>[] parameters, Condition where) {
100        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
101    }
102
103    /**
104     * Create an aliased <code>eventsubscriberentityinstances</code> table
105     * reference
106     */
107    public EventSubscriberEntityInstances(String alias) {
108        this(DSL.name(alias), EventSubscriberEntityInstances);
109    }
110
111    /**
112     * Create an aliased <code>eventsubscriberentityinstances</code> table
113     * reference
114     */
115    public EventSubscriberEntityInstances(Name alias) {
116        this(alias, EventSubscriberEntityInstances);
117    }
118
119    /**
120     * Create a <code>eventsubscriberentityinstances</code> table reference
121     */
122    public EventSubscriberEntityInstances() {
123        this(DSL.name("eventsubscriberentityinstances"), null);
124    }
125
126    @Override
127    public UniqueKey<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances> getPrimaryKey() {
128        return KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_PK;
129    }
130
131    @Override
132    public List<UniqueKey<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances>> getUniqueKeys() {
133        return Arrays.asList(KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_EVENT_SUBSCRIBER_AND_ENTITY_INSTANCE_AND_EVENT_TYPE_AND_THRU_TIME_UK);
134    }
135
136    @Override
137    public List<ForeignKey<com.echothree.model.jooq.server.records.core.EventSubscriberEntityInstances, ?>> getReferences() {
138        return Arrays.asList(KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_ENTITY_INSTANCE_FK, KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_EVENT_SUBSCRIBER_FK, KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_EVENT_TYPE_FK);
139    }
140
141    private transient EntityInstancesPath _evsei_eni_entityinstanceid_fk;
142
143    /**
144     * Get the implicit join path to the <code>entityinstances</code> table.
145     */
146    public EntityInstancesPath evsei_eni_entityinstanceid_fk() {
147        if (_evsei_eni_entityinstanceid_fk == null)
148            _evsei_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_ENTITY_INSTANCE_FK, null);
149
150        return _evsei_eni_entityinstanceid_fk;
151    }
152
153    private transient EventSubscribersPath _evsei_evs_eventsubscriberid_fk;
154
155    /**
156     * Get the implicit join path to the <code>eventsubscribers</code> table.
157     */
158    public EventSubscribersPath evsei_evs_eventsubscriberid_fk() {
159        if (_evsei_evs_eventsubscriberid_fk == null)
160            _evsei_evs_eventsubscriberid_fk = new EventSubscribersPath(this, KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_EVENT_SUBSCRIBER_FK, null);
161
162        return _evsei_evs_eventsubscriberid_fk;
163    }
164
165    private transient EventTypesPath _evsei_evty_eventtypeid_fk;
166
167    /**
168     * Get the implicit join path to the <code>eventtypes</code> table.
169     */
170    public EventTypesPath evsei_evty_eventtypeid_fk() {
171        if (_evsei_evty_eventtypeid_fk == null)
172            _evsei_evty_eventtypeid_fk = new EventTypesPath(this, KeyRegistry.EVENT_SUBSCRIBER_ENTITY_INSTANCES_EVENT_TYPE_FK, null);
173
174        return _evsei_evty_eventtypeid_fk;
175    }
176
177    @Override
178    public EventSubscriberEntityInstances as(String alias) {
179        return new EventSubscriberEntityInstances(DSL.name(alias), this);
180    }
181
182    @Override
183    public EventSubscriberEntityInstances as(Name alias) {
184        return new EventSubscriberEntityInstances(alias, this);
185    }
186
187    @Override
188    public EventSubscriberEntityInstances as(Table<?> alias) {
189        return new EventSubscriberEntityInstances(alias.getQualifiedName(), this);
190    }
191
192    /**
193     * Rename this table
194     */
195    @Override
196    public EventSubscriberEntityInstances rename(String name) {
197        return new EventSubscriberEntityInstances(DSL.name(name), null);
198    }
199
200    /**
201     * Rename this table
202     */
203    @Override
204    public EventSubscriberEntityInstances rename(Name name) {
205        return new EventSubscriberEntityInstances(name, null);
206    }
207
208    /**
209     * Rename this table
210     */
211    @Override
212    public EventSubscriberEntityInstances rename(Table<?> name) {
213        return new EventSubscriberEntityInstances(name.getQualifiedName(), null);
214    }
215
216    /**
217     * Create an inline derived table from this table
218     */
219    @Override
220    public EventSubscriberEntityInstances where(Condition condition) {
221        return new EventSubscriberEntityInstances(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
222    }
223
224    /**
225     * Create an inline derived table from this table
226     */
227    @Override
228    public EventSubscriberEntityInstances where(Collection<? extends Condition> conditions) {
229        return where(DSL.and(conditions));
230    }
231
232    /**
233     * Create an inline derived table from this table
234     */
235    @Override
236    public EventSubscriberEntityInstances where(Condition... conditions) {
237        return where(DSL.and(conditions));
238    }
239
240    /**
241     * Create an inline derived table from this table
242     */
243    @Override
244    public EventSubscriberEntityInstances where(Field<Boolean> 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 EventSubscriberEntityInstances where(SQL condition) {
254        return where(DSL.condition(condition));
255    }
256
257    /**
258     * Create an inline derived table from this table
259     */
260    @Override
261    @PlainSQL
262    public EventSubscriberEntityInstances where(@Stringly.SQL String condition) {
263        return where(DSL.condition(condition));
264    }
265
266    /**
267     * Create an inline derived table from this table
268     */
269    @Override
270    @PlainSQL
271    public EventSubscriberEntityInstances where(@Stringly.SQL String condition, Object... binds) {
272        return where(DSL.condition(condition, binds));
273    }
274
275    /**
276     * Create an inline derived table from this table
277     */
278    @Override
279    @PlainSQL
280    public EventSubscriberEntityInstances where(@Stringly.SQL String condition, QueryPart... parts) {
281        return where(DSL.condition(condition, parts));
282    }
283
284    /**
285     * Create an inline derived table from this table
286     */
287    @Override
288    public EventSubscriberEntityInstances whereExists(TableLike<?> select) {
289        return where(DSL.exists(select));
290    }
291
292    /**
293     * Create an inline derived table from this table
294     */
295    @Override
296    public EventSubscriberEntityInstances whereNotExists(TableLike<?> select) {
297        return where(DSL.notExists(select));
298    }
299}