001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.invoice; 005 006 007import com.echothree.model.data.accounting.common.pk.GlAccountPK; 008import com.echothree.model.data.invoice.common.pk.InvoiceDetailPK; 009import com.echothree.model.data.invoice.common.pk.InvoicePK; 010import com.echothree.model.data.invoice.common.pk.InvoiceTypePK; 011import com.echothree.model.data.payment.common.pk.BillingAccountPK; 012import com.echothree.model.data.shipment.common.pk.FreeOnBoardPK; 013import com.echothree.model.data.term.common.pk.TermPK; 014import com.echothree.model.jooq.server.KeyRegistry; 015import com.echothree.model.jooq.server.tables.accounting.GlAccounts.GlAccountsPath; 016import com.echothree.model.jooq.server.tables.invoice.InvoiceTypes.InvoiceTypesPath; 017import com.echothree.model.jooq.server.tables.invoice.Invoices.InvoicesPath; 018import com.echothree.model.jooq.server.tables.payment.BillingAccounts.BillingAccountsPath; 019import com.echothree.model.jooq.server.tables.shipment.FreeOnBoards.FreeOnBoardsPath; 020import com.echothree.model.jooq.server.tables.term.Terms.TermsPath; 021 022import java.util.Arrays; 023import java.util.Collection; 024import java.util.List; 025 026import org.jooq.Condition; 027import org.jooq.Converter; 028import org.jooq.Field; 029import org.jooq.ForeignKey; 030import org.jooq.InverseForeignKey; 031import org.jooq.Name; 032import org.jooq.Path; 033import org.jooq.PlainSQL; 034import org.jooq.QueryPart; 035import org.jooq.Record; 036import org.jooq.SQL; 037import org.jooq.Stringly; 038import org.jooq.Table; 039import org.jooq.TableField; 040import org.jooq.TableLike; 041import org.jooq.TableOptions; 042import org.jooq.UniqueKey; 043import org.jooq.impl.DSL; 044import org.jooq.impl.Internal; 045import org.jooq.impl.SQLDataType; 046import org.jooq.impl.TableImpl; 047 048 049/** 050 * This class is generated by jOOQ. 051 */ 052@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 053public class InvoiceDetails extends TableImpl<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> { 054 055 private static final long serialVersionUID = 1L; 056 057 /** 058 * The reference instance of <code>invoicedetails</code> 059 */ 060 public static final InvoiceDetails InvoiceDetails = new InvoiceDetails(); 061 062 /** 063 * The class holding records for this type 064 */ 065 @Override 066 public Class<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> getRecordType() { 067 return com.echothree.model.jooq.server.records.invoice.InvoiceDetails.class; 068 } 069 070 /** 071 * The column <code>invoicedetails.invcdt_invoicedetailid</code>. 072 */ 073 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, InvoiceDetailPK> INVOICE_DETAIL = createField(DSL.name("invcdt_invoicedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InvoiceDetailPK.class, id -> new com.echothree.model.data.invoice.common.pk.InvoiceDetailPK(id), primaryKey -> primaryKey.getEntityId())); 074 075 /** 076 * The column <code>invoicedetails.invcdt_invc_invoiceid</code>. 077 */ 078 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, InvoicePK> INVOICE = createField(DSL.name("invcdt_invc_invoiceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InvoicePK.class, id -> new com.echothree.model.data.invoice.common.pk.InvoicePK(id), primaryKey -> primaryKey.getEntityId())); 079 080 /** 081 * The column <code>invoicedetails.invcdt_invctyp_invoicetypeid</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, InvoiceTypePK> INVOICE_TYPE = createField(DSL.name("invcdt_invctyp_invoicetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InvoiceTypePK.class, id -> new com.echothree.model.data.invoice.common.pk.InvoiceTypePK(id), primaryKey -> primaryKey.getEntityId())); 084 085 /** 086 * The column <code>invoicedetails.invcdt_invoicename</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, String> INVOICE_NAME = createField(DSL.name("invcdt_invoicename"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 089 090 /** 091 * The column <code>invoicedetails.invcdt_bllact_billingaccountid</code>. 092 */ 093 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, BillingAccountPK> BILLING_ACCOUNT = createField(DSL.name("invcdt_bllact_billingaccountid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, BillingAccountPK.class, id -> new com.echothree.model.data.payment.common.pk.BillingAccountPK(id), primaryKey -> primaryKey.getEntityId())); 094 095 /** 096 * The column <code>invoicedetails.invcdt_gla_glaccountid</code>. 097 */ 098 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, GlAccountPK> GL_ACCOUNT = createField(DSL.name("invcdt_gla_glaccountid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GlAccountPK.class, id -> new com.echothree.model.data.accounting.common.pk.GlAccountPK(id), primaryKey -> primaryKey.getEntityId())); 099 100 /** 101 * The column <code>invoicedetails.invcdt_trm_termid</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, TermPK> TERM = createField(DSL.name("invcdt_trm_termid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TermPK.class, id -> new com.echothree.model.data.term.common.pk.TermPK(id), primaryKey -> primaryKey.getEntityId())); 104 105 /** 106 * The column <code>invoicedetails.invcdt_fob_freeonboardid</code>. 107 */ 108 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, FreeOnBoardPK> FREE_ON_BOARD = createField(DSL.name("invcdt_fob_freeonboardid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, FreeOnBoardPK.class, id -> new com.echothree.model.data.shipment.common.pk.FreeOnBoardPK(id), primaryKey -> primaryKey.getEntityId())); 109 110 /** 111 * The column <code>invoicedetails.invcdt_reference</code>. 112 */ 113 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, String> REFERENCE = createField(DSL.name("invcdt_reference"), SQLDataType.VARCHAR(40), this, ""); 114 115 /** 116 * The column <code>invoicedetails.invcdt_description</code>. 117 */ 118 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, String> DESCRIPTION = createField(DSL.name("invcdt_description"), SQLDataType.VARCHAR(132), this, ""); 119 120 /** 121 * The column <code>invoicedetails.invcdt_fromtime</code>. 122 */ 123 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, Long> FROM_TIME = createField(DSL.name("invcdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 124 125 /** 126 * The column <code>invoicedetails.invcdt_thrutime</code>. 127 */ 128 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, Long> THRU_TIME = createField(DSL.name("invcdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 129 130 private InvoiceDetails(Name alias, Table<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> aliased) { 131 this(alias, aliased, (Field<?>[]) null, null); 132 } 133 134 private InvoiceDetails(Name alias, Table<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> aliased, Field<?>[] parameters, Condition where) { 135 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 136 } 137 138 /** 139 * Create an aliased <code>invoicedetails</code> table reference 140 */ 141 public InvoiceDetails(String alias) { 142 this(DSL.name(alias), InvoiceDetails); 143 } 144 145 /** 146 * Create an aliased <code>invoicedetails</code> table reference 147 */ 148 public InvoiceDetails(Name alias) { 149 this(alias, InvoiceDetails); 150 } 151 152 /** 153 * Create a <code>invoicedetails</code> table reference 154 */ 155 public InvoiceDetails() { 156 this(DSL.name("invoicedetails"), null); 157 } 158 159 public <O extends Record> InvoiceDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.invoice.InvoiceDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.invoice.InvoiceDetails> parentPath) { 160 super(path, childPath, parentPath, InvoiceDetails); 161 } 162 163 /** 164 * A subtype implementing {@link Path} for simplified path-based joins. 165 */ 166 public static class InvoiceDetailsPath extends InvoiceDetails implements Path<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> { 167 168 private static final long serialVersionUID = 1L; 169 public <O extends Record> InvoiceDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.invoice.InvoiceDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.invoice.InvoiceDetails> parentPath) { 170 super(path, childPath, parentPath); 171 } 172 private InvoiceDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> aliased) { 173 super(alias, aliased); 174 } 175 176 @Override 177 public InvoiceDetailsPath as(String alias) { 178 return new InvoiceDetailsPath(DSL.name(alias), this); 179 } 180 181 @Override 182 public InvoiceDetailsPath as(Name alias) { 183 return new InvoiceDetailsPath(alias, this); 184 } 185 186 @Override 187 public InvoiceDetailsPath as(Table<?> alias) { 188 return new InvoiceDetailsPath(alias.getQualifiedName(), this); 189 } 190 } 191 192 @Override 193 public UniqueKey<com.echothree.model.jooq.server.records.invoice.InvoiceDetails> getPrimaryKey() { 194 return KeyRegistry.INVOICE_DETAILS_PK; 195 } 196 197 @Override 198 public List<UniqueKey<com.echothree.model.jooq.server.records.invoice.InvoiceDetails>> getUniqueKeys() { 199 return Arrays.asList(KeyRegistry.INVOICE_DETAILS_INVOICE_AND_THRU_TIME_UK, KeyRegistry.INVOICE_DETAILS_INVOICE_TYPE_AND_INVOICE_NAME_AND_THRU_TIME_UK); 200 } 201 202 @Override 203 public List<ForeignKey<com.echothree.model.jooq.server.records.invoice.InvoiceDetails, ?>> getReferences() { 204 return Arrays.asList(KeyRegistry.INVOICE_DETAILS_BILLING_ACCOUNT_FK, KeyRegistry.INVOICE_DETAILS_FREE_ON_BOARD_FK, KeyRegistry.INVOICE_DETAILS_GL_ACCOUNT_FK, KeyRegistry.INVOICE_DETAILS_INVOICE_FK, KeyRegistry.INVOICE_DETAILS_INVOICE_TYPE_FK, KeyRegistry.INVOICE_DETAILS_TERM_FK); 205 } 206 207 private transient BillingAccountsPath _invcdt_bllact_billingaccountid_fk; 208 209 /** 210 * Get the implicit join path to the <code>billingaccounts</code> table. 211 */ 212 public BillingAccountsPath invcdt_bllact_billingaccountid_fk() { 213 if (_invcdt_bllact_billingaccountid_fk == null) 214 _invcdt_bllact_billingaccountid_fk = new BillingAccountsPath(this, KeyRegistry.INVOICE_DETAILS_BILLING_ACCOUNT_FK, null); 215 216 return _invcdt_bllact_billingaccountid_fk; 217 } 218 219 private transient FreeOnBoardsPath _invcdt_fob_freeonboardid_fk; 220 221 /** 222 * Get the implicit join path to the <code>freeonboards</code> table. 223 */ 224 public FreeOnBoardsPath invcdt_fob_freeonboardid_fk() { 225 if (_invcdt_fob_freeonboardid_fk == null) 226 _invcdt_fob_freeonboardid_fk = new FreeOnBoardsPath(this, KeyRegistry.INVOICE_DETAILS_FREE_ON_BOARD_FK, null); 227 228 return _invcdt_fob_freeonboardid_fk; 229 } 230 231 private transient GlAccountsPath _invcdt_gla_glaccountid_fk; 232 233 /** 234 * Get the implicit join path to the <code>glaccounts</code> table. 235 */ 236 public GlAccountsPath invcdt_gla_glaccountid_fk() { 237 if (_invcdt_gla_glaccountid_fk == null) 238 _invcdt_gla_glaccountid_fk = new GlAccountsPath(this, KeyRegistry.INVOICE_DETAILS_GL_ACCOUNT_FK, null); 239 240 return _invcdt_gla_glaccountid_fk; 241 } 242 243 private transient InvoicesPath _invcdt_invc_invoiceid_fk; 244 245 /** 246 * Get the implicit join path to the <code>invoices</code> table. 247 */ 248 public InvoicesPath invcdt_invc_invoiceid_fk() { 249 if (_invcdt_invc_invoiceid_fk == null) 250 _invcdt_invc_invoiceid_fk = new InvoicesPath(this, KeyRegistry.INVOICE_DETAILS_INVOICE_FK, null); 251 252 return _invcdt_invc_invoiceid_fk; 253 } 254 255 private transient InvoiceTypesPath _invcdt_invctyp_invoicetypeid_fk; 256 257 /** 258 * Get the implicit join path to the <code>invoicetypes</code> table. 259 */ 260 public InvoiceTypesPath invcdt_invctyp_invoicetypeid_fk() { 261 if (_invcdt_invctyp_invoicetypeid_fk == null) 262 _invcdt_invctyp_invoicetypeid_fk = new InvoiceTypesPath(this, KeyRegistry.INVOICE_DETAILS_INVOICE_TYPE_FK, null); 263 264 return _invcdt_invctyp_invoicetypeid_fk; 265 } 266 267 private transient TermsPath _invcdt_trm_termid_fk; 268 269 /** 270 * Get the implicit join path to the <code>terms</code> table. 271 */ 272 public TermsPath invcdt_trm_termid_fk() { 273 if (_invcdt_trm_termid_fk == null) 274 _invcdt_trm_termid_fk = new TermsPath(this, KeyRegistry.INVOICE_DETAILS_TERM_FK, null); 275 276 return _invcdt_trm_termid_fk; 277 } 278 279 @Override 280 public InvoiceDetails as(String alias) { 281 return new InvoiceDetails(DSL.name(alias), this); 282 } 283 284 @Override 285 public InvoiceDetails as(Name alias) { 286 return new InvoiceDetails(alias, this); 287 } 288 289 @Override 290 public InvoiceDetails as(Table<?> alias) { 291 return new InvoiceDetails(alias.getQualifiedName(), this); 292 } 293 294 /** 295 * Rename this table 296 */ 297 @Override 298 public InvoiceDetails rename(String name) { 299 return new InvoiceDetails(DSL.name(name), null); 300 } 301 302 /** 303 * Rename this table 304 */ 305 @Override 306 public InvoiceDetails rename(Name name) { 307 return new InvoiceDetails(name, null); 308 } 309 310 /** 311 * Rename this table 312 */ 313 @Override 314 public InvoiceDetails rename(Table<?> name) { 315 return new InvoiceDetails(name.getQualifiedName(), null); 316 } 317 318 /** 319 * Create an inline derived table from this table 320 */ 321 @Override 322 public InvoiceDetails where(Condition condition) { 323 return new InvoiceDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 324 } 325 326 /** 327 * Create an inline derived table from this table 328 */ 329 @Override 330 public InvoiceDetails where(Collection<? extends Condition> conditions) { 331 return where(DSL.and(conditions)); 332 } 333 334 /** 335 * Create an inline derived table from this table 336 */ 337 @Override 338 public InvoiceDetails where(Condition... conditions) { 339 return where(DSL.and(conditions)); 340 } 341 342 /** 343 * Create an inline derived table from this table 344 */ 345 @Override 346 public InvoiceDetails where(Field<Boolean> condition) { 347 return where(DSL.condition(condition)); 348 } 349 350 /** 351 * Create an inline derived table from this table 352 */ 353 @Override 354 @PlainSQL 355 public InvoiceDetails where(SQL condition) { 356 return where(DSL.condition(condition)); 357 } 358 359 /** 360 * Create an inline derived table from this table 361 */ 362 @Override 363 @PlainSQL 364 public InvoiceDetails where(@Stringly.SQL String condition) { 365 return where(DSL.condition(condition)); 366 } 367 368 /** 369 * Create an inline derived table from this table 370 */ 371 @Override 372 @PlainSQL 373 public InvoiceDetails where(@Stringly.SQL String condition, Object... binds) { 374 return where(DSL.condition(condition, binds)); 375 } 376 377 /** 378 * Create an inline derived table from this table 379 */ 380 @Override 381 @PlainSQL 382 public InvoiceDetails where(@Stringly.SQL String condition, QueryPart... parts) { 383 return where(DSL.condition(condition, parts)); 384 } 385 386 /** 387 * Create an inline derived table from this table 388 */ 389 @Override 390 public InvoiceDetails whereExists(TableLike<?> select) { 391 return where(DSL.exists(select)); 392 } 393 394 /** 395 * Create an inline derived table from this table 396 */ 397 @Override 398 public InvoiceDetails whereNotExists(TableLike<?> select) { 399 return where(DSL.notExists(select)); 400 } 401}