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.EventGroupPK; 009import com.echothree.model.data.core.common.pk.EventPK; 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.EventGroups.EventGroupsPath; 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.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 Events extends TableImpl<com.echothree.model.jooq.server.records.core.Events> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>events</code> 053 */ 054 public static final Events Events = new Events(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.core.Events> getRecordType() { 061 return com.echothree.model.jooq.server.records.core.Events.class; 062 } 063 064 /** 065 * The column <code>events.ev_eventid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.core.Events, EventPK> EVENT = createField(DSL.name("ev_eventid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EventPK.class, id -> new com.echothree.model.data.core.common.pk.EventPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>events.ev_evgrp_eventgroupid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.core.Events, EventGroupPK> EVENT_GROUP = createField(DSL.name("ev_evgrp_eventgroupid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, EventGroupPK.class, id -> new com.echothree.model.data.core.common.pk.EventGroupPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>events.ev_eventtime</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.core.Events, Long> EVENT_TIME = createField(DSL.name("ev_eventtime"), SQLDataType.BIGINT.nullable(false), this, ""); 078 079 /** 080 * The column <code>events.ev_eventtimesequence</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.core.Events, Integer> EVENT_TIME_SEQUENCE = createField(DSL.name("ev_eventtimesequence"), SQLDataType.INTEGER.nullable(false), this, ""); 083 084 /** 085 * The column <code>events.ev_eni_entityinstanceid</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.core.Events, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("ev_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())); 088 089 /** 090 * The column <code>events.ev_evty_eventtypeid</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.core.Events, EventTypePK> EVENT_TYPE = createField(DSL.name("ev_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())); 093 094 /** 095 * The column <code>events.ev_relatedentityinstanceid</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.core.Events, EntityInstancePK> RELATED_ENTITY_INSTANCE = createField(DSL.name("ev_relatedentityinstanceid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId())); 098 099 /** 100 * The column <code>events.ev_relatedeventtypeid</code>. 101 */ 102 public final TableField<com.echothree.model.jooq.server.records.core.Events, EventTypePK> RELATED_EVENT_TYPE = createField(DSL.name("ev_relatedeventtypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, EventTypePK.class, id -> new com.echothree.model.data.core.common.pk.EventTypePK(id), primaryKey -> primaryKey.getEntityId())); 103 104 /** 105 * The column <code>events.ev_createdbyid</code>. 106 */ 107 public final TableField<com.echothree.model.jooq.server.records.core.Events, EntityInstancePK> CREATED_BY = createField(DSL.name("ev_createdbyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId())); 108 109 private Events(Name alias, Table<com.echothree.model.jooq.server.records.core.Events> aliased) { 110 this(alias, aliased, (Field<?>[]) null, null); 111 } 112 113 private Events(Name alias, Table<com.echothree.model.jooq.server.records.core.Events> aliased, Field<?>[] parameters, Condition where) { 114 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 115 } 116 117 /** 118 * Create an aliased <code>events</code> table reference 119 */ 120 public Events(String alias) { 121 this(DSL.name(alias), Events); 122 } 123 124 /** 125 * Create an aliased <code>events</code> table reference 126 */ 127 public Events(Name alias) { 128 this(alias, Events); 129 } 130 131 /** 132 * Create a <code>events</code> table reference 133 */ 134 public Events() { 135 this(DSL.name("events"), null); 136 } 137 138 public <O extends Record> Events(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.core.Events> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.core.Events> parentPath) { 139 super(path, childPath, parentPath, Events); 140 } 141 142 /** 143 * A subtype implementing {@link Path} for simplified path-based joins. 144 */ 145 public static class EventsPath extends Events implements Path<com.echothree.model.jooq.server.records.core.Events> { 146 147 private static final long serialVersionUID = 1L; 148 public <O extends Record> EventsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.core.Events> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.core.Events> parentPath) { 149 super(path, childPath, parentPath); 150 } 151 private EventsPath(Name alias, Table<com.echothree.model.jooq.server.records.core.Events> aliased) { 152 super(alias, aliased); 153 } 154 155 @Override 156 public EventsPath as(String alias) { 157 return new EventsPath(DSL.name(alias), this); 158 } 159 160 @Override 161 public EventsPath as(Name alias) { 162 return new EventsPath(alias, this); 163 } 164 165 @Override 166 public EventsPath as(Table<?> alias) { 167 return new EventsPath(alias.getQualifiedName(), this); 168 } 169 } 170 171 @Override 172 public UniqueKey<com.echothree.model.jooq.server.records.core.Events> getPrimaryKey() { 173 return KeyRegistry.EVENTS_PK; 174 } 175 176 @Override 177 public List<ForeignKey<com.echothree.model.jooq.server.records.core.Events, ?>> getReferences() { 178 return Arrays.asList(KeyRegistry.EVENTS_CREATED_BY_FK, KeyRegistry.EVENTS_ENTITY_INSTANCE_FK, KeyRegistry.EVENTS_EVENT_GROUP_FK, KeyRegistry.EVENTS_EVENT_TYPE_FK, KeyRegistry.EVENTS_RELATED_ENTITY_INSTANCE_FK, KeyRegistry.EVENTS_RELATED_EVENT_TYPE_FK); 179 } 180 181 private transient EntityInstancesPath _ev_createdbyid_fk; 182 183 /** 184 * Get the implicit join path to the <code>entityinstances</code> table, via 185 * the <code>ev_createdbyid_fk</code> key. 186 */ 187 public EntityInstancesPath ev_createdbyid_fk() { 188 if (_ev_createdbyid_fk == null) 189 _ev_createdbyid_fk = new EntityInstancesPath(this, KeyRegistry.EVENTS_CREATED_BY_FK, null); 190 191 return _ev_createdbyid_fk; 192 } 193 194 private transient EntityInstancesPath _ev_eni_entityinstanceid_fk; 195 196 /** 197 * Get the implicit join path to the <code>entityinstances</code> table, via 198 * the <code>ev_eni_entityinstanceid_fk</code> key. 199 */ 200 public EntityInstancesPath ev_eni_entityinstanceid_fk() { 201 if (_ev_eni_entityinstanceid_fk == null) 202 _ev_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.EVENTS_ENTITY_INSTANCE_FK, null); 203 204 return _ev_eni_entityinstanceid_fk; 205 } 206 207 private transient EventGroupsPath _ev_evgrp_eventgroupid_fk; 208 209 /** 210 * Get the implicit join path to the <code>eventgroups</code> table. 211 */ 212 public EventGroupsPath ev_evgrp_eventgroupid_fk() { 213 if (_ev_evgrp_eventgroupid_fk == null) 214 _ev_evgrp_eventgroupid_fk = new EventGroupsPath(this, KeyRegistry.EVENTS_EVENT_GROUP_FK, null); 215 216 return _ev_evgrp_eventgroupid_fk; 217 } 218 219 private transient EventTypesPath _ev_evty_eventtypeid_fk; 220 221 /** 222 * Get the implicit join path to the <code>eventtypes</code> table, via the 223 * <code>ev_evty_eventtypeid_fk</code> key. 224 */ 225 public EventTypesPath ev_evty_eventtypeid_fk() { 226 if (_ev_evty_eventtypeid_fk == null) 227 _ev_evty_eventtypeid_fk = new EventTypesPath(this, KeyRegistry.EVENTS_EVENT_TYPE_FK, null); 228 229 return _ev_evty_eventtypeid_fk; 230 } 231 232 private transient EntityInstancesPath _ev_relatedentityinstanceid_fk; 233 234 /** 235 * Get the implicit join path to the <code>entityinstances</code> table, via 236 * the <code>ev_relatedentityinstanceid_fk</code> key. 237 */ 238 public EntityInstancesPath ev_relatedentityinstanceid_fk() { 239 if (_ev_relatedentityinstanceid_fk == null) 240 _ev_relatedentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.EVENTS_RELATED_ENTITY_INSTANCE_FK, null); 241 242 return _ev_relatedentityinstanceid_fk; 243 } 244 245 private transient EventTypesPath _ev_relatedeventtypeid_fk; 246 247 /** 248 * Get the implicit join path to the <code>eventtypes</code> table, via the 249 * <code>ev_relatedeventtypeid_fk</code> key. 250 */ 251 public EventTypesPath ev_relatedeventtypeid_fk() { 252 if (_ev_relatedeventtypeid_fk == null) 253 _ev_relatedeventtypeid_fk = new EventTypesPath(this, KeyRegistry.EVENTS_RELATED_EVENT_TYPE_FK, null); 254 255 return _ev_relatedeventtypeid_fk; 256 } 257 258 @Override 259 public Events as(String alias) { 260 return new Events(DSL.name(alias), this); 261 } 262 263 @Override 264 public Events as(Name alias) { 265 return new Events(alias, this); 266 } 267 268 @Override 269 public Events as(Table<?> alias) { 270 return new Events(alias.getQualifiedName(), this); 271 } 272 273 /** 274 * Rename this table 275 */ 276 @Override 277 public Events rename(String name) { 278 return new Events(DSL.name(name), null); 279 } 280 281 /** 282 * Rename this table 283 */ 284 @Override 285 public Events rename(Name name) { 286 return new Events(name, null); 287 } 288 289 /** 290 * Rename this table 291 */ 292 @Override 293 public Events rename(Table<?> name) { 294 return new Events(name.getQualifiedName(), null); 295 } 296 297 /** 298 * Create an inline derived table from this table 299 */ 300 @Override 301 public Events where(Condition condition) { 302 return new Events(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 303 } 304 305 /** 306 * Create an inline derived table from this table 307 */ 308 @Override 309 public Events where(Collection<? extends Condition> conditions) { 310 return where(DSL.and(conditions)); 311 } 312 313 /** 314 * Create an inline derived table from this table 315 */ 316 @Override 317 public Events where(Condition... conditions) { 318 return where(DSL.and(conditions)); 319 } 320 321 /** 322 * Create an inline derived table from this table 323 */ 324 @Override 325 public Events where(Field<Boolean> condition) { 326 return where(DSL.condition(condition)); 327 } 328 329 /** 330 * Create an inline derived table from this table 331 */ 332 @Override 333 @PlainSQL 334 public Events where(SQL condition) { 335 return where(DSL.condition(condition)); 336 } 337 338 /** 339 * Create an inline derived table from this table 340 */ 341 @Override 342 @PlainSQL 343 public Events where(@Stringly.SQL String condition) { 344 return where(DSL.condition(condition)); 345 } 346 347 /** 348 * Create an inline derived table from this table 349 */ 350 @Override 351 @PlainSQL 352 public Events where(@Stringly.SQL String condition, Object... binds) { 353 return where(DSL.condition(condition, binds)); 354 } 355 356 /** 357 * Create an inline derived table from this table 358 */ 359 @Override 360 @PlainSQL 361 public Events where(@Stringly.SQL String condition, QueryPart... parts) { 362 return where(DSL.condition(condition, parts)); 363 } 364 365 /** 366 * Create an inline derived table from this table 367 */ 368 @Override 369 public Events whereExists(TableLike<?> select) { 370 return where(DSL.exists(select)); 371 } 372 373 /** 374 * Create an inline derived table from this table 375 */ 376 @Override 377 public Events whereNotExists(TableLike<?> select) { 378 return where(DSL.notExists(select)); 379 } 380}