001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.rating; 005 006 007import com.echothree.model.data.core.common.pk.EntityInstancePK; 008import com.echothree.model.data.rating.common.pk.RatingDetailPK; 009import com.echothree.model.data.rating.common.pk.RatingPK; 010import com.echothree.model.data.rating.common.pk.RatingTypeListItemPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 013import com.echothree.model.jooq.server.tables.rating.RatingTypeListItems.RatingTypeListItemsPath; 014import com.echothree.model.jooq.server.tables.rating.Ratings.RatingsPath; 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 RatingDetails extends TableImpl<com.echothree.model.jooq.server.records.rating.RatingDetails> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>ratingdetails</code> 053 */ 054 public static final RatingDetails RatingDetails = new RatingDetails(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.rating.RatingDetails> getRecordType() { 061 return com.echothree.model.jooq.server.records.rating.RatingDetails.class; 062 } 063 064 /** 065 * The column <code>ratingdetails.rtgdt_ratingdetailid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, RatingDetailPK> RATING_DETAIL = createField(DSL.name("rtgdt_ratingdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RatingDetailPK.class, id -> new com.echothree.model.data.rating.common.pk.RatingDetailPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>ratingdetails.rtgdt_rtg_ratingid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, RatingPK> RATING = createField(DSL.name("rtgdt_rtg_ratingid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RatingPK.class, id -> new com.echothree.model.data.rating.common.pk.RatingPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>ratingdetails.rtgdt_ratingname</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, String> RATING_NAME = createField(DSL.name("rtgdt_ratingname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 078 079 /** 080 * The column 081 * <code>ratingdetails.rtgdt_rtgtypli_ratingtypelistitemid</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, RatingTypeListItemPK> RATING_TYPE_LIST_ITEM = createField(DSL.name("rtgdt_rtgtypli_ratingtypelistitemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RatingTypeListItemPK.class, id -> new com.echothree.model.data.rating.common.pk.RatingTypeListItemPK(id), primaryKey -> primaryKey.getEntityId())); 084 085 /** 086 * The column <code>ratingdetails.rtgdt_ratedentityinstanceid</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, EntityInstancePK> RATED_ENTITY_INSTANCE = createField(DSL.name("rtgdt_ratedentityinstanceid"), 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())); 089 090 /** 091 * The column <code>ratingdetails.rtgdt_ratedbyentityinstanceid</code>. 092 */ 093 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, EntityInstancePK> RATED_BY_ENTITY_INSTANCE = createField(DSL.name("rtgdt_ratedbyentityinstanceid"), 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())); 094 095 /** 096 * The column <code>ratingdetails.rtgdt_fromtime</code>. 097 */ 098 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, Long> FROM_TIME = createField(DSL.name("rtgdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 099 100 /** 101 * The column <code>ratingdetails.rtgdt_thrutime</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.rating.RatingDetails, Long> THRU_TIME = createField(DSL.name("rtgdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 104 105 private RatingDetails(Name alias, Table<com.echothree.model.jooq.server.records.rating.RatingDetails> aliased) { 106 this(alias, aliased, (Field<?>[]) null, null); 107 } 108 109 private RatingDetails(Name alias, Table<com.echothree.model.jooq.server.records.rating.RatingDetails> aliased, Field<?>[] parameters, Condition where) { 110 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 111 } 112 113 /** 114 * Create an aliased <code>ratingdetails</code> table reference 115 */ 116 public RatingDetails(String alias) { 117 this(DSL.name(alias), RatingDetails); 118 } 119 120 /** 121 * Create an aliased <code>ratingdetails</code> table reference 122 */ 123 public RatingDetails(Name alias) { 124 this(alias, RatingDetails); 125 } 126 127 /** 128 * Create a <code>ratingdetails</code> table reference 129 */ 130 public RatingDetails() { 131 this(DSL.name("ratingdetails"), null); 132 } 133 134 public <O extends Record> RatingDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.rating.RatingDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.rating.RatingDetails> parentPath) { 135 super(path, childPath, parentPath, RatingDetails); 136 } 137 138 /** 139 * A subtype implementing {@link Path} for simplified path-based joins. 140 */ 141 public static class RatingDetailsPath extends RatingDetails implements Path<com.echothree.model.jooq.server.records.rating.RatingDetails> { 142 143 private static final long serialVersionUID = 1L; 144 public <O extends Record> RatingDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.rating.RatingDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.rating.RatingDetails> parentPath) { 145 super(path, childPath, parentPath); 146 } 147 private RatingDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.rating.RatingDetails> aliased) { 148 super(alias, aliased); 149 } 150 151 @Override 152 public RatingDetailsPath as(String alias) { 153 return new RatingDetailsPath(DSL.name(alias), this); 154 } 155 156 @Override 157 public RatingDetailsPath as(Name alias) { 158 return new RatingDetailsPath(alias, this); 159 } 160 161 @Override 162 public RatingDetailsPath as(Table<?> alias) { 163 return new RatingDetailsPath(alias.getQualifiedName(), this); 164 } 165 } 166 167 @Override 168 public UniqueKey<com.echothree.model.jooq.server.records.rating.RatingDetails> getPrimaryKey() { 169 return KeyRegistry.RATING_DETAILS_PK; 170 } 171 172 @Override 173 public List<UniqueKey<com.echothree.model.jooq.server.records.rating.RatingDetails>> getUniqueKeys() { 174 return Arrays.asList(KeyRegistry.RATING_DETAILS_RATING_AND_THRU_TIME_UK, KeyRegistry.RATING_DETAILS_RATING_NAME_AND_THRU_TIME_UK, KeyRegistry.RATING_DETAILS_RATED_ENTITY_INSTANCE_AND_RATED_BY_ENTITY_INSTANCE_AND_THRU_TIME_UK); 175 } 176 177 @Override 178 public List<ForeignKey<com.echothree.model.jooq.server.records.rating.RatingDetails, ?>> getReferences() { 179 return Arrays.asList(KeyRegistry.RATING_DETAILS_RATED_BY_ENTITY_INSTANCE_FK, KeyRegistry.RATING_DETAILS_RATED_ENTITY_INSTANCE_FK, KeyRegistry.RATING_DETAILS_RATING_FK, KeyRegistry.RATING_DETAILS_RATING_TYPE_LIST_ITEM_FK); 180 } 181 182 private transient EntityInstancesPath _rtgdt_ratedbyentityinstanceid_fk; 183 184 /** 185 * Get the implicit join path to the <code>entityinstances</code> table, via 186 * the <code>rtgdt_ratedbyentityinstanceid_fk</code> key. 187 */ 188 public EntityInstancesPath rtgdt_ratedbyentityinstanceid_fk() { 189 if (_rtgdt_ratedbyentityinstanceid_fk == null) 190 _rtgdt_ratedbyentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.RATING_DETAILS_RATED_BY_ENTITY_INSTANCE_FK, null); 191 192 return _rtgdt_ratedbyentityinstanceid_fk; 193 } 194 195 private transient EntityInstancesPath _rtgdt_ratedentityinstanceid_fk; 196 197 /** 198 * Get the implicit join path to the <code>entityinstances</code> table, via 199 * the <code>rtgdt_ratedentityinstanceid_fk</code> key. 200 */ 201 public EntityInstancesPath rtgdt_ratedentityinstanceid_fk() { 202 if (_rtgdt_ratedentityinstanceid_fk == null) 203 _rtgdt_ratedentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.RATING_DETAILS_RATED_ENTITY_INSTANCE_FK, null); 204 205 return _rtgdt_ratedentityinstanceid_fk; 206 } 207 208 private transient RatingsPath _rtgdt_rtg_ratingid_fk; 209 210 /** 211 * Get the implicit join path to the <code>ratings</code> table. 212 */ 213 public RatingsPath rtgdt_rtg_ratingid_fk() { 214 if (_rtgdt_rtg_ratingid_fk == null) 215 _rtgdt_rtg_ratingid_fk = new RatingsPath(this, KeyRegistry.RATING_DETAILS_RATING_FK, null); 216 217 return _rtgdt_rtg_ratingid_fk; 218 } 219 220 private transient RatingTypeListItemsPath _rtgdt_rtgtypli_ratingtypelistitemid_fk; 221 222 /** 223 * Get the implicit join path to the <code>ratingtypelistitems</code> table. 224 */ 225 public RatingTypeListItemsPath rtgdt_rtgtypli_ratingtypelistitemid_fk() { 226 if (_rtgdt_rtgtypli_ratingtypelistitemid_fk == null) 227 _rtgdt_rtgtypli_ratingtypelistitemid_fk = new RatingTypeListItemsPath(this, KeyRegistry.RATING_DETAILS_RATING_TYPE_LIST_ITEM_FK, null); 228 229 return _rtgdt_rtgtypli_ratingtypelistitemid_fk; 230 } 231 232 @Override 233 public RatingDetails as(String alias) { 234 return new RatingDetails(DSL.name(alias), this); 235 } 236 237 @Override 238 public RatingDetails as(Name alias) { 239 return new RatingDetails(alias, this); 240 } 241 242 @Override 243 public RatingDetails as(Table<?> alias) { 244 return new RatingDetails(alias.getQualifiedName(), this); 245 } 246 247 /** 248 * Rename this table 249 */ 250 @Override 251 public RatingDetails rename(String name) { 252 return new RatingDetails(DSL.name(name), null); 253 } 254 255 /** 256 * Rename this table 257 */ 258 @Override 259 public RatingDetails rename(Name name) { 260 return new RatingDetails(name, null); 261 } 262 263 /** 264 * Rename this table 265 */ 266 @Override 267 public RatingDetails rename(Table<?> name) { 268 return new RatingDetails(name.getQualifiedName(), null); 269 } 270 271 /** 272 * Create an inline derived table from this table 273 */ 274 @Override 275 public RatingDetails where(Condition condition) { 276 return new RatingDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 277 } 278 279 /** 280 * Create an inline derived table from this table 281 */ 282 @Override 283 public RatingDetails where(Collection<? extends Condition> conditions) { 284 return where(DSL.and(conditions)); 285 } 286 287 /** 288 * Create an inline derived table from this table 289 */ 290 @Override 291 public RatingDetails where(Condition... conditions) { 292 return where(DSL.and(conditions)); 293 } 294 295 /** 296 * Create an inline derived table from this table 297 */ 298 @Override 299 public RatingDetails where(Field<Boolean> condition) { 300 return where(DSL.condition(condition)); 301 } 302 303 /** 304 * Create an inline derived table from this table 305 */ 306 @Override 307 @PlainSQL 308 public RatingDetails where(SQL condition) { 309 return where(DSL.condition(condition)); 310 } 311 312 /** 313 * Create an inline derived table from this table 314 */ 315 @Override 316 @PlainSQL 317 public RatingDetails where(@Stringly.SQL String condition) { 318 return where(DSL.condition(condition)); 319 } 320 321 /** 322 * Create an inline derived table from this table 323 */ 324 @Override 325 @PlainSQL 326 public RatingDetails where(@Stringly.SQL String condition, Object... binds) { 327 return where(DSL.condition(condition, binds)); 328 } 329 330 /** 331 * Create an inline derived table from this table 332 */ 333 @Override 334 @PlainSQL 335 public RatingDetails where(@Stringly.SQL String condition, QueryPart... parts) { 336 return where(DSL.condition(condition, parts)); 337 } 338 339 /** 340 * Create an inline derived table from this table 341 */ 342 @Override 343 public RatingDetails whereExists(TableLike<?> select) { 344 return where(DSL.exists(select)); 345 } 346 347 /** 348 * Create an inline derived table from this table 349 */ 350 @Override 351 public RatingDetails whereNotExists(TableLike<?> select) { 352 return where(DSL.notExists(select)); 353 } 354}