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