001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.sales; 005 006 007import com.echothree.model.data.associate.common.pk.AssociateReferralPK; 008import com.echothree.model.data.offer.common.pk.OfferUsePK; 009import com.echothree.model.data.order.common.pk.OrderPK; 010import com.echothree.model.data.sales.common.pk.SalesOrderPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.associate.AssociateReferrals.AssociateReferralsPath; 013import com.echothree.model.jooq.server.tables.offer.OfferUses.OfferUsesPath; 014import com.echothree.model.jooq.server.tables.order.Orders.OrdersPath; 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 SalesOrders extends TableImpl<com.echothree.model.jooq.server.records.sales.SalesOrders> { 045 046 private static final long serialVersionUID = 1L; 047 048 /** 049 * The reference instance of <code>salesorders</code> 050 */ 051 public static final SalesOrders SalesOrders = new SalesOrders(); 052 053 /** 054 * The class holding records for this type 055 */ 056 @Override 057 public Class<com.echothree.model.jooq.server.records.sales.SalesOrders> getRecordType() { 058 return com.echothree.model.jooq.server.records.sales.SalesOrders.class; 059 } 060 061 /** 062 * The column <code>salesorders.salord_salesorderid</code>. 063 */ 064 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, SalesOrderPK> SALES_ORDER = createField(DSL.name("salord_salesorderid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SalesOrderPK.class, id -> new com.echothree.model.data.sales.common.pk.SalesOrderPK(id), primaryKey -> primaryKey.getEntityId())); 065 066 /** 067 * The column <code>salesorders.salord_ord_orderid</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, OrderPK> ORDER = createField(DSL.name("salord_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())); 070 071 /** 072 * The column <code>salesorders.salord_ofruse_offeruseid</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, OfferUsePK> OFFER_USE = createField(DSL.name("salord_ofruse_offeruseid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OfferUsePK.class, id -> new com.echothree.model.data.offer.common.pk.OfferUsePK(id), primaryKey -> primaryKey.getEntityId())); 075 076 /** 077 * The column <code>salesorders.salord_ascrfr_associatereferralid</code>. 078 */ 079 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, AssociateReferralPK> ASSOCIATE_REFERRAL = createField(DSL.name("salord_ascrfr_associatereferralid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, AssociateReferralPK.class, id -> new com.echothree.model.data.associate.common.pk.AssociateReferralPK(id), primaryKey -> primaryKey.getEntityId())); 080 081 /** 082 * The column <code>salesorders.salord_fromtime</code>. 083 */ 084 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, Long> FROM_TIME = createField(DSL.name("salord_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 085 086 /** 087 * The column <code>salesorders.salord_thrutime</code>. 088 */ 089 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrders, Long> THRU_TIME = createField(DSL.name("salord_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 090 091 private SalesOrders(Name alias, Table<com.echothree.model.jooq.server.records.sales.SalesOrders> aliased) { 092 this(alias, aliased, (Field<?>[]) null, null); 093 } 094 095 private SalesOrders(Name alias, Table<com.echothree.model.jooq.server.records.sales.SalesOrders> aliased, Field<?>[] parameters, Condition where) { 096 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 097 } 098 099 /** 100 * Create an aliased <code>salesorders</code> table reference 101 */ 102 public SalesOrders(String alias) { 103 this(DSL.name(alias), SalesOrders); 104 } 105 106 /** 107 * Create an aliased <code>salesorders</code> table reference 108 */ 109 public SalesOrders(Name alias) { 110 this(alias, SalesOrders); 111 } 112 113 /** 114 * Create a <code>salesorders</code> table reference 115 */ 116 public SalesOrders() { 117 this(DSL.name("salesorders"), null); 118 } 119 120 @Override 121 public UniqueKey<com.echothree.model.jooq.server.records.sales.SalesOrders> getPrimaryKey() { 122 return KeyRegistry.SALES_ORDERS_PK; 123 } 124 125 @Override 126 public List<UniqueKey<com.echothree.model.jooq.server.records.sales.SalesOrders>> getUniqueKeys() { 127 return Arrays.asList(KeyRegistry.SALES_ORDERS_ORDER_AND_THRU_TIME_UK); 128 } 129 130 @Override 131 public List<ForeignKey<com.echothree.model.jooq.server.records.sales.SalesOrders, ?>> getReferences() { 132 return Arrays.asList(KeyRegistry.SALES_ORDERS_ASSOCIATE_REFERRAL_FK, KeyRegistry.SALES_ORDERS_OFFER_USE_FK, KeyRegistry.SALES_ORDERS_ORDER_FK); 133 } 134 135 private transient AssociateReferralsPath _salord_ascrfr_associatereferralid_fk; 136 137 /** 138 * Get the implicit join path to the <code>associatereferrals</code> table. 139 */ 140 public AssociateReferralsPath salord_ascrfr_associatereferralid_fk() { 141 if (_salord_ascrfr_associatereferralid_fk == null) 142 _salord_ascrfr_associatereferralid_fk = new AssociateReferralsPath(this, KeyRegistry.SALES_ORDERS_ASSOCIATE_REFERRAL_FK, null); 143 144 return _salord_ascrfr_associatereferralid_fk; 145 } 146 147 private transient OfferUsesPath _salord_ofruse_offeruseid_fk; 148 149 /** 150 * Get the implicit join path to the <code>offeruses</code> table. 151 */ 152 public OfferUsesPath salord_ofruse_offeruseid_fk() { 153 if (_salord_ofruse_offeruseid_fk == null) 154 _salord_ofruse_offeruseid_fk = new OfferUsesPath(this, KeyRegistry.SALES_ORDERS_OFFER_USE_FK, null); 155 156 return _salord_ofruse_offeruseid_fk; 157 } 158 159 private transient OrdersPath _salord_ord_orderid_fk; 160 161 /** 162 * Get the implicit join path to the <code>orders</code> table. 163 */ 164 public OrdersPath salord_ord_orderid_fk() { 165 if (_salord_ord_orderid_fk == null) 166 _salord_ord_orderid_fk = new OrdersPath(this, KeyRegistry.SALES_ORDERS_ORDER_FK, null); 167 168 return _salord_ord_orderid_fk; 169 } 170 171 @Override 172 public SalesOrders as(String alias) { 173 return new SalesOrders(DSL.name(alias), this); 174 } 175 176 @Override 177 public SalesOrders as(Name alias) { 178 return new SalesOrders(alias, this); 179 } 180 181 @Override 182 public SalesOrders as(Table<?> alias) { 183 return new SalesOrders(alias.getQualifiedName(), this); 184 } 185 186 /** 187 * Rename this table 188 */ 189 @Override 190 public SalesOrders rename(String name) { 191 return new SalesOrders(DSL.name(name), null); 192 } 193 194 /** 195 * Rename this table 196 */ 197 @Override 198 public SalesOrders rename(Name name) { 199 return new SalesOrders(name, null); 200 } 201 202 /** 203 * Rename this table 204 */ 205 @Override 206 public SalesOrders rename(Table<?> name) { 207 return new SalesOrders(name.getQualifiedName(), null); 208 } 209 210 /** 211 * Create an inline derived table from this table 212 */ 213 @Override 214 public SalesOrders where(Condition condition) { 215 return new SalesOrders(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 216 } 217 218 /** 219 * Create an inline derived table from this table 220 */ 221 @Override 222 public SalesOrders where(Collection<? extends Condition> conditions) { 223 return where(DSL.and(conditions)); 224 } 225 226 /** 227 * Create an inline derived table from this table 228 */ 229 @Override 230 public SalesOrders where(Condition... conditions) { 231 return where(DSL.and(conditions)); 232 } 233 234 /** 235 * Create an inline derived table from this table 236 */ 237 @Override 238 public SalesOrders where(Field<Boolean> condition) { 239 return where(DSL.condition(condition)); 240 } 241 242 /** 243 * Create an inline derived table from this table 244 */ 245 @Override 246 @PlainSQL 247 public SalesOrders where(SQL condition) { 248 return where(DSL.condition(condition)); 249 } 250 251 /** 252 * Create an inline derived table from this table 253 */ 254 @Override 255 @PlainSQL 256 public SalesOrders where(@Stringly.SQL String condition) { 257 return where(DSL.condition(condition)); 258 } 259 260 /** 261 * Create an inline derived table from this table 262 */ 263 @Override 264 @PlainSQL 265 public SalesOrders where(@Stringly.SQL String condition, Object... binds) { 266 return where(DSL.condition(condition, binds)); 267 } 268 269 /** 270 * Create an inline derived table from this table 271 */ 272 @Override 273 @PlainSQL 274 public SalesOrders where(@Stringly.SQL String condition, QueryPart... parts) { 275 return where(DSL.condition(condition, parts)); 276 } 277 278 /** 279 * Create an inline derived table from this table 280 */ 281 @Override 282 public SalesOrders whereExists(TableLike<?> select) { 283 return where(DSL.exists(select)); 284 } 285 286 /** 287 * Create an inline derived table from this table 288 */ 289 @Override 290 public SalesOrders whereNotExists(TableLike<?> select) { 291 return where(DSL.notExists(select)); 292 } 293}