001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.vendor; 005 006 007import com.echothree.model.data.accounting.common.pk.GlAccountPK; 008import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK; 009import com.echothree.model.data.filter.common.pk.FilterPK; 010import com.echothree.model.data.item.common.pk.ItemAliasTypePK; 011import com.echothree.model.data.party.common.pk.PartyPK; 012import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK; 013import com.echothree.model.data.selector.common.pk.SelectorPK; 014import com.echothree.model.data.vendor.common.pk.VendorPK; 015import com.echothree.model.data.vendor.common.pk.VendorTypePK; 016import com.echothree.model.jooq.server.KeyRegistry; 017import com.echothree.model.jooq.server.tables.accounting.GlAccounts.GlAccountsPath; 018import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationPolicies.CancellationPoliciesPath; 019import com.echothree.model.jooq.server.tables.filter.Filters.FiltersPath; 020import com.echothree.model.jooq.server.tables.item.ItemAliasTypes.ItemAliasTypesPath; 021import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 022import com.echothree.model.jooq.server.tables.returnpolicy.ReturnPolicies.ReturnPoliciesPath; 023import com.echothree.model.jooq.server.tables.selector.Selectors.SelectorsPath; 024import com.echothree.model.jooq.server.tables.vendor.VendorTypes.VendorTypesPath; 025 026import java.util.Arrays; 027import java.util.Collection; 028import java.util.List; 029 030import org.jooq.Condition; 031import org.jooq.Converter; 032import org.jooq.Field; 033import org.jooq.ForeignKey; 034import org.jooq.Name; 035import org.jooq.PlainSQL; 036import org.jooq.QueryPart; 037import org.jooq.SQL; 038import org.jooq.Stringly; 039import org.jooq.Table; 040import org.jooq.TableField; 041import org.jooq.TableLike; 042import org.jooq.TableOptions; 043import org.jooq.UniqueKey; 044import org.jooq.impl.DSL; 045import org.jooq.impl.Internal; 046import org.jooq.impl.SQLDataType; 047import org.jooq.impl.TableImpl; 048 049 050/** 051 * This class is generated by jOOQ. 052 */ 053@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 054public class Vendors extends TableImpl<com.echothree.model.jooq.server.records.vendor.Vendors> { 055 056 private static final long serialVersionUID = 1L; 057 058 /** 059 * The reference instance of <code>vendors</code> 060 */ 061 public static final Vendors Vendors = new Vendors(); 062 063 /** 064 * The class holding records for this type 065 */ 066 @Override 067 public Class<com.echothree.model.jooq.server.records.vendor.Vendors> getRecordType() { 068 return com.echothree.model.jooq.server.records.vendor.Vendors.class; 069 } 070 071 /** 072 * The column <code>vendors.vndr_vendorid</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, VendorPK> VENDOR = createField(DSL.name("vndr_vendorid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, VendorPK.class, id -> new com.echothree.model.data.vendor.common.pk.VendorPK(id), primaryKey -> primaryKey.getEntityId())); 075 076 /** 077 * The column <code>vendors.vndr_par_partyid</code>. 078 */ 079 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, PartyPK> PARTY = createField(DSL.name("vndr_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())); 080 081 /** 082 * The column <code>vendors.vndr_vendorname</code>. 083 */ 084 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, String> VENDOR_NAME = createField(DSL.name("vndr_vendorname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 085 086 /** 087 * The column <code>vendors.vndr_vndrty_vendortypeid</code>. 088 */ 089 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, VendorTypePK> VENDOR_TYPE = createField(DSL.name("vndr_vndrty_vendortypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, VendorTypePK.class, id -> new com.echothree.model.data.vendor.common.pk.VendorTypePK(id), primaryKey -> primaryKey.getEntityId())); 090 091 /** 092 * The column <code>vendors.vndr_minimumpurchaseorderlines</code>. 093 */ 094 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Integer> MINIMUM_PURCHASE_ORDER_LINES = createField(DSL.name("vndr_minimumpurchaseorderlines"), SQLDataType.INTEGER, this, ""); 095 096 /** 097 * The column <code>vendors.vndr_maximumpurchaseorderlines</code>. 098 */ 099 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Integer> MAXIMUM_PURCHASE_ORDER_LINES = createField(DSL.name("vndr_maximumpurchaseorderlines"), SQLDataType.INTEGER, this, ""); 100 101 /** 102 * The column <code>vendors.vndr_minimumpurchaseorderamount</code>. 103 */ 104 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Long> MINIMUM_PURCHASE_ORDER_AMOUNT = createField(DSL.name("vndr_minimumpurchaseorderamount"), SQLDataType.BIGINT, this, ""); 105 106 /** 107 * The column <code>vendors.vndr_maximumpurchaseorderamount</code>. 108 */ 109 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Long> MAXIMUM_PURCHASE_ORDER_AMOUNT = createField(DSL.name("vndr_maximumpurchaseorderamount"), SQLDataType.BIGINT, this, ""); 110 111 /** 112 * The column <code>vendors.vndr_useitempurchasingcategories</code>. 113 */ 114 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> USE_ITEM_PURCHASING_CATEGORIES = createField(DSL.name("vndr_useitempurchasingcategories"), SQLDataType.BIT.nullable(false), this, ""); 115 116 /** 117 * The column <code>vendors.vndr_defaultitemaliastypeid</code>. 118 */ 119 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, ItemAliasTypePK> DEFAULT_ITEM_ALIAS_TYPE = createField(DSL.name("vndr_defaultitemaliastypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ItemAliasTypePK.class, id -> new com.echothree.model.data.item.common.pk.ItemAliasTypePK(id), primaryKey -> primaryKey.getEntityId())); 120 121 /** 122 * The column <code>vendors.vndr_cnclplcy_cancellationpolicyid</code>. 123 */ 124 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, CancellationPolicyPK> CANCELLATION_POLICY = createField(DSL.name("vndr_cnclplcy_cancellationpolicyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CancellationPolicyPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK(id), primaryKey -> primaryKey.getEntityId())); 125 126 /** 127 * The column <code>vendors.vndr_rtnplcy_returnpolicyid</code>. 128 */ 129 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, ReturnPolicyPK> RETURN_POLICY = createField(DSL.name("vndr_rtnplcy_returnpolicyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, ReturnPolicyPK.class, id -> new com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK(id), primaryKey -> primaryKey.getEntityId())); 130 131 /** 132 * The column <code>vendors.vndr_apglaccountid</code>. 133 */ 134 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, GlAccountPK> AP_GL_ACCOUNT = createField(DSL.name("vndr_apglaccountid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId())); 135 136 /** 137 * The column <code>vendors.vndr_holduntilcomplete</code>. 138 */ 139 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> HOLD_UNTIL_COMPLETE = createField(DSL.name("vndr_holduntilcomplete"), SQLDataType.BIT.nullable(false), this, ""); 140 141 /** 142 * The column <code>vendors.vndr_allowbackorders</code>. 143 */ 144 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> ALLOW_BACKORDERS = createField(DSL.name("vndr_allowbackorders"), SQLDataType.BIT.nullable(false), this, ""); 145 146 /** 147 * The column <code>vendors.vndr_allowsubstitutions</code>. 148 */ 149 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> ALLOW_SUBSTITUTIONS = createField(DSL.name("vndr_allowsubstitutions"), SQLDataType.BIT.nullable(false), this, ""); 150 151 /** 152 * The column <code>vendors.vndr_allowcombiningshipments</code>. 153 */ 154 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> ALLOW_COMBINING_SHIPMENTS = createField(DSL.name("vndr_allowcombiningshipments"), SQLDataType.BIT.nullable(false), this, ""); 155 156 /** 157 * The column <code>vendors.vndr_requirereference</code>. 158 */ 159 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> REQUIRE_REFERENCE = createField(DSL.name("vndr_requirereference"), SQLDataType.BIT.nullable(false), this, ""); 160 161 /** 162 * The column <code>vendors.vndr_allowreferenceduplicates</code>. 163 */ 164 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Boolean> ALLOW_REFERENCE_DUPLICATES = createField(DSL.name("vndr_allowreferenceduplicates"), SQLDataType.BIT.nullable(false), this, ""); 165 166 /** 167 * The column <code>vendors.vndr_referencevalidationpattern</code>. 168 */ 169 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, String> REFERENCE_VALIDATION_PATTERN = createField(DSL.name("vndr_referencevalidationpattern"), SQLDataType.VARCHAR(128), this, ""); 170 171 /** 172 * The column <code>vendors.vndr_vendoritemselectorid</code>. 173 */ 174 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, SelectorPK> VENDOR_ITEM_SELECTOR = createField(DSL.name("vndr_vendoritemselectorid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorPK(id), primaryKey -> primaryKey.getEntityId())); 175 176 /** 177 * The column <code>vendors.vndr_vendoritemcostfilterid</code>. 178 */ 179 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, FilterPK> VENDOR_ITEM_COST_FILTER = createField(DSL.name("vndr_vendoritemcostfilterid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, FilterPK.class, id -> new com.echothree.model.data.filter.common.pk.FilterPK(id), primaryKey -> primaryKey.getEntityId())); 180 181 /** 182 * The column <code>vendors.vndr_fromtime</code>. 183 */ 184 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Long> FROM_TIME = createField(DSL.name("vndr_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 185 186 /** 187 * The column <code>vendors.vndr_thrutime</code>. 188 */ 189 public final TableField<com.echothree.model.jooq.server.records.vendor.Vendors, Long> THRU_TIME = createField(DSL.name("vndr_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 190 191 private Vendors(Name alias, Table<com.echothree.model.jooq.server.records.vendor.Vendors> aliased) { 192 this(alias, aliased, (Field<?>[]) null, null); 193 } 194 195 private Vendors(Name alias, Table<com.echothree.model.jooq.server.records.vendor.Vendors> aliased, Field<?>[] parameters, Condition where) { 196 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 197 } 198 199 /** 200 * Create an aliased <code>vendors</code> table reference 201 */ 202 public Vendors(String alias) { 203 this(DSL.name(alias), Vendors); 204 } 205 206 /** 207 * Create an aliased <code>vendors</code> table reference 208 */ 209 public Vendors(Name alias) { 210 this(alias, Vendors); 211 } 212 213 /** 214 * Create a <code>vendors</code> table reference 215 */ 216 public Vendors() { 217 this(DSL.name("vendors"), null); 218 } 219 220 @Override 221 public UniqueKey<com.echothree.model.jooq.server.records.vendor.Vendors> getPrimaryKey() { 222 return KeyRegistry.VENDORS_PK; 223 } 224 225 @Override 226 public List<UniqueKey<com.echothree.model.jooq.server.records.vendor.Vendors>> getUniqueKeys() { 227 return Arrays.asList(KeyRegistry.VENDORS_PARTY_AND_THRU_TIME_UK, KeyRegistry.VENDORS_VENDOR_NAME_AND_THRU_TIME_UK); 228 } 229 230 @Override 231 public List<ForeignKey<com.echothree.model.jooq.server.records.vendor.Vendors, ?>> getReferences() { 232 return Arrays.asList(KeyRegistry.VENDORS_AP_GL_ACCOUNT_FK, KeyRegistry.VENDORS_CANCELLATION_POLICY_FK, KeyRegistry.VENDORS_DEFAULT_ITEM_ALIAS_TYPE_FK, KeyRegistry.VENDORS_PARTY_FK, KeyRegistry.VENDORS_RETURN_POLICY_FK, KeyRegistry.VENDORS_VENDOR_ITEM_COST_FILTER_FK, KeyRegistry.VENDORS_VENDOR_ITEM_SELECTOR_FK, KeyRegistry.VENDORS_VENDOR_TYPE_FK); 233 } 234 235 private transient GlAccountsPath _vndr_apglaccountid_fk; 236 237 /** 238 * Get the implicit join path to the <code>glaccounts</code> table. 239 */ 240 public GlAccountsPath vndr_apglaccountid_fk() { 241 if (_vndr_apglaccountid_fk == null) 242 _vndr_apglaccountid_fk = new GlAccountsPath(this, KeyRegistry.VENDORS_AP_GL_ACCOUNT_FK, null); 243 244 return _vndr_apglaccountid_fk; 245 } 246 247 private transient CancellationPoliciesPath _vndr_cnclplcy_cancellationpolicyid_fk; 248 249 /** 250 * Get the implicit join path to the <code>cancellationpolicies</code> 251 * table. 252 */ 253 public CancellationPoliciesPath vndr_cnclplcy_cancellationpolicyid_fk() { 254 if (_vndr_cnclplcy_cancellationpolicyid_fk == null) 255 _vndr_cnclplcy_cancellationpolicyid_fk = new CancellationPoliciesPath(this, KeyRegistry.VENDORS_CANCELLATION_POLICY_FK, null); 256 257 return _vndr_cnclplcy_cancellationpolicyid_fk; 258 } 259 260 private transient ItemAliasTypesPath _vndr_defaultitemaliastypeid_fk; 261 262 /** 263 * Get the implicit join path to the <code>itemaliastypes</code> table. 264 */ 265 public ItemAliasTypesPath vndr_defaultitemaliastypeid_fk() { 266 if (_vndr_defaultitemaliastypeid_fk == null) 267 _vndr_defaultitemaliastypeid_fk = new ItemAliasTypesPath(this, KeyRegistry.VENDORS_DEFAULT_ITEM_ALIAS_TYPE_FK, null); 268 269 return _vndr_defaultitemaliastypeid_fk; 270 } 271 272 private transient PartiesPath _vndr_par_partyid_fk; 273 274 /** 275 * Get the implicit join path to the <code>parties</code> table. 276 */ 277 public PartiesPath vndr_par_partyid_fk() { 278 if (_vndr_par_partyid_fk == null) 279 _vndr_par_partyid_fk = new PartiesPath(this, KeyRegistry.VENDORS_PARTY_FK, null); 280 281 return _vndr_par_partyid_fk; 282 } 283 284 private transient ReturnPoliciesPath _vndr_rtnplcy_returnpolicyid_fk; 285 286 /** 287 * Get the implicit join path to the <code>returnpolicies</code> table. 288 */ 289 public ReturnPoliciesPath vndr_rtnplcy_returnpolicyid_fk() { 290 if (_vndr_rtnplcy_returnpolicyid_fk == null) 291 _vndr_rtnplcy_returnpolicyid_fk = new ReturnPoliciesPath(this, KeyRegistry.VENDORS_RETURN_POLICY_FK, null); 292 293 return _vndr_rtnplcy_returnpolicyid_fk; 294 } 295 296 private transient FiltersPath _vndr_vendoritemcostfilterid_fk; 297 298 /** 299 * Get the implicit join path to the <code>filters</code> table. 300 */ 301 public FiltersPath vndr_vendoritemcostfilterid_fk() { 302 if (_vndr_vendoritemcostfilterid_fk == null) 303 _vndr_vendoritemcostfilterid_fk = new FiltersPath(this, KeyRegistry.VENDORS_VENDOR_ITEM_COST_FILTER_FK, null); 304 305 return _vndr_vendoritemcostfilterid_fk; 306 } 307 308 private transient SelectorsPath _vndr_vendoritemselectorid_fk; 309 310 /** 311 * Get the implicit join path to the <code>selectors</code> table. 312 */ 313 public SelectorsPath vndr_vendoritemselectorid_fk() { 314 if (_vndr_vendoritemselectorid_fk == null) 315 _vndr_vendoritemselectorid_fk = new SelectorsPath(this, KeyRegistry.VENDORS_VENDOR_ITEM_SELECTOR_FK, null); 316 317 return _vndr_vendoritemselectorid_fk; 318 } 319 320 private transient VendorTypesPath _vndr_vndrty_vendortypeid_fk; 321 322 /** 323 * Get the implicit join path to the <code>vendortypes</code> table. 324 */ 325 public VendorTypesPath vndr_vndrty_vendortypeid_fk() { 326 if (_vndr_vndrty_vendortypeid_fk == null) 327 _vndr_vndrty_vendortypeid_fk = new VendorTypesPath(this, KeyRegistry.VENDORS_VENDOR_TYPE_FK, null); 328 329 return _vndr_vndrty_vendortypeid_fk; 330 } 331 332 @Override 333 public Vendors as(String alias) { 334 return new Vendors(DSL.name(alias), this); 335 } 336 337 @Override 338 public Vendors as(Name alias) { 339 return new Vendors(alias, this); 340 } 341 342 @Override 343 public Vendors as(Table<?> alias) { 344 return new Vendors(alias.getQualifiedName(), this); 345 } 346 347 /** 348 * Rename this table 349 */ 350 @Override 351 public Vendors rename(String name) { 352 return new Vendors(DSL.name(name), null); 353 } 354 355 /** 356 * Rename this table 357 */ 358 @Override 359 public Vendors rename(Name name) { 360 return new Vendors(name, null); 361 } 362 363 /** 364 * Rename this table 365 */ 366 @Override 367 public Vendors rename(Table<?> name) { 368 return new Vendors(name.getQualifiedName(), null); 369 } 370 371 /** 372 * Create an inline derived table from this table 373 */ 374 @Override 375 public Vendors where(Condition condition) { 376 return new Vendors(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 377 } 378 379 /** 380 * Create an inline derived table from this table 381 */ 382 @Override 383 public Vendors where(Collection<? extends Condition> conditions) { 384 return where(DSL.and(conditions)); 385 } 386 387 /** 388 * Create an inline derived table from this table 389 */ 390 @Override 391 public Vendors where(Condition... conditions) { 392 return where(DSL.and(conditions)); 393 } 394 395 /** 396 * Create an inline derived table from this table 397 */ 398 @Override 399 public Vendors where(Field<Boolean> condition) { 400 return where(DSL.condition(condition)); 401 } 402 403 /** 404 * Create an inline derived table from this table 405 */ 406 @Override 407 @PlainSQL 408 public Vendors where(SQL condition) { 409 return where(DSL.condition(condition)); 410 } 411 412 /** 413 * Create an inline derived table from this table 414 */ 415 @Override 416 @PlainSQL 417 public Vendors where(@Stringly.SQL String condition) { 418 return where(DSL.condition(condition)); 419 } 420 421 /** 422 * Create an inline derived table from this table 423 */ 424 @Override 425 @PlainSQL 426 public Vendors where(@Stringly.SQL String condition, Object... binds) { 427 return where(DSL.condition(condition, binds)); 428 } 429 430 /** 431 * Create an inline derived table from this table 432 */ 433 @Override 434 @PlainSQL 435 public Vendors where(@Stringly.SQL String condition, QueryPart... parts) { 436 return where(DSL.condition(condition, parts)); 437 } 438 439 /** 440 * Create an inline derived table from this table 441 */ 442 @Override 443 public Vendors whereExists(TableLike<?> select) { 444 return where(DSL.exists(select)); 445 } 446 447 /** 448 * Create an inline derived table from this table 449 */ 450 @Override 451 public Vendors whereNotExists(TableLike<?> select) { 452 return where(DSL.notExists(select)); 453 } 454}