001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.inventory; 005 006 007import com.echothree.model.data.inventory.common.pk.InventoryBucketTypePK; 008import com.echothree.model.data.inventory.common.pk.InventoryConditionPK; 009import com.echothree.model.data.inventory.common.pk.PartyBucketPK; 010import com.echothree.model.data.item.common.pk.ItemPK; 011import com.echothree.model.data.party.common.pk.PartyPK; 012import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK; 013import com.echothree.model.jooq.server.KeyRegistry; 014import com.echothree.model.jooq.server.tables.inventory.InventoryBucketTypes.InventoryBucketTypesPath; 015import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath; 016import com.echothree.model.jooq.server.tables.item.Items.ItemsPath; 017import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 018import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath; 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.Name; 029import org.jooq.PlainSQL; 030import org.jooq.QueryPart; 031import org.jooq.SQL; 032import org.jooq.Stringly; 033import org.jooq.Table; 034import org.jooq.TableField; 035import org.jooq.TableLike; 036import org.jooq.TableOptions; 037import org.jooq.UniqueKey; 038import org.jooq.impl.DSL; 039import org.jooq.impl.Internal; 040import org.jooq.impl.SQLDataType; 041import org.jooq.impl.TableImpl; 042 043 044/** 045 * This class is generated by jOOQ. 046 */ 047@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 048public class PartyBuckets extends TableImpl<com.echothree.model.jooq.server.records.inventory.PartyBuckets> { 049 050 private static final long serialVersionUID = 1L; 051 052 /** 053 * The reference instance of <code>partybuckets</code> 054 */ 055 public static final PartyBuckets PartyBuckets = new PartyBuckets(); 056 057 /** 058 * The class holding records for this type 059 */ 060 @Override 061 public Class<com.echothree.model.jooq.server.records.inventory.PartyBuckets> getRecordType() { 062 return com.echothree.model.jooq.server.records.inventory.PartyBuckets.class; 063 } 064 065 /** 066 * The column <code>partybuckets.parbckt_partybucketid</code>. 067 */ 068 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, PartyBucketPK> PARTY_BUCKET = createField(DSL.name("parbckt_partybucketid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyBucketPK.class, id -> new com.echothree.model.data.inventory.common.pk.PartyBucketPK(id), primaryKey -> primaryKey.getEntityId())); 069 070 /** 071 * The column <code>partybuckets.parbckt_par_partyid</code>. 072 */ 073 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, PartyPK> PARTY = createField(DSL.name("parbckt_par_partyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId())); 074 075 /** 076 * The column <code>partybuckets.parbckt_itm_itemid</code>. 077 */ 078 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, ItemPK> ITEM = createField(DSL.name("parbckt_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())); 079 080 /** 081 * The column <code>partybuckets.parbckt_uomt_unitofmeasuretypeid</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("parbckt_uomt_unitofmeasuretypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, UnitOfMeasureTypePK.class, id -> new com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK(id), primaryKey -> primaryKey.getEntityId())); 084 085 /** 086 * The column <code>partybuckets.parbckt_invcon_inventoryconditionid</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("parbckt_invcon_inventoryconditionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryConditionPK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryConditionPK(id), primaryKey -> primaryKey.getEntityId())); 089 090 /** 091 * The column 092 * <code>partybuckets.parbckt_invbckttyp_inventorybuckettypeid</code>. 093 */ 094 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, InventoryBucketTypePK> INVENTORY_BUCKET_TYPE = createField(DSL.name("parbckt_invbckttyp_inventorybuckettypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InventoryBucketTypePK.class, id -> new com.echothree.model.data.inventory.common.pk.InventoryBucketTypePK(id), primaryKey -> primaryKey.getEntityId())); 095 096 /** 097 * The column <code>partybuckets.parbckt_quantity</code>. 098 */ 099 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyBuckets, Long> QUANTITY = createField(DSL.name("parbckt_quantity"), SQLDataType.BIGINT.nullable(false), this, ""); 100 101 private PartyBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyBuckets> aliased) { 102 this(alias, aliased, (Field<?>[]) null, null); 103 } 104 105 private PartyBuckets(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyBuckets> aliased, Field<?>[] parameters, Condition where) { 106 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 107 } 108 109 /** 110 * Create an aliased <code>partybuckets</code> table reference 111 */ 112 public PartyBuckets(String alias) { 113 this(DSL.name(alias), PartyBuckets); 114 } 115 116 /** 117 * Create an aliased <code>partybuckets</code> table reference 118 */ 119 public PartyBuckets(Name alias) { 120 this(alias, PartyBuckets); 121 } 122 123 /** 124 * Create a <code>partybuckets</code> table reference 125 */ 126 public PartyBuckets() { 127 this(DSL.name("partybuckets"), null); 128 } 129 130 @Override 131 public UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyBuckets> getPrimaryKey() { 132 return KeyRegistry.PARTY_BUCKETS_PK; 133 } 134 135 @Override 136 public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyBuckets>> getUniqueKeys() { 137 return Arrays.asList(KeyRegistry.PARTY_BUCKETS_PARTY_AND_ITEM_AND_UNIT_OF_MEASURE_TYPE_AND_INVENTORY_CONDITION_AND_INVENTORY_BUCKET_TYPE_UK); 138 } 139 140 @Override 141 public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.PartyBuckets, ?>> getReferences() { 142 return Arrays.asList(KeyRegistry.PARTY_BUCKETS_INVENTORY_BUCKET_TYPE_FK, KeyRegistry.PARTY_BUCKETS_INVENTORY_CONDITION_FK, KeyRegistry.PARTY_BUCKETS_ITEM_FK, KeyRegistry.PARTY_BUCKETS_PARTY_FK, KeyRegistry.PARTY_BUCKETS_UNIT_OF_MEASURE_TYPE_FK); 143 } 144 145 private transient InventoryBucketTypesPath _parbckt_invbckttyp_inventorybuckettypeid_fk; 146 147 /** 148 * Get the implicit join path to the <code>inventorybuckettypes</code> 149 * table. 150 */ 151 public InventoryBucketTypesPath parbckt_invbckttyp_inventorybuckettypeid_fk() { 152 if (_parbckt_invbckttyp_inventorybuckettypeid_fk == null) 153 _parbckt_invbckttyp_inventorybuckettypeid_fk = new InventoryBucketTypesPath(this, KeyRegistry.PARTY_BUCKETS_INVENTORY_BUCKET_TYPE_FK, null); 154 155 return _parbckt_invbckttyp_inventorybuckettypeid_fk; 156 } 157 158 private transient InventoryConditionsPath _parbckt_invcon_inventoryconditionid_fk; 159 160 /** 161 * Get the implicit join path to the <code>inventoryconditions</code> table. 162 */ 163 public InventoryConditionsPath parbckt_invcon_inventoryconditionid_fk() { 164 if (_parbckt_invcon_inventoryconditionid_fk == null) 165 _parbckt_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.PARTY_BUCKETS_INVENTORY_CONDITION_FK, null); 166 167 return _parbckt_invcon_inventoryconditionid_fk; 168 } 169 170 private transient ItemsPath _parbckt_itm_itemid_fk; 171 172 /** 173 * Get the implicit join path to the <code>items</code> table. 174 */ 175 public ItemsPath parbckt_itm_itemid_fk() { 176 if (_parbckt_itm_itemid_fk == null) 177 _parbckt_itm_itemid_fk = new ItemsPath(this, KeyRegistry.PARTY_BUCKETS_ITEM_FK, null); 178 179 return _parbckt_itm_itemid_fk; 180 } 181 182 private transient PartiesPath _parbckt_par_partyid_fk; 183 184 /** 185 * Get the implicit join path to the <code>parties</code> table. 186 */ 187 public PartiesPath parbckt_par_partyid_fk() { 188 if (_parbckt_par_partyid_fk == null) 189 _parbckt_par_partyid_fk = new PartiesPath(this, KeyRegistry.PARTY_BUCKETS_PARTY_FK, null); 190 191 return _parbckt_par_partyid_fk; 192 } 193 194 private transient UnitOfMeasureTypesPath _parbckt_uomt_unitofmeasuretypeid_fk; 195 196 /** 197 * Get the implicit join path to the <code>unitofmeasuretypes</code> table. 198 */ 199 public UnitOfMeasureTypesPath parbckt_uomt_unitofmeasuretypeid_fk() { 200 if (_parbckt_uomt_unitofmeasuretypeid_fk == null) 201 _parbckt_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.PARTY_BUCKETS_UNIT_OF_MEASURE_TYPE_FK, null); 202 203 return _parbckt_uomt_unitofmeasuretypeid_fk; 204 } 205 206 @Override 207 public PartyBuckets as(String alias) { 208 return new PartyBuckets(DSL.name(alias), this); 209 } 210 211 @Override 212 public PartyBuckets as(Name alias) { 213 return new PartyBuckets(alias, this); 214 } 215 216 @Override 217 public PartyBuckets as(Table<?> alias) { 218 return new PartyBuckets(alias.getQualifiedName(), this); 219 } 220 221 /** 222 * Rename this table 223 */ 224 @Override 225 public PartyBuckets rename(String name) { 226 return new PartyBuckets(DSL.name(name), null); 227 } 228 229 /** 230 * Rename this table 231 */ 232 @Override 233 public PartyBuckets rename(Name name) { 234 return new PartyBuckets(name, null); 235 } 236 237 /** 238 * Rename this table 239 */ 240 @Override 241 public PartyBuckets rename(Table<?> name) { 242 return new PartyBuckets(name.getQualifiedName(), null); 243 } 244 245 /** 246 * Create an inline derived table from this table 247 */ 248 @Override 249 public PartyBuckets where(Condition condition) { 250 return new PartyBuckets(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 251 } 252 253 /** 254 * Create an inline derived table from this table 255 */ 256 @Override 257 public PartyBuckets where(Collection<? extends Condition> conditions) { 258 return where(DSL.and(conditions)); 259 } 260 261 /** 262 * Create an inline derived table from this table 263 */ 264 @Override 265 public PartyBuckets where(Condition... conditions) { 266 return where(DSL.and(conditions)); 267 } 268 269 /** 270 * Create an inline derived table from this table 271 */ 272 @Override 273 public PartyBuckets where(Field<Boolean> 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 PartyBuckets where(SQL condition) { 283 return where(DSL.condition(condition)); 284 } 285 286 /** 287 * Create an inline derived table from this table 288 */ 289 @Override 290 @PlainSQL 291 public PartyBuckets where(@Stringly.SQL String condition) { 292 return where(DSL.condition(condition)); 293 } 294 295 /** 296 * Create an inline derived table from this table 297 */ 298 @Override 299 @PlainSQL 300 public PartyBuckets where(@Stringly.SQL String condition, Object... binds) { 301 return where(DSL.condition(condition, binds)); 302 } 303 304 /** 305 * Create an inline derived table from this table 306 */ 307 @Override 308 @PlainSQL 309 public PartyBuckets where(@Stringly.SQL String condition, QueryPart... parts) { 310 return where(DSL.condition(condition, parts)); 311 } 312 313 /** 314 * Create an inline derived table from this table 315 */ 316 @Override 317 public PartyBuckets whereExists(TableLike<?> select) { 318 return where(DSL.exists(select)); 319 } 320 321 /** 322 * Create an inline derived table from this table 323 */ 324 @Override 325 public PartyBuckets whereNotExists(TableLike<?> select) { 326 return where(DSL.notExists(select)); 327 } 328}