001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.comment; 005 006 007import com.echothree.model.data.comment.common.pk.CommentDetailPK; 008import com.echothree.model.data.comment.common.pk.CommentPK; 009import com.echothree.model.data.comment.common.pk.CommentTypePK; 010import com.echothree.model.data.core.common.pk.EntityInstancePK; 011import com.echothree.model.data.core.common.pk.MimeTypePK; 012import com.echothree.model.data.party.common.pk.LanguagePK; 013import com.echothree.model.jooq.server.KeyRegistry; 014import com.echothree.model.jooq.server.tables.comment.CommentTypes.CommentTypesPath; 015import com.echothree.model.jooq.server.tables.comment.Comments.CommentsPath; 016import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 017import com.echothree.model.jooq.server.tables.core.MimeTypes.MimeTypesPath; 018import com.echothree.model.jooq.server.tables.party.Languages.LanguagesPath; 019 020import java.util.Arrays; 021import java.util.Collection; 022import java.util.List; 023 024import org.jooq.Condition; 025import org.jooq.Converter; 026import org.jooq.Field; 027import org.jooq.ForeignKey; 028import org.jooq.InverseForeignKey; 029import org.jooq.Name; 030import org.jooq.Path; 031import org.jooq.PlainSQL; 032import org.jooq.QueryPart; 033import org.jooq.Record; 034import org.jooq.SQL; 035import org.jooq.Stringly; 036import org.jooq.Table; 037import org.jooq.TableField; 038import org.jooq.TableLike; 039import org.jooq.TableOptions; 040import org.jooq.UniqueKey; 041import org.jooq.impl.DSL; 042import org.jooq.impl.Internal; 043import org.jooq.impl.SQLDataType; 044import org.jooq.impl.TableImpl; 045 046 047/** 048 * This class is generated by jOOQ. 049 */ 050@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 051public class CommentDetails extends TableImpl<com.echothree.model.jooq.server.records.comment.CommentDetails> { 052 053 private static final long serialVersionUID = 1L; 054 055 /** 056 * The reference instance of <code>commentdetails</code> 057 */ 058 public static final CommentDetails CommentDetails = new CommentDetails(); 059 060 /** 061 * The class holding records for this type 062 */ 063 @Override 064 public Class<com.echothree.model.jooq.server.records.comment.CommentDetails> getRecordType() { 065 return com.echothree.model.jooq.server.records.comment.CommentDetails.class; 066 } 067 068 /** 069 * The column <code>commentdetails.cmntdt_commentdetailid</code>. 070 */ 071 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, CommentDetailPK> COMMENT_DETAIL = createField(DSL.name("cmntdt_commentdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommentDetailPK.class, id -> new com.echothree.model.data.comment.common.pk.CommentDetailPK(id), primaryKey -> primaryKey.getEntityId())); 072 073 /** 074 * The column <code>commentdetails.cmntdt_cmnt_commentid</code>. 075 */ 076 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, CommentPK> COMMENT = createField(DSL.name("cmntdt_cmnt_commentid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommentPK.class, id -> new com.echothree.model.data.comment.common.pk.CommentPK(id), primaryKey -> primaryKey.getEntityId())); 077 078 /** 079 * The column <code>commentdetails.cmntdt_commentname</code>. 080 */ 081 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, String> COMMENT_NAME = createField(DSL.name("cmntdt_commentname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 082 083 /** 084 * The column <code>commentdetails.cmntdt_cmnttyp_commenttypeid</code>. 085 */ 086 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, CommentTypePK> COMMENT_TYPE = createField(DSL.name("cmntdt_cmnttyp_commenttypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CommentTypePK.class, id -> new com.echothree.model.data.comment.common.pk.CommentTypePK(id), primaryKey -> primaryKey.getEntityId())); 087 088 /** 089 * The column <code>commentdetails.cmntdt_commentedentityinstanceid</code>. 090 */ 091 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, EntityInstancePK> COMMENTED_ENTITY_INSTANCE = createField(DSL.name("cmntdt_commentedentityinstanceid"), 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())); 092 093 /** 094 * The column 095 * <code>commentdetails.cmntdt_commentedbyentityinstanceid</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, EntityInstancePK> COMMENTED_BY_ENTITY_INSTANCE = createField(DSL.name("cmntdt_commentedbyentityinstanceid"), 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())); 098 099 /** 100 * The column <code>commentdetails.cmntdt_lang_languageid</code>. 101 */ 102 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, LanguagePK> LANGUAGE = createField(DSL.name("cmntdt_lang_languageid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LanguagePK.class, id -> new com.echothree.model.data.party.common.pk.LanguagePK(id), primaryKey -> primaryKey.getEntityId())); 103 104 /** 105 * The column <code>commentdetails.cmntdt_description</code>. 106 */ 107 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, String> DESCRIPTION = createField(DSL.name("cmntdt_description"), SQLDataType.VARCHAR(132), this, ""); 108 109 /** 110 * The column <code>commentdetails.cmntdt_mtyp_mimetypeid</code>. 111 */ 112 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, MimeTypePK> MIME_TYPE = createField(DSL.name("cmntdt_mtyp_mimetypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, MimeTypePK.class, id -> new com.echothree.model.data.core.common.pk.MimeTypePK(id), primaryKey -> primaryKey.getEntityId())); 113 114 /** 115 * The column <code>commentdetails.cmntdt_fromtime</code>. 116 */ 117 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, Long> FROM_TIME = createField(DSL.name("cmntdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 118 119 /** 120 * The column <code>commentdetails.cmntdt_thrutime</code>. 121 */ 122 public final TableField<com.echothree.model.jooq.server.records.comment.CommentDetails, Long> THRU_TIME = createField(DSL.name("cmntdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 123 124 private CommentDetails(Name alias, Table<com.echothree.model.jooq.server.records.comment.CommentDetails> aliased) { 125 this(alias, aliased, (Field<?>[]) null, null); 126 } 127 128 private CommentDetails(Name alias, Table<com.echothree.model.jooq.server.records.comment.CommentDetails> aliased, Field<?>[] parameters, Condition where) { 129 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 130 } 131 132 /** 133 * Create an aliased <code>commentdetails</code> table reference 134 */ 135 public CommentDetails(String alias) { 136 this(DSL.name(alias), CommentDetails); 137 } 138 139 /** 140 * Create an aliased <code>commentdetails</code> table reference 141 */ 142 public CommentDetails(Name alias) { 143 this(alias, CommentDetails); 144 } 145 146 /** 147 * Create a <code>commentdetails</code> table reference 148 */ 149 public CommentDetails() { 150 this(DSL.name("commentdetails"), null); 151 } 152 153 public <O extends Record> CommentDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.comment.CommentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.comment.CommentDetails> parentPath) { 154 super(path, childPath, parentPath, CommentDetails); 155 } 156 157 /** 158 * A subtype implementing {@link Path} for simplified path-based joins. 159 */ 160 public static class CommentDetailsPath extends CommentDetails implements Path<com.echothree.model.jooq.server.records.comment.CommentDetails> { 161 162 private static final long serialVersionUID = 1L; 163 public <O extends Record> CommentDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.comment.CommentDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.comment.CommentDetails> parentPath) { 164 super(path, childPath, parentPath); 165 } 166 private CommentDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.comment.CommentDetails> aliased) { 167 super(alias, aliased); 168 } 169 170 @Override 171 public CommentDetailsPath as(String alias) { 172 return new CommentDetailsPath(DSL.name(alias), this); 173 } 174 175 @Override 176 public CommentDetailsPath as(Name alias) { 177 return new CommentDetailsPath(alias, this); 178 } 179 180 @Override 181 public CommentDetailsPath as(Table<?> alias) { 182 return new CommentDetailsPath(alias.getQualifiedName(), this); 183 } 184 } 185 186 @Override 187 public UniqueKey<com.echothree.model.jooq.server.records.comment.CommentDetails> getPrimaryKey() { 188 return KeyRegistry.COMMENT_DETAILS_PK; 189 } 190 191 @Override 192 public List<UniqueKey<com.echothree.model.jooq.server.records.comment.CommentDetails>> getUniqueKeys() { 193 return Arrays.asList(KeyRegistry.COMMENT_DETAILS_COMMENT_AND_THRU_TIME_UK, KeyRegistry.COMMENT_DETAILS_COMMENT_NAME_AND_THRU_TIME_UK); 194 } 195 196 @Override 197 public List<ForeignKey<com.echothree.model.jooq.server.records.comment.CommentDetails, ?>> getReferences() { 198 return Arrays.asList(KeyRegistry.COMMENT_DETAILS_COMMENT_FK, KeyRegistry.COMMENT_DETAILS_COMMENT_TYPE_FK, KeyRegistry.COMMENT_DETAILS_COMMENTED_BY_ENTITY_INSTANCE_FK, KeyRegistry.COMMENT_DETAILS_COMMENTED_ENTITY_INSTANCE_FK, KeyRegistry.COMMENT_DETAILS_LANGUAGE_FK, KeyRegistry.COMMENT_DETAILS_MIME_TYPE_FK); 199 } 200 201 private transient CommentsPath _cmntdt_cmnt_commentid_fk; 202 203 /** 204 * Get the implicit join path to the <code>comments</code> table. 205 */ 206 public CommentsPath cmntdt_cmnt_commentid_fk() { 207 if (_cmntdt_cmnt_commentid_fk == null) 208 _cmntdt_cmnt_commentid_fk = new CommentsPath(this, KeyRegistry.COMMENT_DETAILS_COMMENT_FK, null); 209 210 return _cmntdt_cmnt_commentid_fk; 211 } 212 213 private transient CommentTypesPath _cmntdt_cmnttyp_commenttypeid_fk; 214 215 /** 216 * Get the implicit join path to the <code>commenttypes</code> table. 217 */ 218 public CommentTypesPath cmntdt_cmnttyp_commenttypeid_fk() { 219 if (_cmntdt_cmnttyp_commenttypeid_fk == null) 220 _cmntdt_cmnttyp_commenttypeid_fk = new CommentTypesPath(this, KeyRegistry.COMMENT_DETAILS_COMMENT_TYPE_FK, null); 221 222 return _cmntdt_cmnttyp_commenttypeid_fk; 223 } 224 225 private transient EntityInstancesPath _cmntdt_commentedbyentityinstanceid_fk; 226 227 /** 228 * Get the implicit join path to the <code>entityinstances</code> table, via 229 * the <code>cmntdt_commentedbyentityinstanceid_fk</code> key. 230 */ 231 public EntityInstancesPath cmntdt_commentedbyentityinstanceid_fk() { 232 if (_cmntdt_commentedbyentityinstanceid_fk == null) 233 _cmntdt_commentedbyentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.COMMENT_DETAILS_COMMENTED_BY_ENTITY_INSTANCE_FK, null); 234 235 return _cmntdt_commentedbyentityinstanceid_fk; 236 } 237 238 private transient EntityInstancesPath _cmntdt_commentedentityinstanceid_fk; 239 240 /** 241 * Get the implicit join path to the <code>entityinstances</code> table, via 242 * the <code>cmntdt_commentedentityinstanceid_fk</code> key. 243 */ 244 public EntityInstancesPath cmntdt_commentedentityinstanceid_fk() { 245 if (_cmntdt_commentedentityinstanceid_fk == null) 246 _cmntdt_commentedentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.COMMENT_DETAILS_COMMENTED_ENTITY_INSTANCE_FK, null); 247 248 return _cmntdt_commentedentityinstanceid_fk; 249 } 250 251 private transient LanguagesPath _cmntdt_lang_languageid_fk; 252 253 /** 254 * Get the implicit join path to the <code>languages</code> table. 255 */ 256 public LanguagesPath cmntdt_lang_languageid_fk() { 257 if (_cmntdt_lang_languageid_fk == null) 258 _cmntdt_lang_languageid_fk = new LanguagesPath(this, KeyRegistry.COMMENT_DETAILS_LANGUAGE_FK, null); 259 260 return _cmntdt_lang_languageid_fk; 261 } 262 263 private transient MimeTypesPath _cmntdt_mtyp_mimetypeid_fk; 264 265 /** 266 * Get the implicit join path to the <code>mimetypes</code> table. 267 */ 268 public MimeTypesPath cmntdt_mtyp_mimetypeid_fk() { 269 if (_cmntdt_mtyp_mimetypeid_fk == null) 270 _cmntdt_mtyp_mimetypeid_fk = new MimeTypesPath(this, KeyRegistry.COMMENT_DETAILS_MIME_TYPE_FK, null); 271 272 return _cmntdt_mtyp_mimetypeid_fk; 273 } 274 275 @Override 276 public CommentDetails as(String alias) { 277 return new CommentDetails(DSL.name(alias), this); 278 } 279 280 @Override 281 public CommentDetails as(Name alias) { 282 return new CommentDetails(alias, this); 283 } 284 285 @Override 286 public CommentDetails as(Table<?> alias) { 287 return new CommentDetails(alias.getQualifiedName(), this); 288 } 289 290 /** 291 * Rename this table 292 */ 293 @Override 294 public CommentDetails rename(String name) { 295 return new CommentDetails(DSL.name(name), null); 296 } 297 298 /** 299 * Rename this table 300 */ 301 @Override 302 public CommentDetails rename(Name name) { 303 return new CommentDetails(name, null); 304 } 305 306 /** 307 * Rename this table 308 */ 309 @Override 310 public CommentDetails rename(Table<?> name) { 311 return new CommentDetails(name.getQualifiedName(), null); 312 } 313 314 /** 315 * Create an inline derived table from this table 316 */ 317 @Override 318 public CommentDetails where(Condition condition) { 319 return new CommentDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 320 } 321 322 /** 323 * Create an inline derived table from this table 324 */ 325 @Override 326 public CommentDetails where(Collection<? extends Condition> conditions) { 327 return where(DSL.and(conditions)); 328 } 329 330 /** 331 * Create an inline derived table from this table 332 */ 333 @Override 334 public CommentDetails where(Condition... conditions) { 335 return where(DSL.and(conditions)); 336 } 337 338 /** 339 * Create an inline derived table from this table 340 */ 341 @Override 342 public CommentDetails where(Field<Boolean> condition) { 343 return where(DSL.condition(condition)); 344 } 345 346 /** 347 * Create an inline derived table from this table 348 */ 349 @Override 350 @PlainSQL 351 public CommentDetails where(SQL condition) { 352 return where(DSL.condition(condition)); 353 } 354 355 /** 356 * Create an inline derived table from this table 357 */ 358 @Override 359 @PlainSQL 360 public CommentDetails where(@Stringly.SQL String condition) { 361 return where(DSL.condition(condition)); 362 } 363 364 /** 365 * Create an inline derived table from this table 366 */ 367 @Override 368 @PlainSQL 369 public CommentDetails where(@Stringly.SQL String condition, Object... binds) { 370 return where(DSL.condition(condition, binds)); 371 } 372 373 /** 374 * Create an inline derived table from this table 375 */ 376 @Override 377 @PlainSQL 378 public CommentDetails where(@Stringly.SQL String condition, QueryPart... parts) { 379 return where(DSL.condition(condition, parts)); 380 } 381 382 /** 383 * Create an inline derived table from this table 384 */ 385 @Override 386 public CommentDetails whereExists(TableLike<?> select) { 387 return where(DSL.exists(select)); 388 } 389 390 /** 391 * Create an inline derived table from this table 392 */ 393 @Override 394 public CommentDetails whereNotExists(TableLike<?> select) { 395 return where(DSL.notExists(select)); 396 } 397}