001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.item; 005 006 007import com.echothree.model.data.item.common.pk.ItemPK; 008import com.echothree.model.data.item.common.pk.RelatedItemDetailPK; 009import com.echothree.model.data.item.common.pk.RelatedItemPK; 010import com.echothree.model.data.item.common.pk.RelatedItemTypePK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.item.Items.ItemsPath; 013import com.echothree.model.jooq.server.tables.item.RelatedItemTypes.RelatedItemTypesPath; 014import com.echothree.model.jooq.server.tables.item.RelatedItems.RelatedItemsPath; 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 RelatedItemDetails extends TableImpl<com.echothree.model.jooq.server.records.item.RelatedItemDetails> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>relateditemdetails</code> 053 */ 054 public static final RelatedItemDetails RelatedItemDetails = new RelatedItemDetails(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.item.RelatedItemDetails> getRecordType() { 061 return com.echothree.model.jooq.server.records.item.RelatedItemDetails.class; 062 } 063 064 /** 065 * The column <code>relateditemdetails.rltidt_relateditemdetailid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, RelatedItemDetailPK> RELATED_ITEM_DETAIL = createField(DSL.name("rltidt_relateditemdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RelatedItemDetailPK.class, id -> new com.echothree.model.data.item.common.pk.RelatedItemDetailPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>relateditemdetails.rltidt_rlti_relateditemid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, RelatedItemPK> RELATED_ITEM = createField(DSL.name("rltidt_rlti_relateditemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RelatedItemPK.class, id -> new com.echothree.model.data.item.common.pk.RelatedItemPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column 076 * <code>relateditemdetails.rltidt_rltityp_relateditemtypeid</code>. 077 */ 078 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, RelatedItemTypePK> RELATED_ITEM_TYPE = createField(DSL.name("rltidt_rltityp_relateditemtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RelatedItemTypePK.class, id -> new com.echothree.model.data.item.common.pk.RelatedItemTypePK(id), primaryKey -> primaryKey.getEntityId())); 079 080 /** 081 * The column <code>relateditemdetails.rltidt_fromitemid</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, ItemPK> FROM_ITEM = createField(DSL.name("rltidt_fromitemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemPK.class, id -> new com.echothree.model.data.item.common.pk.ItemPK(id), primaryKey -> primaryKey.getEntityId())); 084 085 /** 086 * The column <code>relateditemdetails.rltidt_toitemid</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, ItemPK> TO_ITEM = createField(DSL.name("rltidt_toitemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ItemPK.class, id -> new com.echothree.model.data.item.common.pk.ItemPK(id), primaryKey -> primaryKey.getEntityId())); 089 090 /** 091 * The column <code>relateditemdetails.rltidt_sortorder</code>. 092 */ 093 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, Integer> SORT_ORDER = createField(DSL.name("rltidt_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 094 095 /** 096 * The column <code>relateditemdetails.rltidt_fromtime</code>. 097 */ 098 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, Long> FROM_TIME = createField(DSL.name("rltidt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 099 100 /** 101 * The column <code>relateditemdetails.rltidt_thrutime</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.item.RelatedItemDetails, Long> THRU_TIME = createField(DSL.name("rltidt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 104 105 private RelatedItemDetails(Name alias, Table<com.echothree.model.jooq.server.records.item.RelatedItemDetails> aliased) { 106 this(alias, aliased, (Field<?>[]) null, null); 107 } 108 109 private RelatedItemDetails(Name alias, Table<com.echothree.model.jooq.server.records.item.RelatedItemDetails> aliased, Field<?>[] parameters, Condition where) { 110 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 111 } 112 113 /** 114 * Create an aliased <code>relateditemdetails</code> table reference 115 */ 116 public RelatedItemDetails(String alias) { 117 this(DSL.name(alias), RelatedItemDetails); 118 } 119 120 /** 121 * Create an aliased <code>relateditemdetails</code> table reference 122 */ 123 public RelatedItemDetails(Name alias) { 124 this(alias, RelatedItemDetails); 125 } 126 127 /** 128 * Create a <code>relateditemdetails</code> table reference 129 */ 130 public RelatedItemDetails() { 131 this(DSL.name("relateditemdetails"), null); 132 } 133 134 public <O extends Record> RelatedItemDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.RelatedItemDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.RelatedItemDetails> parentPath) { 135 super(path, childPath, parentPath, RelatedItemDetails); 136 } 137 138 /** 139 * A subtype implementing {@link Path} for simplified path-based joins. 140 */ 141 public static class RelatedItemDetailsPath extends RelatedItemDetails implements Path<com.echothree.model.jooq.server.records.item.RelatedItemDetails> { 142 143 private static final long serialVersionUID = 1L; 144 public <O extends Record> RelatedItemDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.RelatedItemDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.RelatedItemDetails> parentPath) { 145 super(path, childPath, parentPath); 146 } 147 private RelatedItemDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.item.RelatedItemDetails> aliased) { 148 super(alias, aliased); 149 } 150 151 @Override 152 public RelatedItemDetailsPath as(String alias) { 153 return new RelatedItemDetailsPath(DSL.name(alias), this); 154 } 155 156 @Override 157 public RelatedItemDetailsPath as(Name alias) { 158 return new RelatedItemDetailsPath(alias, this); 159 } 160 161 @Override 162 public RelatedItemDetailsPath as(Table<?> alias) { 163 return new RelatedItemDetailsPath(alias.getQualifiedName(), this); 164 } 165 } 166 167 @Override 168 public UniqueKey<com.echothree.model.jooq.server.records.item.RelatedItemDetails> getPrimaryKey() { 169 return KeyRegistry.RELATED_ITEM_DETAILS_PK; 170 } 171 172 @Override 173 public List<UniqueKey<com.echothree.model.jooq.server.records.item.RelatedItemDetails>> getUniqueKeys() { 174 return Arrays.asList(KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_AND_THRU_TIME_UK, KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_TYPE_AND_FROM_ITEM_AND_TO_ITEM_AND_THRU_TIME_UK); 175 } 176 177 @Override 178 public List<ForeignKey<com.echothree.model.jooq.server.records.item.RelatedItemDetails, ?>> getReferences() { 179 return Arrays.asList(KeyRegistry.RELATED_ITEM_DETAILS_FROM_ITEM_FK, KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_FK, KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_TYPE_FK, KeyRegistry.RELATED_ITEM_DETAILS_TO_ITEM_FK); 180 } 181 182 private transient ItemsPath _rltidt_fromitemid_fk; 183 184 /** 185 * Get the implicit join path to the <code>items</code> table, via the 186 * <code>rltidt_fromitemid_fk</code> key. 187 */ 188 public ItemsPath rltidt_fromitemid_fk() { 189 if (_rltidt_fromitemid_fk == null) 190 _rltidt_fromitemid_fk = new ItemsPath(this, KeyRegistry.RELATED_ITEM_DETAILS_FROM_ITEM_FK, null); 191 192 return _rltidt_fromitemid_fk; 193 } 194 195 private transient RelatedItemsPath _rltidt_rlti_relateditemid_fk; 196 197 /** 198 * Get the implicit join path to the <code>relateditems</code> table. 199 */ 200 public RelatedItemsPath rltidt_rlti_relateditemid_fk() { 201 if (_rltidt_rlti_relateditemid_fk == null) 202 _rltidt_rlti_relateditemid_fk = new RelatedItemsPath(this, KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_FK, null); 203 204 return _rltidt_rlti_relateditemid_fk; 205 } 206 207 private transient RelatedItemTypesPath _rltidt_rltityp_relateditemtypeid_fk; 208 209 /** 210 * Get the implicit join path to the <code>relateditemtypes</code> table. 211 */ 212 public RelatedItemTypesPath rltidt_rltityp_relateditemtypeid_fk() { 213 if (_rltidt_rltityp_relateditemtypeid_fk == null) 214 _rltidt_rltityp_relateditemtypeid_fk = new RelatedItemTypesPath(this, KeyRegistry.RELATED_ITEM_DETAILS_RELATED_ITEM_TYPE_FK, null); 215 216 return _rltidt_rltityp_relateditemtypeid_fk; 217 } 218 219 private transient ItemsPath _rltidt_toitemid_fk; 220 221 /** 222 * Get the implicit join path to the <code>items</code> table, via the 223 * <code>rltidt_toitemid_fk</code> key. 224 */ 225 public ItemsPath rltidt_toitemid_fk() { 226 if (_rltidt_toitemid_fk == null) 227 _rltidt_toitemid_fk = new ItemsPath(this, KeyRegistry.RELATED_ITEM_DETAILS_TO_ITEM_FK, null); 228 229 return _rltidt_toitemid_fk; 230 } 231 232 @Override 233 public RelatedItemDetails as(String alias) { 234 return new RelatedItemDetails(DSL.name(alias), this); 235 } 236 237 @Override 238 public RelatedItemDetails as(Name alias) { 239 return new RelatedItemDetails(alias, this); 240 } 241 242 @Override 243 public RelatedItemDetails as(Table<?> alias) { 244 return new RelatedItemDetails(alias.getQualifiedName(), this); 245 } 246 247 /** 248 * Rename this table 249 */ 250 @Override 251 public RelatedItemDetails rename(String name) { 252 return new RelatedItemDetails(DSL.name(name), null); 253 } 254 255 /** 256 * Rename this table 257 */ 258 @Override 259 public RelatedItemDetails rename(Name name) { 260 return new RelatedItemDetails(name, null); 261 } 262 263 /** 264 * Rename this table 265 */ 266 @Override 267 public RelatedItemDetails rename(Table<?> name) { 268 return new RelatedItemDetails(name.getQualifiedName(), null); 269 } 270 271 /** 272 * Create an inline derived table from this table 273 */ 274 @Override 275 public RelatedItemDetails where(Condition condition) { 276 return new RelatedItemDetails(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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails 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 RelatedItemDetails whereNotExists(TableLike<?> select) { 352 return where(DSL.notExists(select)); 353 } 354}