001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.invoice; 005 006 007import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK; 008import com.echothree.model.data.invoice.common.pk.InvoicePK; 009import com.echothree.model.data.invoice.common.pk.InvoiceRolePK; 010import com.echothree.model.data.invoice.common.pk.InvoiceRoleTypePK; 011import com.echothree.model.data.party.common.pk.PartyPK; 012import com.echothree.model.jooq.server.KeyRegistry; 013import com.echothree.model.jooq.server.tables.contact.PartyContactMechanisms.PartyContactMechanismsPath; 014import com.echothree.model.jooq.server.tables.invoice.InvoiceRoleTypes.InvoiceRoleTypesPath; 015import com.echothree.model.jooq.server.tables.invoice.Invoices.InvoicesPath; 016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 017 018import java.util.Arrays; 019import java.util.Collection; 020import java.util.List; 021 022import org.jooq.Condition; 023import org.jooq.Converter; 024import org.jooq.Field; 025import org.jooq.ForeignKey; 026import org.jooq.Name; 027import org.jooq.PlainSQL; 028import org.jooq.QueryPart; 029import org.jooq.SQL; 030import org.jooq.Stringly; 031import org.jooq.Table; 032import org.jooq.TableField; 033import org.jooq.TableLike; 034import org.jooq.TableOptions; 035import org.jooq.UniqueKey; 036import org.jooq.impl.DSL; 037import org.jooq.impl.Internal; 038import org.jooq.impl.SQLDataType; 039import org.jooq.impl.TableImpl; 040 041 042/** 043 * This class is generated by jOOQ. 044 */ 045@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 046public class InvoiceRoles extends TableImpl<com.echothree.model.jooq.server.records.invoice.InvoiceRoles> { 047 048 private static final long serialVersionUID = 1L; 049 050 /** 051 * The reference instance of <code>invoiceroles</code> 052 */ 053 public static final InvoiceRoles InvoiceRoles = new InvoiceRoles(); 054 055 /** 056 * The class holding records for this type 057 */ 058 @Override 059 public Class<com.echothree.model.jooq.server.records.invoice.InvoiceRoles> getRecordType() { 060 return com.echothree.model.jooq.server.records.invoice.InvoiceRoles.class; 061 } 062 063 /** 064 * The column <code>invoiceroles.invcr_invoiceroleid</code>. 065 */ 066 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, InvoiceRolePK> INVOICE_ROLE = createField(DSL.name("invcr_invoiceroleid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InvoiceRolePK.class, id -> new com.echothree.model.data.invoice.common.pk.InvoiceRolePK(id), primaryKey -> primaryKey.getEntityId())); 067 068 /** 069 * The column <code>invoiceroles.invcr_invc_invoiceid</code>. 070 */ 071 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, InvoicePK> INVOICE = createField(DSL.name("invcr_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())); 072 073 /** 074 * The column <code>invoiceroles.invcr_par_partyid</code>. 075 */ 076 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, PartyPK> PARTY = createField(DSL.name("invcr_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())); 077 078 /** 079 * The column <code>invoiceroles.invcr_pcm_partycontactmechanismid</code>. 080 */ 081 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, PartyContactMechanismPK> PARTY_CONTACT_MECHANISM = createField(DSL.name("invcr_pcm_partycontactmechanismid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyContactMechanismPK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPK(id), primaryKey -> primaryKey.getEntityId())); 082 083 /** 084 * The column <code>invoiceroles.invcr_invcrtyp_invoiceroletypeid</code>. 085 */ 086 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, InvoiceRoleTypePK> INVOICE_ROLE_TYPE = createField(DSL.name("invcr_invcrtyp_invoiceroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, InvoiceRoleTypePK.class, id -> new com.echothree.model.data.invoice.common.pk.InvoiceRoleTypePK(id), primaryKey -> primaryKey.getEntityId())); 087 088 /** 089 * The column <code>invoiceroles.invcr_fromtime</code>. 090 */ 091 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, Long> FROM_TIME = createField(DSL.name("invcr_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 092 093 /** 094 * The column <code>invoiceroles.invcr_thrutime</code>. 095 */ 096 public final TableField<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, Long> THRU_TIME = createField(DSL.name("invcr_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 097 098 private InvoiceRoles(Name alias, Table<com.echothree.model.jooq.server.records.invoice.InvoiceRoles> aliased) { 099 this(alias, aliased, (Field<?>[]) null, null); 100 } 101 102 private InvoiceRoles(Name alias, Table<com.echothree.model.jooq.server.records.invoice.InvoiceRoles> aliased, Field<?>[] parameters, Condition where) { 103 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 104 } 105 106 /** 107 * Create an aliased <code>invoiceroles</code> table reference 108 */ 109 public InvoiceRoles(String alias) { 110 this(DSL.name(alias), InvoiceRoles); 111 } 112 113 /** 114 * Create an aliased <code>invoiceroles</code> table reference 115 */ 116 public InvoiceRoles(Name alias) { 117 this(alias, InvoiceRoles); 118 } 119 120 /** 121 * Create a <code>invoiceroles</code> table reference 122 */ 123 public InvoiceRoles() { 124 this(DSL.name("invoiceroles"), null); 125 } 126 127 @Override 128 public UniqueKey<com.echothree.model.jooq.server.records.invoice.InvoiceRoles> getPrimaryKey() { 129 return KeyRegistry.INVOICE_ROLES_PK; 130 } 131 132 @Override 133 public List<UniqueKey<com.echothree.model.jooq.server.records.invoice.InvoiceRoles>> getUniqueKeys() { 134 return Arrays.asList(KeyRegistry.INVOICE_ROLES_INVOICE_AND_INVOICE_ROLE_TYPE_AND_THRU_TIME_UK); 135 } 136 137 @Override 138 public List<ForeignKey<com.echothree.model.jooq.server.records.invoice.InvoiceRoles, ?>> getReferences() { 139 return Arrays.asList(KeyRegistry.INVOICE_ROLES_INVOICE_FK, KeyRegistry.INVOICE_ROLES_INVOICE_ROLE_TYPE_FK, KeyRegistry.INVOICE_ROLES_PARTY_FK, KeyRegistry.INVOICE_ROLES_PARTY_CONTACT_MECHANISM_FK); 140 } 141 142 private transient InvoicesPath _invcr_invc_invoiceid_fk; 143 144 /** 145 * Get the implicit join path to the <code>invoices</code> table. 146 */ 147 public InvoicesPath invcr_invc_invoiceid_fk() { 148 if (_invcr_invc_invoiceid_fk == null) 149 _invcr_invc_invoiceid_fk = new InvoicesPath(this, KeyRegistry.INVOICE_ROLES_INVOICE_FK, null); 150 151 return _invcr_invc_invoiceid_fk; 152 } 153 154 private transient InvoiceRoleTypesPath _invcr_invcrtyp_invoiceroletypeid_fk; 155 156 /** 157 * Get the implicit join path to the <code>invoiceroletypes</code> table. 158 */ 159 public InvoiceRoleTypesPath invcr_invcrtyp_invoiceroletypeid_fk() { 160 if (_invcr_invcrtyp_invoiceroletypeid_fk == null) 161 _invcr_invcrtyp_invoiceroletypeid_fk = new InvoiceRoleTypesPath(this, KeyRegistry.INVOICE_ROLES_INVOICE_ROLE_TYPE_FK, null); 162 163 return _invcr_invcrtyp_invoiceroletypeid_fk; 164 } 165 166 private transient PartiesPath _invcr_par_partyid_fk; 167 168 /** 169 * Get the implicit join path to the <code>parties</code> table. 170 */ 171 public PartiesPath invcr_par_partyid_fk() { 172 if (_invcr_par_partyid_fk == null) 173 _invcr_par_partyid_fk = new PartiesPath(this, KeyRegistry.INVOICE_ROLES_PARTY_FK, null); 174 175 return _invcr_par_partyid_fk; 176 } 177 178 private transient PartyContactMechanismsPath _invcr_pcm_partycontactmechanismid_fk; 179 180 /** 181 * Get the implicit join path to the <code>partycontactmechanisms</code> 182 * table. 183 */ 184 public PartyContactMechanismsPath invcr_pcm_partycontactmechanismid_fk() { 185 if (_invcr_pcm_partycontactmechanismid_fk == null) 186 _invcr_pcm_partycontactmechanismid_fk = new PartyContactMechanismsPath(this, KeyRegistry.INVOICE_ROLES_PARTY_CONTACT_MECHANISM_FK, null); 187 188 return _invcr_pcm_partycontactmechanismid_fk; 189 } 190 191 @Override 192 public InvoiceRoles as(String alias) { 193 return new InvoiceRoles(DSL.name(alias), this); 194 } 195 196 @Override 197 public InvoiceRoles as(Name alias) { 198 return new InvoiceRoles(alias, this); 199 } 200 201 @Override 202 public InvoiceRoles as(Table<?> alias) { 203 return new InvoiceRoles(alias.getQualifiedName(), this); 204 } 205 206 /** 207 * Rename this table 208 */ 209 @Override 210 public InvoiceRoles rename(String name) { 211 return new InvoiceRoles(DSL.name(name), null); 212 } 213 214 /** 215 * Rename this table 216 */ 217 @Override 218 public InvoiceRoles rename(Name name) { 219 return new InvoiceRoles(name, null); 220 } 221 222 /** 223 * Rename this table 224 */ 225 @Override 226 public InvoiceRoles rename(Table<?> name) { 227 return new InvoiceRoles(name.getQualifiedName(), null); 228 } 229 230 /** 231 * Create an inline derived table from this table 232 */ 233 @Override 234 public InvoiceRoles where(Condition condition) { 235 return new InvoiceRoles(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 236 } 237 238 /** 239 * Create an inline derived table from this table 240 */ 241 @Override 242 public InvoiceRoles where(Collection<? extends Condition> conditions) { 243 return where(DSL.and(conditions)); 244 } 245 246 /** 247 * Create an inline derived table from this table 248 */ 249 @Override 250 public InvoiceRoles where(Condition... conditions) { 251 return where(DSL.and(conditions)); 252 } 253 254 /** 255 * Create an inline derived table from this table 256 */ 257 @Override 258 public InvoiceRoles where(Field<Boolean> condition) { 259 return where(DSL.condition(condition)); 260 } 261 262 /** 263 * Create an inline derived table from this table 264 */ 265 @Override 266 @PlainSQL 267 public InvoiceRoles where(SQL condition) { 268 return where(DSL.condition(condition)); 269 } 270 271 /** 272 * Create an inline derived table from this table 273 */ 274 @Override 275 @PlainSQL 276 public InvoiceRoles where(@Stringly.SQL String condition) { 277 return where(DSL.condition(condition)); 278 } 279 280 /** 281 * Create an inline derived table from this table 282 */ 283 @Override 284 @PlainSQL 285 public InvoiceRoles where(@Stringly.SQL String condition, Object... binds) { 286 return where(DSL.condition(condition, binds)); 287 } 288 289 /** 290 * Create an inline derived table from this table 291 */ 292 @Override 293 @PlainSQL 294 public InvoiceRoles where(@Stringly.SQL String condition, QueryPart... parts) { 295 return where(DSL.condition(condition, parts)); 296 } 297 298 /** 299 * Create an inline derived table from this table 300 */ 301 @Override 302 public InvoiceRoles whereExists(TableLike<?> select) { 303 return where(DSL.exists(select)); 304 } 305 306 /** 307 * Create an inline derived table from this table 308 */ 309 @Override 310 public InvoiceRoles whereNotExists(TableLike<?> select) { 311 return where(DSL.notExists(select)); 312 } 313}