001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.order; 005 006 007import com.echothree.model.data.cancellationpolicy.common.pk.CancellationPolicyPK; 008import com.echothree.model.data.inventory.common.pk.InventoryConditionPK; 009import com.echothree.model.data.item.common.pk.ItemPK; 010import com.echothree.model.data.order.common.pk.OrderLineDetailPK; 011import com.echothree.model.data.order.common.pk.OrderLinePK; 012import com.echothree.model.data.order.common.pk.OrderPK; 013import com.echothree.model.data.order.common.pk.OrderShipmentGroupPK; 014import com.echothree.model.data.returnpolicy.common.pk.ReturnPolicyPK; 015import com.echothree.model.data.uom.common.pk.UnitOfMeasureTypePK; 016import com.echothree.model.jooq.server.KeyRegistry; 017import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationPolicies.CancellationPoliciesPath; 018import com.echothree.model.jooq.server.tables.inventory.InventoryConditions.InventoryConditionsPath; 019import com.echothree.model.jooq.server.tables.item.Items.ItemsPath; 020import com.echothree.model.jooq.server.tables.order.OrderLines.OrderLinesPath; 021import com.echothree.model.jooq.server.tables.order.OrderShipmentGroups.OrderShipmentGroupsPath; 022import com.echothree.model.jooq.server.tables.order.Orders.OrdersPath; 023import com.echothree.model.jooq.server.tables.returnpolicy.ReturnPolicies.ReturnPoliciesPath; 024import com.echothree.model.jooq.server.tables.uom.UnitOfMeasureTypes.UnitOfMeasureTypesPath; 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.InverseForeignKey; 035import org.jooq.Name; 036import org.jooq.Path; 037import org.jooq.PlainSQL; 038import org.jooq.QueryPart; 039import org.jooq.Record; 040import org.jooq.SQL; 041import org.jooq.Stringly; 042import org.jooq.Table; 043import org.jooq.TableField; 044import org.jooq.TableLike; 045import org.jooq.TableOptions; 046import org.jooq.UniqueKey; 047import org.jooq.impl.DSL; 048import org.jooq.impl.Internal; 049import org.jooq.impl.SQLDataType; 050import org.jooq.impl.TableImpl; 051 052 053/** 054 * This class is generated by jOOQ. 055 */ 056@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 057public class OrderLineDetails extends TableImpl<com.echothree.model.jooq.server.records.order.OrderLineDetails> { 058 059 private static final long serialVersionUID = 1L; 060 061 /** 062 * The reference instance of <code>orderlinedetails</code> 063 */ 064 public static final OrderLineDetails OrderLineDetails = new OrderLineDetails(); 065 066 /** 067 * The class holding records for this type 068 */ 069 @Override 070 public Class<com.echothree.model.jooq.server.records.order.OrderLineDetails> getRecordType() { 071 return com.echothree.model.jooq.server.records.order.OrderLineDetails.class; 072 } 073 074 /** 075 * The column <code>orderlinedetails.ordldt_orderlinedetailid</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, OrderLineDetailPK> ORDER_LINE_DETAIL = createField(DSL.name("ordldt_orderlinedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLineDetailPK.class, id -> new com.echothree.model.data.order.common.pk.OrderLineDetailPK(id), primaryKey -> primaryKey.getEntityId())); 078 079 /** 080 * The column <code>orderlinedetails.ordldt_ordl_orderlineid</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, OrderLinePK> ORDER_LINE = createField(DSL.name("ordldt_ordl_orderlineid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderLinePK.class, id -> new com.echothree.model.data.order.common.pk.OrderLinePK(id), primaryKey -> primaryKey.getEntityId())); 083 084 /** 085 * The column <code>orderlinedetails.ordldt_ord_orderid</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, OrderPK> ORDER = createField(DSL.name("ordldt_ord_orderid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderPK.class, id -> new com.echothree.model.data.order.common.pk.OrderPK(id), primaryKey -> primaryKey.getEntityId())); 088 089 /** 090 * The column <code>orderlinedetails.ordldt_orderlinesequence</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Integer> ORDER_LINE_SEQUENCE = createField(DSL.name("ordldt_orderlinesequence"), SQLDataType.INTEGER.nullable(false), this, ""); 093 094 /** 095 * The column <code>orderlinedetails.ordldt_parentorderlineid</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, OrderLinePK> PARENT_ORDER_LINE = createField(DSL.name("ordldt_parentorderlineid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, OrderLinePK.class, id -> new com.echothree.model.data.order.common.pk.OrderLinePK(id), primaryKey -> primaryKey.getEntityId())); 098 099 /** 100 * The column 101 * <code>orderlinedetails.ordldt_ordshpgrp_ordershipmentgroupid</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, OrderShipmentGroupPK> ORDER_SHIPMENT_GROUP = createField(DSL.name("ordldt_ordshpgrp_ordershipmentgroupid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, OrderShipmentGroupPK.class, id -> new com.echothree.model.data.order.common.pk.OrderShipmentGroupPK(id), primaryKey -> primaryKey.getEntityId())); 104 105 /** 106 * The column <code>orderlinedetails.ordldt_itm_itemid</code>. 107 */ 108 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, ItemPK> ITEM = createField(DSL.name("ordldt_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())); 109 110 /** 111 * The column 112 * <code>orderlinedetails.ordldt_invcon_inventoryconditionid</code>. 113 */ 114 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, InventoryConditionPK> INVENTORY_CONDITION = createField(DSL.name("ordldt_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())); 115 116 /** 117 * The column <code>orderlinedetails.ordldt_uomt_unitofmeasuretypeid</code>. 118 */ 119 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, UnitOfMeasureTypePK> UNIT_OF_MEASURE_TYPE = createField(DSL.name("ordldt_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())); 120 121 /** 122 * The column <code>orderlinedetails.ordldt_quantity</code>. 123 */ 124 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Long> QUANTITY = createField(DSL.name("ordldt_quantity"), SQLDataType.BIGINT, this, ""); 125 126 /** 127 * The column <code>orderlinedetails.ordldt_unitamount</code>. 128 */ 129 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Long> UNIT_AMOUNT = createField(DSL.name("ordldt_unitamount"), SQLDataType.BIGINT, this, ""); 130 131 /** 132 * The column <code>orderlinedetails.ordldt_description</code>. 133 */ 134 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, String> DESCRIPTION = createField(DSL.name("ordldt_description"), SQLDataType.VARCHAR(132), this, ""); 135 136 /** 137 * The column 138 * <code>orderlinedetails.ordldt_cnclplcy_cancellationpolicyid</code>. 139 */ 140 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, CancellationPolicyPK> CANCELLATION_POLICY = createField(DSL.name("ordldt_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())); 141 142 /** 143 * The column <code>orderlinedetails.ordldt_rtnplcy_returnpolicyid</code>. 144 */ 145 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, ReturnPolicyPK> RETURN_POLICY = createField(DSL.name("ordldt_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())); 146 147 /** 148 * The column <code>orderlinedetails.ordldt_taxable</code>. 149 */ 150 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Boolean> TAXABLE = createField(DSL.name("ordldt_taxable"), SQLDataType.BIT, this, ""); 151 152 /** 153 * The column <code>orderlinedetails.ordldt_fromtime</code>. 154 */ 155 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Long> FROM_TIME = createField(DSL.name("ordldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 156 157 /** 158 * The column <code>orderlinedetails.ordldt_thrutime</code>. 159 */ 160 public final TableField<com.echothree.model.jooq.server.records.order.OrderLineDetails, Long> THRU_TIME = createField(DSL.name("ordldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 161 162 private OrderLineDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineDetails> aliased) { 163 this(alias, aliased, (Field<?>[]) null, null); 164 } 165 166 private OrderLineDetails(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineDetails> aliased, Field<?>[] parameters, Condition where) { 167 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 168 } 169 170 /** 171 * Create an aliased <code>orderlinedetails</code> table reference 172 */ 173 public OrderLineDetails(String alias) { 174 this(DSL.name(alias), OrderLineDetails); 175 } 176 177 /** 178 * Create an aliased <code>orderlinedetails</code> table reference 179 */ 180 public OrderLineDetails(Name alias) { 181 this(alias, OrderLineDetails); 182 } 183 184 /** 185 * Create a <code>orderlinedetails</code> table reference 186 */ 187 public OrderLineDetails() { 188 this(DSL.name("orderlinedetails"), null); 189 } 190 191 public <O extends Record> OrderLineDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineDetails> parentPath) { 192 super(path, childPath, parentPath, OrderLineDetails); 193 } 194 195 /** 196 * A subtype implementing {@link Path} for simplified path-based joins. 197 */ 198 public static class OrderLineDetailsPath extends OrderLineDetails implements Path<com.echothree.model.jooq.server.records.order.OrderLineDetails> { 199 200 private static final long serialVersionUID = 1L; 201 public <O extends Record> OrderLineDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.order.OrderLineDetails> parentPath) { 202 super(path, childPath, parentPath); 203 } 204 private OrderLineDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderLineDetails> aliased) { 205 super(alias, aliased); 206 } 207 208 @Override 209 public OrderLineDetailsPath as(String alias) { 210 return new OrderLineDetailsPath(DSL.name(alias), this); 211 } 212 213 @Override 214 public OrderLineDetailsPath as(Name alias) { 215 return new OrderLineDetailsPath(alias, this); 216 } 217 218 @Override 219 public OrderLineDetailsPath as(Table<?> alias) { 220 return new OrderLineDetailsPath(alias.getQualifiedName(), this); 221 } 222 } 223 224 @Override 225 public UniqueKey<com.echothree.model.jooq.server.records.order.OrderLineDetails> getPrimaryKey() { 226 return KeyRegistry.ORDER_LINE_DETAILS_PK; 227 } 228 229 @Override 230 public List<UniqueKey<com.echothree.model.jooq.server.records.order.OrderLineDetails>> getUniqueKeys() { 231 return Arrays.asList(KeyRegistry.ORDER_LINE_DETAILS_ORDER_LINE_AND_THRU_TIME_UK, KeyRegistry.ORDER_LINE_DETAILS_ORDER_AND_ORDER_LINE_SEQUENCE_AND_THRU_TIME_UK); 232 } 233 234 @Override 235 public List<ForeignKey<com.echothree.model.jooq.server.records.order.OrderLineDetails, ?>> getReferences() { 236 return Arrays.asList(KeyRegistry.ORDER_LINE_DETAILS_CANCELLATION_POLICY_FK, KeyRegistry.ORDER_LINE_DETAILS_INVENTORY_CONDITION_FK, KeyRegistry.ORDER_LINE_DETAILS_ITEM_FK, KeyRegistry.ORDER_LINE_DETAILS_ORDER_FK, KeyRegistry.ORDER_LINE_DETAILS_ORDER_LINE_FK, KeyRegistry.ORDER_LINE_DETAILS_ORDER_SHIPMENT_GROUP_FK, KeyRegistry.ORDER_LINE_DETAILS_PARENT_ORDER_LINE_FK, KeyRegistry.ORDER_LINE_DETAILS_RETURN_POLICY_FK, KeyRegistry.ORDER_LINE_DETAILS_UNIT_OF_MEASURE_TYPE_FK); 237 } 238 239 private transient CancellationPoliciesPath _ordldt_cnclplcy_cancellationpolicyid_fk; 240 241 /** 242 * Get the implicit join path to the <code>cancellationpolicies</code> 243 * table. 244 */ 245 public CancellationPoliciesPath ordldt_cnclplcy_cancellationpolicyid_fk() { 246 if (_ordldt_cnclplcy_cancellationpolicyid_fk == null) 247 _ordldt_cnclplcy_cancellationpolicyid_fk = new CancellationPoliciesPath(this, KeyRegistry.ORDER_LINE_DETAILS_CANCELLATION_POLICY_FK, null); 248 249 return _ordldt_cnclplcy_cancellationpolicyid_fk; 250 } 251 252 private transient InventoryConditionsPath _ordldt_invcon_inventoryconditionid_fk; 253 254 /** 255 * Get the implicit join path to the <code>inventoryconditions</code> table. 256 */ 257 public InventoryConditionsPath ordldt_invcon_inventoryconditionid_fk() { 258 if (_ordldt_invcon_inventoryconditionid_fk == null) 259 _ordldt_invcon_inventoryconditionid_fk = new InventoryConditionsPath(this, KeyRegistry.ORDER_LINE_DETAILS_INVENTORY_CONDITION_FK, null); 260 261 return _ordldt_invcon_inventoryconditionid_fk; 262 } 263 264 private transient ItemsPath _ordldt_itm_itemid_fk; 265 266 /** 267 * Get the implicit join path to the <code>items</code> table. 268 */ 269 public ItemsPath ordldt_itm_itemid_fk() { 270 if (_ordldt_itm_itemid_fk == null) 271 _ordldt_itm_itemid_fk = new ItemsPath(this, KeyRegistry.ORDER_LINE_DETAILS_ITEM_FK, null); 272 273 return _ordldt_itm_itemid_fk; 274 } 275 276 private transient OrdersPath _ordldt_ord_orderid_fk; 277 278 /** 279 * Get the implicit join path to the <code>orders</code> table. 280 */ 281 public OrdersPath ordldt_ord_orderid_fk() { 282 if (_ordldt_ord_orderid_fk == null) 283 _ordldt_ord_orderid_fk = new OrdersPath(this, KeyRegistry.ORDER_LINE_DETAILS_ORDER_FK, null); 284 285 return _ordldt_ord_orderid_fk; 286 } 287 288 private transient OrderLinesPath _ordldt_ordl_orderlineid_fk; 289 290 /** 291 * Get the implicit join path to the <code>orderlines</code> table, via the 292 * <code>ordldt_ordl_orderlineid_fk</code> key. 293 */ 294 public OrderLinesPath ordldt_ordl_orderlineid_fk() { 295 if (_ordldt_ordl_orderlineid_fk == null) 296 _ordldt_ordl_orderlineid_fk = new OrderLinesPath(this, KeyRegistry.ORDER_LINE_DETAILS_ORDER_LINE_FK, null); 297 298 return _ordldt_ordl_orderlineid_fk; 299 } 300 301 private transient OrderShipmentGroupsPath _ordldt_ordshpgrp_ordershipmentgroupid_fk; 302 303 /** 304 * Get the implicit join path to the <code>ordershipmentgroups</code> table. 305 */ 306 public OrderShipmentGroupsPath ordldt_ordshpgrp_ordershipmentgroupid_fk() { 307 if (_ordldt_ordshpgrp_ordershipmentgroupid_fk == null) 308 _ordldt_ordshpgrp_ordershipmentgroupid_fk = new OrderShipmentGroupsPath(this, KeyRegistry.ORDER_LINE_DETAILS_ORDER_SHIPMENT_GROUP_FK, null); 309 310 return _ordldt_ordshpgrp_ordershipmentgroupid_fk; 311 } 312 313 private transient OrderLinesPath _ordldt_parentorderlineid_fk; 314 315 /** 316 * Get the implicit join path to the <code>orderlines</code> table, via the 317 * <code>ordldt_parentorderlineid_fk</code> key. 318 */ 319 public OrderLinesPath ordldt_parentorderlineid_fk() { 320 if (_ordldt_parentorderlineid_fk == null) 321 _ordldt_parentorderlineid_fk = new OrderLinesPath(this, KeyRegistry.ORDER_LINE_DETAILS_PARENT_ORDER_LINE_FK, null); 322 323 return _ordldt_parentorderlineid_fk; 324 } 325 326 private transient ReturnPoliciesPath _ordldt_rtnplcy_returnpolicyid_fk; 327 328 /** 329 * Get the implicit join path to the <code>returnpolicies</code> table. 330 */ 331 public ReturnPoliciesPath ordldt_rtnplcy_returnpolicyid_fk() { 332 if (_ordldt_rtnplcy_returnpolicyid_fk == null) 333 _ordldt_rtnplcy_returnpolicyid_fk = new ReturnPoliciesPath(this, KeyRegistry.ORDER_LINE_DETAILS_RETURN_POLICY_FK, null); 334 335 return _ordldt_rtnplcy_returnpolicyid_fk; 336 } 337 338 private transient UnitOfMeasureTypesPath _ordldt_uomt_unitofmeasuretypeid_fk; 339 340 /** 341 * Get the implicit join path to the <code>unitofmeasuretypes</code> table. 342 */ 343 public UnitOfMeasureTypesPath ordldt_uomt_unitofmeasuretypeid_fk() { 344 if (_ordldt_uomt_unitofmeasuretypeid_fk == null) 345 _ordldt_uomt_unitofmeasuretypeid_fk = new UnitOfMeasureTypesPath(this, KeyRegistry.ORDER_LINE_DETAILS_UNIT_OF_MEASURE_TYPE_FK, null); 346 347 return _ordldt_uomt_unitofmeasuretypeid_fk; 348 } 349 350 @Override 351 public OrderLineDetails as(String alias) { 352 return new OrderLineDetails(DSL.name(alias), this); 353 } 354 355 @Override 356 public OrderLineDetails as(Name alias) { 357 return new OrderLineDetails(alias, this); 358 } 359 360 @Override 361 public OrderLineDetails as(Table<?> alias) { 362 return new OrderLineDetails(alias.getQualifiedName(), this); 363 } 364 365 /** 366 * Rename this table 367 */ 368 @Override 369 public OrderLineDetails rename(String name) { 370 return new OrderLineDetails(DSL.name(name), null); 371 } 372 373 /** 374 * Rename this table 375 */ 376 @Override 377 public OrderLineDetails rename(Name name) { 378 return new OrderLineDetails(name, null); 379 } 380 381 /** 382 * Rename this table 383 */ 384 @Override 385 public OrderLineDetails rename(Table<?> name) { 386 return new OrderLineDetails(name.getQualifiedName(), null); 387 } 388 389 /** 390 * Create an inline derived table from this table 391 */ 392 @Override 393 public OrderLineDetails where(Condition condition) { 394 return new OrderLineDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 395 } 396 397 /** 398 * Create an inline derived table from this table 399 */ 400 @Override 401 public OrderLineDetails where(Collection<? extends Condition> conditions) { 402 return where(DSL.and(conditions)); 403 } 404 405 /** 406 * Create an inline derived table from this table 407 */ 408 @Override 409 public OrderLineDetails where(Condition... conditions) { 410 return where(DSL.and(conditions)); 411 } 412 413 /** 414 * Create an inline derived table from this table 415 */ 416 @Override 417 public OrderLineDetails where(Field<Boolean> 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 OrderLineDetails where(SQL condition) { 427 return where(DSL.condition(condition)); 428 } 429 430 /** 431 * Create an inline derived table from this table 432 */ 433 @Override 434 @PlainSQL 435 public OrderLineDetails where(@Stringly.SQL String condition) { 436 return where(DSL.condition(condition)); 437 } 438 439 /** 440 * Create an inline derived table from this table 441 */ 442 @Override 443 @PlainSQL 444 public OrderLineDetails where(@Stringly.SQL String condition, Object... binds) { 445 return where(DSL.condition(condition, binds)); 446 } 447 448 /** 449 * Create an inline derived table from this table 450 */ 451 @Override 452 @PlainSQL 453 public OrderLineDetails where(@Stringly.SQL String condition, QueryPart... parts) { 454 return where(DSL.condition(condition, parts)); 455 } 456 457 /** 458 * Create an inline derived table from this table 459 */ 460 @Override 461 public OrderLineDetails whereExists(TableLike<?> select) { 462 return where(DSL.exists(select)); 463 } 464 465 /** 466 * Create an inline derived table from this table 467 */ 468 @Override 469 public OrderLineDetails whereNotExists(TableLike<?> select) { 470 return where(DSL.notExists(select)); 471 } 472}