001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.sales; 005 006 007import com.echothree.model.data.batch.common.pk.BatchPK; 008import com.echothree.model.data.payment.common.pk.PaymentMethodPK; 009import com.echothree.model.data.sales.common.pk.SalesOrderBatchPK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.batch.Batches.BatchesPath; 012import com.echothree.model.jooq.server.tables.payment.PaymentMethods.PaymentMethodsPath; 013 014import java.util.Arrays; 015import java.util.Collection; 016import java.util.List; 017 018import org.jooq.Condition; 019import org.jooq.Converter; 020import org.jooq.Field; 021import org.jooq.ForeignKey; 022import org.jooq.Name; 023import org.jooq.PlainSQL; 024import org.jooq.QueryPart; 025import org.jooq.SQL; 026import org.jooq.Stringly; 027import org.jooq.Table; 028import org.jooq.TableField; 029import org.jooq.TableLike; 030import org.jooq.TableOptions; 031import org.jooq.UniqueKey; 032import org.jooq.impl.DSL; 033import org.jooq.impl.Internal; 034import org.jooq.impl.SQLDataType; 035import org.jooq.impl.TableImpl; 036 037 038/** 039 * This class is generated by jOOQ. 040 */ 041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 042public class SalesOrderBatches extends TableImpl<com.echothree.model.jooq.server.records.sales.SalesOrderBatches> { 043 044 private static final long serialVersionUID = 1L; 045 046 /** 047 * The reference instance of <code>salesorderbatches</code> 048 */ 049 public static final SalesOrderBatches SalesOrderBatches = new SalesOrderBatches(); 050 051 /** 052 * The class holding records for this type 053 */ 054 @Override 055 public Class<com.echothree.model.jooq.server.records.sales.SalesOrderBatches> getRecordType() { 056 return com.echothree.model.jooq.server.records.sales.SalesOrderBatches.class; 057 } 058 059 /** 060 * The column <code>salesorderbatches.salordbtch_salesorderbatchid</code>. 061 */ 062 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, SalesOrderBatchPK> SALES_ORDER_BATCH = createField(DSL.name("salordbtch_salesorderbatchid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SalesOrderBatchPK.class, id -> new com.echothree.model.data.sales.common.pk.SalesOrderBatchPK(id), primaryKey -> primaryKey.getEntityId())); 063 064 /** 065 * The column <code>salesorderbatches.salordbtch_btch_batchid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, BatchPK> BATCH = createField(DSL.name("salordbtch_btch_batchid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, BatchPK.class, id -> new com.echothree.model.data.batch.common.pk.BatchPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>salesorderbatches.salordbtch_pm_paymentmethodid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, PaymentMethodPK> PAYMENT_METHOD = createField(DSL.name("salordbtch_pm_paymentmethodid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PaymentMethodPK.class, id -> new com.echothree.model.data.payment.common.pk.PaymentMethodPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>salesorderbatches.salordbtch_fromtime</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, Long> FROM_TIME = createField(DSL.name("salordbtch_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 078 079 /** 080 * The column <code>salesorderbatches.salordbtch_thrutime</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, Long> THRU_TIME = createField(DSL.name("salordbtch_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 083 084 private SalesOrderBatches(Name alias, Table<com.echothree.model.jooq.server.records.sales.SalesOrderBatches> aliased) { 085 this(alias, aliased, (Field<?>[]) null, null); 086 } 087 088 private SalesOrderBatches(Name alias, Table<com.echothree.model.jooq.server.records.sales.SalesOrderBatches> aliased, Field<?>[] parameters, Condition where) { 089 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 090 } 091 092 /** 093 * Create an aliased <code>salesorderbatches</code> table reference 094 */ 095 public SalesOrderBatches(String alias) { 096 this(DSL.name(alias), SalesOrderBatches); 097 } 098 099 /** 100 * Create an aliased <code>salesorderbatches</code> table reference 101 */ 102 public SalesOrderBatches(Name alias) { 103 this(alias, SalesOrderBatches); 104 } 105 106 /** 107 * Create a <code>salesorderbatches</code> table reference 108 */ 109 public SalesOrderBatches() { 110 this(DSL.name("salesorderbatches"), null); 111 } 112 113 @Override 114 public UniqueKey<com.echothree.model.jooq.server.records.sales.SalesOrderBatches> getPrimaryKey() { 115 return KeyRegistry.SALES_ORDER_BATCHES_PK; 116 } 117 118 @Override 119 public List<UniqueKey<com.echothree.model.jooq.server.records.sales.SalesOrderBatches>> getUniqueKeys() { 120 return Arrays.asList(KeyRegistry.SALES_ORDER_BATCHES_BATCH_AND_THRU_TIME_UK); 121 } 122 123 @Override 124 public List<ForeignKey<com.echothree.model.jooq.server.records.sales.SalesOrderBatches, ?>> getReferences() { 125 return Arrays.asList(KeyRegistry.SALES_ORDER_BATCHES_BATCH_FK, KeyRegistry.SALES_ORDER_BATCHES_PAYMENT_METHOD_FK); 126 } 127 128 private transient BatchesPath _salordbtch_btch_batchid_fk; 129 130 /** 131 * Get the implicit join path to the <code>batches</code> table. 132 */ 133 public BatchesPath salordbtch_btch_batchid_fk() { 134 if (_salordbtch_btch_batchid_fk == null) 135 _salordbtch_btch_batchid_fk = new BatchesPath(this, KeyRegistry.SALES_ORDER_BATCHES_BATCH_FK, null); 136 137 return _salordbtch_btch_batchid_fk; 138 } 139 140 private transient PaymentMethodsPath _salordbtch_pm_paymentmethodid_fk; 141 142 /** 143 * Get the implicit join path to the <code>paymentmethods</code> table. 144 */ 145 public PaymentMethodsPath salordbtch_pm_paymentmethodid_fk() { 146 if (_salordbtch_pm_paymentmethodid_fk == null) 147 _salordbtch_pm_paymentmethodid_fk = new PaymentMethodsPath(this, KeyRegistry.SALES_ORDER_BATCHES_PAYMENT_METHOD_FK, null); 148 149 return _salordbtch_pm_paymentmethodid_fk; 150 } 151 152 @Override 153 public SalesOrderBatches as(String alias) { 154 return new SalesOrderBatches(DSL.name(alias), this); 155 } 156 157 @Override 158 public SalesOrderBatches as(Name alias) { 159 return new SalesOrderBatches(alias, this); 160 } 161 162 @Override 163 public SalesOrderBatches as(Table<?> alias) { 164 return new SalesOrderBatches(alias.getQualifiedName(), this); 165 } 166 167 /** 168 * Rename this table 169 */ 170 @Override 171 public SalesOrderBatches rename(String name) { 172 return new SalesOrderBatches(DSL.name(name), null); 173 } 174 175 /** 176 * Rename this table 177 */ 178 @Override 179 public SalesOrderBatches rename(Name name) { 180 return new SalesOrderBatches(name, null); 181 } 182 183 /** 184 * Rename this table 185 */ 186 @Override 187 public SalesOrderBatches rename(Table<?> name) { 188 return new SalesOrderBatches(name.getQualifiedName(), null); 189 } 190 191 /** 192 * Create an inline derived table from this table 193 */ 194 @Override 195 public SalesOrderBatches where(Condition condition) { 196 return new SalesOrderBatches(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 197 } 198 199 /** 200 * Create an inline derived table from this table 201 */ 202 @Override 203 public SalesOrderBatches where(Collection<? extends Condition> conditions) { 204 return where(DSL.and(conditions)); 205 } 206 207 /** 208 * Create an inline derived table from this table 209 */ 210 @Override 211 public SalesOrderBatches where(Condition... conditions) { 212 return where(DSL.and(conditions)); 213 } 214 215 /** 216 * Create an inline derived table from this table 217 */ 218 @Override 219 public SalesOrderBatches where(Field<Boolean> condition) { 220 return where(DSL.condition(condition)); 221 } 222 223 /** 224 * Create an inline derived table from this table 225 */ 226 @Override 227 @PlainSQL 228 public SalesOrderBatches where(SQL condition) { 229 return where(DSL.condition(condition)); 230 } 231 232 /** 233 * Create an inline derived table from this table 234 */ 235 @Override 236 @PlainSQL 237 public SalesOrderBatches where(@Stringly.SQL String condition) { 238 return where(DSL.condition(condition)); 239 } 240 241 /** 242 * Create an inline derived table from this table 243 */ 244 @Override 245 @PlainSQL 246 public SalesOrderBatches where(@Stringly.SQL String condition, Object... binds) { 247 return where(DSL.condition(condition, binds)); 248 } 249 250 /** 251 * Create an inline derived table from this table 252 */ 253 @Override 254 @PlainSQL 255 public SalesOrderBatches where(@Stringly.SQL String condition, QueryPart... parts) { 256 return where(DSL.condition(condition, parts)); 257 } 258 259 /** 260 * Create an inline derived table from this table 261 */ 262 @Override 263 public SalesOrderBatches whereExists(TableLike<?> select) { 264 return where(DSL.exists(select)); 265 } 266 267 /** 268 * Create an inline derived table from this table 269 */ 270 @Override 271 public SalesOrderBatches whereNotExists(TableLike<?> select) { 272 return where(DSL.notExists(select)); 273 } 274}