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.InventoryConditionPK; 008import com.echothree.model.data.inventory.common.pk.PartyInventoryLevelPK; 009import com.echothree.model.data.item.common.pk.ItemPK; 010import com.echothree.model.data.party.common.pk.PartyPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath; 013import com.echothree.model.jooq.server.tables.item.Items.ItemsPath; 014import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 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.Name; 025import org.jooq.PlainSQL; 026import org.jooq.QueryPart; 027import org.jooq.SQL; 028import org.jooq.Stringly; 029import org.jooq.Table; 030import org.jooq.TableField; 031import org.jooq.TableLike; 032import org.jooq.TableOptions; 033import org.jooq.UniqueKey; 034import org.jooq.impl.DSL; 035import org.jooq.impl.Internal; 036import org.jooq.impl.SQLDataType; 037import org.jooq.impl.TableImpl; 038 039 040/** 041 * This class is generated by jOOQ. 042 */ 043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 044public class PartyInventoryLevels extends TableImpl<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels> { 045 046 private static final long serialVersionUID = 1L; 047 048 /** 049 * The reference instance of <code>partyinventorylevels</code> 050 */ 051 public static final PartyInventoryLevels PartyInventoryLevels = new PartyInventoryLevels(); 052 053 /** 054 * The class holding records for this type 055 */ 056 @Override 057 public Class<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels> getRecordType() { 058 return com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels.class; 059 } 060 061 /** 062 * The column 063 * <code>partyinventorylevels.parinvlvl_partyinventorylevelid</code>. 064 */ 065 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, PartyInventoryLevelPK> PARTY_INVENTORY_LEVEL = createField(DSL.name("parinvlvl_partyinventorylevelid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyInventoryLevelPK.class, id -> new com.echothree.model.data.inventory.common.pk.PartyInventoryLevelPK(id), primaryKey -> primaryKey.getEntityId())); 066 067 /** 068 * The column <code>partyinventorylevels.parinvlvl_par_partyid</code>. 069 */ 070 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, PartyPK> PARTY = createField(DSL.name("parinvlvl_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())); 071 072 /** 073 * The column <code>partyinventorylevels.parinvlvl_itm_itemid</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, ItemPK> ITEM = createField(DSL.name("parinvlvl_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 079 * <code>partyinventorylevels.parinvlvl_invcon_inventoryconditionid</code>. 080 */ 081 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("parinvlvl_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())); 082 083 /** 084 * The column <code>partyinventorylevels.parinvlvl_minimuminventory</code>. 085 */ 086 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, Long> MINIMUM_INVENTORY = createField(DSL.name("parinvlvl_minimuminventory"), SQLDataType.BIGINT, this, ""); 087 088 /** 089 * The column <code>partyinventorylevels.parinvlvl_maximuminventory</code>. 090 */ 091 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, Long> MAXIMUM_INVENTORY = createField(DSL.name("parinvlvl_maximuminventory"), SQLDataType.BIGINT, this, ""); 092 093 /** 094 * The column <code>partyinventorylevels.parinvlvl_reorderquantity</code>. 095 */ 096 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, Long> REORDER_QUANTITY = createField(DSL.name("parinvlvl_reorderquantity"), SQLDataType.BIGINT, this, ""); 097 098 /** 099 * The column <code>partyinventorylevels.parinvlvl_fromtime</code>. 100 */ 101 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, Long> FROM_TIME = createField(DSL.name("parinvlvl_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 102 103 /** 104 * The column <code>partyinventorylevels.parinvlvl_thrutime</code>. 105 */ 106 public final TableField<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, Long> THRU_TIME = createField(DSL.name("parinvlvl_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 107 108 private PartyInventoryLevels(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels> aliased) { 109 this(alias, aliased, (Field<?>[]) null, null); 110 } 111 112 private PartyInventoryLevels(Name alias, Table<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels> aliased, Field<?>[] parameters, Condition where) { 113 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 114 } 115 116 /** 117 * Create an aliased <code>partyinventorylevels</code> table reference 118 */ 119 public PartyInventoryLevels(String alias) { 120 this(DSL.name(alias), PartyInventoryLevels); 121 } 122 123 /** 124 * Create an aliased <code>partyinventorylevels</code> table reference 125 */ 126 public PartyInventoryLevels(Name alias) { 127 this(alias, PartyInventoryLevels); 128 } 129 130 /** 131 * Create a <code>partyinventorylevels</code> table reference 132 */ 133 public PartyInventoryLevels() { 134 this(DSL.name("partyinventorylevels"), null); 135 } 136 137 @Override 138 public UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels> getPrimaryKey() { 139 return KeyRegistry.PARTY_INVENTORY_LEVELS_PK; 140 } 141 142 @Override 143 public List<UniqueKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels>> getUniqueKeys() { 144 return Arrays.asList(KeyRegistry.PARTY_INVENTORY_LEVELS_PARTY_AND_ITEM_AND_INVENTORY_CONDITION_AND_THRU_TIME_UK); 145 } 146 147 @Override 148 public List<ForeignKey<com.echothree.model.jooq.server.records.inventory.PartyInventoryLevels, ?>> getReferences() { 149 return Arrays.asList(KeyRegistry.PARTY_INVENTORY_LEVELS_INVENTORY_CONDITION_FK, KeyRegistry.PARTY_INVENTORY_LEVELS_ITEM_FK, KeyRegistry.PARTY_INVENTORY_LEVELS_PARTY_FK); 150 } 151 152 private transient InventoryConditionsPath _parinvlvl_invcon_inventoryconditionid_fk; 153 154 /** 155 * Get the implicit join path to the <code>inventoryconditions</code> table. 156 */ 157 public InventoryConditionsPath parinvlvl_invcon_inventoryconditionid_fk() { 158 if (_parinvlvl_invcon_inventoryconditionid_fk == null) 159 _parinvlvl_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.PARTY_INVENTORY_LEVELS_INVENTORY_CONDITION_FK, null); 160 161 return _parinvlvl_invcon_inventoryconditionid_fk; 162 } 163 164 private transient ItemsPath _parinvlvl_itm_itemid_fk; 165 166 /** 167 * Get the implicit join path to the <code>items</code> table. 168 */ 169 public ItemsPath parinvlvl_itm_itemid_fk() { 170 if (_parinvlvl_itm_itemid_fk == null) 171 _parinvlvl_itm_itemid_fk = new ItemsPath(this, KeyRegistry.PARTY_INVENTORY_LEVELS_ITEM_FK, null); 172 173 return _parinvlvl_itm_itemid_fk; 174 } 175 176 private transient PartiesPath _parinvlvl_par_partyid_fk; 177 178 /** 179 * Get the implicit join path to the <code>parties</code> table. 180 */ 181 public PartiesPath parinvlvl_par_partyid_fk() { 182 if (_parinvlvl_par_partyid_fk == null) 183 _parinvlvl_par_partyid_fk = new PartiesPath(this, KeyRegistry.PARTY_INVENTORY_LEVELS_PARTY_FK, null); 184 185 return _parinvlvl_par_partyid_fk; 186 } 187 188 @Override 189 public PartyInventoryLevels as(String alias) { 190 return new PartyInventoryLevels(DSL.name(alias), this); 191 } 192 193 @Override 194 public PartyInventoryLevels as(Name alias) { 195 return new PartyInventoryLevels(alias, this); 196 } 197 198 @Override 199 public PartyInventoryLevels as(Table<?> alias) { 200 return new PartyInventoryLevels(alias.getQualifiedName(), this); 201 } 202 203 /** 204 * Rename this table 205 */ 206 @Override 207 public PartyInventoryLevels rename(String name) { 208 return new PartyInventoryLevels(DSL.name(name), null); 209 } 210 211 /** 212 * Rename this table 213 */ 214 @Override 215 public PartyInventoryLevels rename(Name name) { 216 return new PartyInventoryLevels(name, null); 217 } 218 219 /** 220 * Rename this table 221 */ 222 @Override 223 public PartyInventoryLevels rename(Table<?> name) { 224 return new PartyInventoryLevels(name.getQualifiedName(), null); 225 } 226 227 /** 228 * Create an inline derived table from this table 229 */ 230 @Override 231 public PartyInventoryLevels where(Condition condition) { 232 return new PartyInventoryLevels(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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels 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 PartyInventoryLevels whereNotExists(TableLike<?> select) { 308 return where(DSL.notExists(select)); 309 } 310}