001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.offer; 005 006 007import com.echothree.model.data.item.common.pk.ItemPK; 008import com.echothree.model.data.offer.common.pk.OfferItemPK; 009import com.echothree.model.data.offer.common.pk.OfferPK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.item.Items.ItemsPath; 012import com.echothree.model.jooq.server.tables.offer.Offers.OffersPath; 013 014import java.util.Arrays; 015import java.util.Collection; 016import java.util.List; 017 018import org.jooq.Condition; 019import org.jooq.Converter; 020import org.jooq.Field; 021import org.jooq.ForeignKey; 022import org.jooq.InverseForeignKey; 023import org.jooq.Name; 024import org.jooq.Path; 025import org.jooq.PlainSQL; 026import org.jooq.QueryPart; 027import org.jooq.Record; 028import org.jooq.SQL; 029import org.jooq.Stringly; 030import org.jooq.Table; 031import org.jooq.TableField; 032import org.jooq.TableLike; 033import org.jooq.TableOptions; 034import org.jooq.UniqueKey; 035import org.jooq.impl.DSL; 036import org.jooq.impl.Internal; 037import org.jooq.impl.SQLDataType; 038import org.jooq.impl.TableImpl; 039 040 041/** 042 * This class is generated by jOOQ. 043 */ 044@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 045public class OfferItems extends TableImpl<com.echothree.model.jooq.server.records.offer.OfferItems> { 046 047 private static final long serialVersionUID = 1L; 048 049 /** 050 * The reference instance of <code>offeritems</code> 051 */ 052 public static final OfferItems OfferItems = new OfferItems(); 053 054 /** 055 * The class holding records for this type 056 */ 057 @Override 058 public Class<com.echothree.model.jooq.server.records.offer.OfferItems> getRecordType() { 059 return com.echothree.model.jooq.server.records.offer.OfferItems.class; 060 } 061 062 /** 063 * The column <code>offeritems.ofri_offeritemid</code>. 064 */ 065 public final TableField<com.echothree.model.jooq.server.records.offer.OfferItems, OfferItemPK> OFFER_ITEM = createField(DSL.name("ofri_offeritemid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OfferItemPK.class, id -> new com.echothree.model.data.offer.common.pk.OfferItemPK(id), primaryKey -> primaryKey.getEntityId())); 066 067 /** 068 * The column <code>offeritems.ofri_ofr_offerid</code>. 069 */ 070 public final TableField<com.echothree.model.jooq.server.records.offer.OfferItems, OfferPK> OFFER = createField(DSL.name("ofri_ofr_offerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OfferPK.class, id -> new com.echothree.model.data.offer.common.pk.OfferPK(id), primaryKey -> primaryKey.getEntityId())); 071 072 /** 073 * The column <code>offeritems.ofri_itm_itemid</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.offer.OfferItems, ItemPK> ITEM = createField(DSL.name("ofri_itm_itemid"), 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())); 076 077 /** 078 * The column <code>offeritems.ofri_fromtime</code>. 079 */ 080 public final TableField<com.echothree.model.jooq.server.records.offer.OfferItems, Long> FROM_TIME = createField(DSL.name("ofri_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 081 082 /** 083 * The column <code>offeritems.ofri_thrutime</code>. 084 */ 085 public final TableField<com.echothree.model.jooq.server.records.offer.OfferItems, Long> THRU_TIME = createField(DSL.name("ofri_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 086 087 private OfferItems(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferItems> aliased) { 088 this(alias, aliased, (Field<?>[]) null, null); 089 } 090 091 private OfferItems(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferItems> aliased, Field<?>[] parameters, Condition where) { 092 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 093 } 094 095 /** 096 * Create an aliased <code>offeritems</code> table reference 097 */ 098 public OfferItems(String alias) { 099 this(DSL.name(alias), OfferItems); 100 } 101 102 /** 103 * Create an aliased <code>offeritems</code> table reference 104 */ 105 public OfferItems(Name alias) { 106 this(alias, OfferItems); 107 } 108 109 /** 110 * Create a <code>offeritems</code> table reference 111 */ 112 public OfferItems() { 113 this(DSL.name("offeritems"), null); 114 } 115 116 public <O extends Record> OfferItems(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferItems> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferItems> parentPath) { 117 super(path, childPath, parentPath, OfferItems); 118 } 119 120 /** 121 * A subtype implementing {@link Path} for simplified path-based joins. 122 */ 123 public static class OfferItemsPath extends OfferItems implements Path<com.echothree.model.jooq.server.records.offer.OfferItems> { 124 125 private static final long serialVersionUID = 1L; 126 public <O extends Record> OfferItemsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferItems> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.offer.OfferItems> parentPath) { 127 super(path, childPath, parentPath); 128 } 129 private OfferItemsPath(Name alias, Table<com.echothree.model.jooq.server.records.offer.OfferItems> aliased) { 130 super(alias, aliased); 131 } 132 133 @Override 134 public OfferItemsPath as(String alias) { 135 return new OfferItemsPath(DSL.name(alias), this); 136 } 137 138 @Override 139 public OfferItemsPath as(Name alias) { 140 return new OfferItemsPath(alias, this); 141 } 142 143 @Override 144 public OfferItemsPath as(Table<?> alias) { 145 return new OfferItemsPath(alias.getQualifiedName(), this); 146 } 147 } 148 149 @Override 150 public UniqueKey<com.echothree.model.jooq.server.records.offer.OfferItems> getPrimaryKey() { 151 return KeyRegistry.OFFER_ITEMS_PK; 152 } 153 154 @Override 155 public List<UniqueKey<com.echothree.model.jooq.server.records.offer.OfferItems>> getUniqueKeys() { 156 return Arrays.asList(KeyRegistry.OFFER_ITEMS_OFFER_AND_ITEM_AND_THRU_TIME_UK); 157 } 158 159 @Override 160 public List<ForeignKey<com.echothree.model.jooq.server.records.offer.OfferItems, ?>> getReferences() { 161 return Arrays.asList(KeyRegistry.OFFER_ITEMS_ITEM_FK, KeyRegistry.OFFER_ITEMS_OFFER_FK); 162 } 163 164 private transient ItemsPath _ofri_itm_itemid_fk; 165 166 /** 167 * Get the implicit join path to the <code>items</code> table. 168 */ 169 public ItemsPath ofri_itm_itemid_fk() { 170 if (_ofri_itm_itemid_fk == null) 171 _ofri_itm_itemid_fk = new ItemsPath(this, KeyRegistry.OFFER_ITEMS_ITEM_FK, null); 172 173 return _ofri_itm_itemid_fk; 174 } 175 176 private transient OffersPath _ofri_ofr_offerid_fk; 177 178 /** 179 * Get the implicit join path to the <code>offers</code> table. 180 */ 181 public OffersPath ofri_ofr_offerid_fk() { 182 if (_ofri_ofr_offerid_fk == null) 183 _ofri_ofr_offerid_fk = new OffersPath(this, KeyRegistry.OFFER_ITEMS_OFFER_FK, null); 184 185 return _ofri_ofr_offerid_fk; 186 } 187 188 @Override 189 public OfferItems as(String alias) { 190 return new OfferItems(DSL.name(alias), this); 191 } 192 193 @Override 194 public OfferItems as(Name alias) { 195 return new OfferItems(alias, this); 196 } 197 198 @Override 199 public OfferItems as(Table<?> alias) { 200 return new OfferItems(alias.getQualifiedName(), this); 201 } 202 203 /** 204 * Rename this table 205 */ 206 @Override 207 public OfferItems rename(String name) { 208 return new OfferItems(DSL.name(name), null); 209 } 210 211 /** 212 * Rename this table 213 */ 214 @Override 215 public OfferItems rename(Name name) { 216 return new OfferItems(name, null); 217 } 218 219 /** 220 * Rename this table 221 */ 222 @Override 223 public OfferItems rename(Table<?> name) { 224 return new OfferItems(name.getQualifiedName(), null); 225 } 226 227 /** 228 * Create an inline derived table from this table 229 */ 230 @Override 231 public OfferItems where(Condition condition) { 232 return new OfferItems(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 233 } 234 235 /** 236 * Create an inline derived table from this table 237 */ 238 @Override 239 public OfferItems where(Collection<? extends Condition> conditions) { 240 return where(DSL.and(conditions)); 241 } 242 243 /** 244 * Create an inline derived table from this table 245 */ 246 @Override 247 public OfferItems where(Condition... conditions) { 248 return where(DSL.and(conditions)); 249 } 250 251 /** 252 * Create an inline derived table from this table 253 */ 254 @Override 255 public OfferItems where(Field<Boolean> condition) { 256 return where(DSL.condition(condition)); 257 } 258 259 /** 260 * Create an inline derived table from this table 261 */ 262 @Override 263 @PlainSQL 264 public OfferItems where(SQL condition) { 265 return where(DSL.condition(condition)); 266 } 267 268 /** 269 * Create an inline derived table from this table 270 */ 271 @Override 272 @PlainSQL 273 public OfferItems where(@Stringly.SQL String condition) { 274 return where(DSL.condition(condition)); 275 } 276 277 /** 278 * Create an inline derived table from this table 279 */ 280 @Override 281 @PlainSQL 282 public OfferItems where(@Stringly.SQL String condition, Object... binds) { 283 return where(DSL.condition(condition, binds)); 284 } 285 286 /** 287 * Create an inline derived table from this table 288 */ 289 @Override 290 @PlainSQL 291 public OfferItems where(@Stringly.SQL String condition, QueryPart... parts) { 292 return where(DSL.condition(condition, parts)); 293 } 294 295 /** 296 * Create an inline derived table from this table 297 */ 298 @Override 299 public OfferItems whereExists(TableLike<?> select) { 300 return where(DSL.exists(select)); 301 } 302 303 /** 304 * Create an inline derived table from this table 305 */ 306 @Override 307 public OfferItems whereNotExists(TableLike<?> select) { 308 return where(DSL.notExists(select)); 309 } 310}