001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.tax; 005 006 007import com.echothree.model.data.accounting.common.pk.GlAccountPK; 008import com.echothree.model.data.contact.common.pk.ContactMechanismPurposePK; 009import com.echothree.model.data.tax.common.pk.TaxDetailPK; 010import com.echothree.model.data.tax.common.pk.TaxPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.accounting.GlAccounts.GlAccountsPath; 013import com.echothree.model.jooq.server.tables.contact.ContactMechanismPurposes.ContactMechanismPurposesPath; 014import com.echothree.model.jooq.server.tables.tax.Taxes.TaxesPath; 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.InverseForeignKey; 025import org.jooq.Name; 026import org.jooq.Path; 027import org.jooq.PlainSQL; 028import org.jooq.QueryPart; 029import org.jooq.Record; 030import org.jooq.SQL; 031import org.jooq.Stringly; 032import org.jooq.Table; 033import org.jooq.TableField; 034import org.jooq.TableLike; 035import org.jooq.TableOptions; 036import org.jooq.UniqueKey; 037import org.jooq.impl.DSL; 038import org.jooq.impl.Internal; 039import org.jooq.impl.SQLDataType; 040import org.jooq.impl.TableImpl; 041 042 043/** 044 * This class is generated by jOOQ. 045 */ 046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 047public class TaxDetails extends TableImpl<com.echothree.model.jooq.server.records.tax.TaxDetails> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>taxdetails</code> 053 */ 054 public static final TaxDetails TaxDetails = new TaxDetails(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.tax.TaxDetails> getRecordType() { 061 return com.echothree.model.jooq.server.records.tax.TaxDetails.class; 062 } 063 064 /** 065 * The column <code>taxdetails.txdt_taxdetailid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, TaxDetailPK> TAX_DETAIL = createField(DSL.name("txdt_taxdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TaxDetailPK.class, id -> new com.echothree.model.data.tax.common.pk.TaxDetailPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>taxdetails.txdt_tx_taxid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, TaxPK> TAX = createField(DSL.name("txdt_tx_taxid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, TaxPK.class, id -> new com.echothree.model.data.tax.common.pk.TaxPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>taxdetails.txdt_taxname</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, String> TAX_NAME = createField(DSL.name("txdt_taxname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 078 079 /** 080 * The column <code>taxdetails.txdt_cmpr_contactmechanismpurposeid</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, ContactMechanismPurposePK> CONTACT_MECHANISM_PURPOSE = createField(DSL.name("txdt_cmpr_contactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPurposePK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId())); 083 084 /** 085 * The column <code>taxdetails.txdt_gla_glaccountid</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, GlAccountPK> GL_ACCOUNT = createField(DSL.name("txdt_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())); 088 089 /** 090 * The column <code>taxdetails.txdt_includeshippingcharge</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Boolean> INCLUDE_SHIPPING_CHARGE = createField(DSL.name("txdt_includeshippingcharge"), SQLDataType.BIT.nullable(false), this, ""); 093 094 /** 095 * The column <code>taxdetails.txdt_includeprocessingcharge</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Boolean> INCLUDE_PROCESSING_CHARGE = createField(DSL.name("txdt_includeprocessingcharge"), SQLDataType.BIT.nullable(false), this, ""); 098 099 /** 100 * The column <code>taxdetails.txdt_includeinsurancecharge</code>. 101 */ 102 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Boolean> INCLUDE_INSURANCE_CHARGE = createField(DSL.name("txdt_includeinsurancecharge"), SQLDataType.BIT.nullable(false), this, ""); 103 104 /** 105 * The column <code>taxdetails.txdt_percent</code>. 106 */ 107 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Integer> PERCENT = createField(DSL.name("txdt_percent"), SQLDataType.INTEGER.nullable(false), this, ""); 108 109 /** 110 * The column <code>taxdetails.txdt_isdefault</code>. 111 */ 112 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Boolean> IS_DEFAULT = createField(DSL.name("txdt_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 113 114 /** 115 * The column <code>taxdetails.txdt_sortorder</code>. 116 */ 117 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Integer> SORT_ORDER = createField(DSL.name("txdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 118 119 /** 120 * The column <code>taxdetails.txdt_fromtime</code>. 121 */ 122 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Long> FROM_TIME = createField(DSL.name("txdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 123 124 /** 125 * The column <code>taxdetails.txdt_thrutime</code>. 126 */ 127 public final TableField<com.echothree.model.jooq.server.records.tax.TaxDetails, Long> THRU_TIME = createField(DSL.name("txdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 128 129 private TaxDetails(Name alias, Table<com.echothree.model.jooq.server.records.tax.TaxDetails> aliased) { 130 this(alias, aliased, (Field<?>[]) null, null); 131 } 132 133 private TaxDetails(Name alias, Table<com.echothree.model.jooq.server.records.tax.TaxDetails> aliased, Field<?>[] parameters, Condition where) { 134 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 135 } 136 137 /** 138 * Create an aliased <code>taxdetails</code> table reference 139 */ 140 public TaxDetails(String alias) { 141 this(DSL.name(alias), TaxDetails); 142 } 143 144 /** 145 * Create an aliased <code>taxdetails</code> table reference 146 */ 147 public TaxDetails(Name alias) { 148 this(alias, TaxDetails); 149 } 150 151 /** 152 * Create a <code>taxdetails</code> table reference 153 */ 154 public TaxDetails() { 155 this(DSL.name("taxdetails"), null); 156 } 157 158 public <O extends Record> TaxDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.tax.TaxDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.tax.TaxDetails> parentPath) { 159 super(path, childPath, parentPath, TaxDetails); 160 } 161 162 /** 163 * A subtype implementing {@link Path} for simplified path-based joins. 164 */ 165 public static class TaxDetailsPath extends TaxDetails implements Path<com.echothree.model.jooq.server.records.tax.TaxDetails> { 166 167 private static final long serialVersionUID = 1L; 168 public <O extends Record> TaxDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.tax.TaxDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.tax.TaxDetails> parentPath) { 169 super(path, childPath, parentPath); 170 } 171 private TaxDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.tax.TaxDetails> aliased) { 172 super(alias, aliased); 173 } 174 175 @Override 176 public TaxDetailsPath as(String alias) { 177 return new TaxDetailsPath(DSL.name(alias), this); 178 } 179 180 @Override 181 public TaxDetailsPath as(Name alias) { 182 return new TaxDetailsPath(alias, this); 183 } 184 185 @Override 186 public TaxDetailsPath as(Table<?> alias) { 187 return new TaxDetailsPath(alias.getQualifiedName(), this); 188 } 189 } 190 191 @Override 192 public UniqueKey<com.echothree.model.jooq.server.records.tax.TaxDetails> getPrimaryKey() { 193 return KeyRegistry.TAX_DETAILS_PK; 194 } 195 196 @Override 197 public List<UniqueKey<com.echothree.model.jooq.server.records.tax.TaxDetails>> getUniqueKeys() { 198 return Arrays.asList(KeyRegistry.TAX_DETAILS_TAX_AND_THRU_TIME_UK, KeyRegistry.TAX_DETAILS_TAX_NAME_AND_THRU_TIME_UK); 199 } 200 201 @Override 202 public List<ForeignKey<com.echothree.model.jooq.server.records.tax.TaxDetails, ?>> getReferences() { 203 return Arrays.asList(KeyRegistry.TAX_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, KeyRegistry.TAX_DETAILS_GL_ACCOUNT_FK, KeyRegistry.TAX_DETAILS_TAX_FK); 204 } 205 206 private transient ContactMechanismPurposesPath _txdt_cmpr_contactmechanismpurposeid_fk; 207 208 /** 209 * Get the implicit join path to the <code>contactmechanismpurposes</code> 210 * table. 211 */ 212 public ContactMechanismPurposesPath txdt_cmpr_contactmechanismpurposeid_fk() { 213 if (_txdt_cmpr_contactmechanismpurposeid_fk == null) 214 _txdt_cmpr_contactmechanismpurposeid_fk = new ContactMechanismPurposesPath(this, KeyRegistry.TAX_DETAILS_CONTACT_MECHANISM_PURPOSE_FK, null); 215 216 return _txdt_cmpr_contactmechanismpurposeid_fk; 217 } 218 219 private transient GlAccountsPath _txdt_gla_glaccountid_fk; 220 221 /** 222 * Get the implicit join path to the <code>glaccounts</code> table. 223 */ 224 public GlAccountsPath txdt_gla_glaccountid_fk() { 225 if (_txdt_gla_glaccountid_fk == null) 226 _txdt_gla_glaccountid_fk = new GlAccountsPath(this, KeyRegistry.TAX_DETAILS_GL_ACCOUNT_FK, null); 227 228 return _txdt_gla_glaccountid_fk; 229 } 230 231 private transient TaxesPath _txdt_tx_taxid_fk; 232 233 /** 234 * Get the implicit join path to the <code>taxes</code> table. 235 */ 236 public TaxesPath txdt_tx_taxid_fk() { 237 if (_txdt_tx_taxid_fk == null) 238 _txdt_tx_taxid_fk = new TaxesPath(this, KeyRegistry.TAX_DETAILS_TAX_FK, null); 239 240 return _txdt_tx_taxid_fk; 241 } 242 243 @Override 244 public TaxDetails as(String alias) { 245 return new TaxDetails(DSL.name(alias), this); 246 } 247 248 @Override 249 public TaxDetails as(Name alias) { 250 return new TaxDetails(alias, this); 251 } 252 253 @Override 254 public TaxDetails as(Table<?> alias) { 255 return new TaxDetails(alias.getQualifiedName(), this); 256 } 257 258 /** 259 * Rename this table 260 */ 261 @Override 262 public TaxDetails rename(String name) { 263 return new TaxDetails(DSL.name(name), null); 264 } 265 266 /** 267 * Rename this table 268 */ 269 @Override 270 public TaxDetails rename(Name name) { 271 return new TaxDetails(name, null); 272 } 273 274 /** 275 * Rename this table 276 */ 277 @Override 278 public TaxDetails rename(Table<?> name) { 279 return new TaxDetails(name.getQualifiedName(), null); 280 } 281 282 /** 283 * Create an inline derived table from this table 284 */ 285 @Override 286 public TaxDetails where(Condition condition) { 287 return new TaxDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 288 } 289 290 /** 291 * Create an inline derived table from this table 292 */ 293 @Override 294 public TaxDetails where(Collection<? extends Condition> conditions) { 295 return where(DSL.and(conditions)); 296 } 297 298 /** 299 * Create an inline derived table from this table 300 */ 301 @Override 302 public TaxDetails where(Condition... conditions) { 303 return where(DSL.and(conditions)); 304 } 305 306 /** 307 * Create an inline derived table from this table 308 */ 309 @Override 310 public TaxDetails where(Field<Boolean> condition) { 311 return where(DSL.condition(condition)); 312 } 313 314 /** 315 * Create an inline derived table from this table 316 */ 317 @Override 318 @PlainSQL 319 public TaxDetails where(SQL condition) { 320 return where(DSL.condition(condition)); 321 } 322 323 /** 324 * Create an inline derived table from this table 325 */ 326 @Override 327 @PlainSQL 328 public TaxDetails where(@Stringly.SQL String condition) { 329 return where(DSL.condition(condition)); 330 } 331 332 /** 333 * Create an inline derived table from this table 334 */ 335 @Override 336 @PlainSQL 337 public TaxDetails where(@Stringly.SQL String condition, Object... binds) { 338 return where(DSL.condition(condition, binds)); 339 } 340 341 /** 342 * Create an inline derived table from this table 343 */ 344 @Override 345 @PlainSQL 346 public TaxDetails where(@Stringly.SQL String condition, QueryPart... parts) { 347 return where(DSL.condition(condition, parts)); 348 } 349 350 /** 351 * Create an inline derived table from this table 352 */ 353 @Override 354 public TaxDetails whereExists(TableLike<?> select) { 355 return where(DSL.exists(select)); 356 } 357 358 /** 359 * Create an inline derived table from this table 360 */ 361 @Override 362 public TaxDetails whereNotExists(TableLike<?> select) { 363 return where(DSL.notExists(select)); 364 } 365}