001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.contact; 005 006 007import com.echothree.model.data.contact.common.pk.ContactMechanismPK; 008import com.echothree.model.data.contact.common.pk.ContactPostalAddressPK; 009import com.echothree.model.data.geo.common.pk.GeoCodePK; 010import com.echothree.model.data.party.common.pk.NameSuffixPK; 011import com.echothree.model.data.party.common.pk.PersonalTitlePK; 012import com.echothree.model.jooq.server.KeyRegistry; 013import com.echothree.model.jooq.server.tables.contact.ContactMechanisms.ContactMechanismsPath; 014import com.echothree.model.jooq.server.tables.geo.GeoCodes.GeoCodesPath; 015import com.echothree.model.jooq.server.tables.party.NameSuffixes.NameSuffixesPath; 016import com.echothree.model.jooq.server.tables.party.PersonalTitles.PersonalTitlesPath; 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 ContactPostalAddresses extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses> { 047 048 private static final long serialVersionUID = 1L; 049 050 /** 051 * The reference instance of <code>contactpostaladdresses</code> 052 */ 053 public static final ContactPostalAddresses ContactPostalAddresses = new ContactPostalAddresses(); 054 055 /** 056 * The class holding records for this type 057 */ 058 @Override 059 public Class<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses> getRecordType() { 060 return com.echothree.model.jooq.server.records.contact.ContactPostalAddresses.class; 061 } 062 063 /** 064 * The column 065 * <code>contactpostaladdresses.ctpa_contactpostaladdressid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, ContactPostalAddressPK> CONTACT_POSTAL_ADDRESS = createField(DSL.name("ctpa_contactpostaladdressid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactPostalAddressPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactPostalAddressPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column 071 * <code>contactpostaladdresses.ctpa_cmch_contactmechanismid</code>. 072 */ 073 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, ContactMechanismPK> CONTACT_MECHANISM = createField(DSL.name("ctpa_cmch_contactmechanismid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPK(id), primaryKey -> primaryKey.getEntityId())); 074 075 /** 076 * The column <code>contactpostaladdresses.ctpa_pert_personaltitleid</code>. 077 */ 078 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, PersonalTitlePK> PERSONAL_TITLE = createField(DSL.name("ctpa_pert_personaltitleid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PersonalTitlePK.class, id -> new com.echothree.model.data.party.common.pk.PersonalTitlePK(id), primaryKey -> primaryKey.getEntityId())); 079 080 /** 081 * The column <code>contactpostaladdresses.ctpa_firstname</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> FIRST_NAME = createField(DSL.name("ctpa_firstname"), SQLDataType.VARCHAR(20), this, ""); 084 085 /** 086 * The column <code>contactpostaladdresses.ctpa_firstnamesdx</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> FIRST_NAME_SDX = createField(DSL.name("ctpa_firstnamesdx"), SQLDataType.VARCHAR(4), this, ""); 089 090 /** 091 * The column <code>contactpostaladdresses.ctpa_middlename</code>. 092 */ 093 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> MIDDLE_NAME = createField(DSL.name("ctpa_middlename"), SQLDataType.VARCHAR(20), this, ""); 094 095 /** 096 * The column <code>contactpostaladdresses.ctpa_middlenamesdx</code>. 097 */ 098 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> MIDDLE_NAME_SDX = createField(DSL.name("ctpa_middlenamesdx"), SQLDataType.VARCHAR(4), this, ""); 099 100 /** 101 * The column <code>contactpostaladdresses.ctpa_lastname</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> LAST_NAME = createField(DSL.name("ctpa_lastname"), SQLDataType.VARCHAR(20), this, ""); 104 105 /** 106 * The column <code>contactpostaladdresses.ctpa_lastnamesdx</code>. 107 */ 108 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> LAST_NAME_SDX = createField(DSL.name("ctpa_lastnamesdx"), SQLDataType.VARCHAR(4), this, ""); 109 110 /** 111 * The column <code>contactpostaladdresses.ctpa_nsfx_namesuffixid</code>. 112 */ 113 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, NameSuffixPK> NAME_SUFFIX = createField(DSL.name("ctpa_nsfx_namesuffixid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, NameSuffixPK.class, id -> new com.echothree.model.data.party.common.pk.NameSuffixPK(id), primaryKey -> primaryKey.getEntityId())); 114 115 /** 116 * The column <code>contactpostaladdresses.ctpa_companyname</code>. 117 */ 118 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> COMPANY_NAME = createField(DSL.name("ctpa_companyname"), SQLDataType.VARCHAR(60), this, ""); 119 120 /** 121 * The column <code>contactpostaladdresses.ctpa_attention</code>. 122 */ 123 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> ATTENTION = createField(DSL.name("ctpa_attention"), SQLDataType.VARCHAR(60), this, ""); 124 125 /** 126 * The column <code>contactpostaladdresses.ctpa_address1</code>. 127 */ 128 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> ADDRESS1 = createField(DSL.name("ctpa_address1"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 129 130 /** 131 * The column <code>contactpostaladdresses.ctpa_address2</code>. 132 */ 133 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> ADDRESS2 = createField(DSL.name("ctpa_address2"), SQLDataType.VARCHAR(40), this, ""); 134 135 /** 136 * The column <code>contactpostaladdresses.ctpa_address3</code>. 137 */ 138 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> ADDRESS3 = createField(DSL.name("ctpa_address3"), SQLDataType.VARCHAR(40), this, ""); 139 140 /** 141 * The column <code>contactpostaladdresses.ctpa_city</code>. 142 */ 143 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> CITY = createField(DSL.name("ctpa_city"), SQLDataType.VARCHAR(30), this, ""); 144 145 /** 146 * The column <code>contactpostaladdresses.ctpa_citygeocodeid</code>. 147 */ 148 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, GeoCodePK> CITY_GEO_CODE = createField(DSL.name("ctpa_citygeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId())); 149 150 /** 151 * The column <code>contactpostaladdresses.ctpa_countygeocodeid</code>. 152 */ 153 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, GeoCodePK> COUNTY_GEO_CODE = createField(DSL.name("ctpa_countygeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId())); 154 155 /** 156 * The column <code>contactpostaladdresses.ctpa_state</code>. 157 */ 158 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> STATE = createField(DSL.name("ctpa_state"), SQLDataType.VARCHAR(30), this, ""); 159 160 /** 161 * The column <code>contactpostaladdresses.ctpa_stategeocodeid</code>. 162 */ 163 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, GeoCodePK> STATE_GEO_CODE = createField(DSL.name("ctpa_stategeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId())); 164 165 /** 166 * The column <code>contactpostaladdresses.ctpa_postalcode</code>. 167 */ 168 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, String> POSTAL_CODE = createField(DSL.name("ctpa_postalcode"), SQLDataType.VARCHAR(15), this, ""); 169 170 /** 171 * The column <code>contactpostaladdresses.ctpa_postalcodegeocodeid</code>. 172 */ 173 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, GeoCodePK> POSTAL_CODE_GEO_CODE = createField(DSL.name("ctpa_postalcodegeocodeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId())); 174 175 /** 176 * The column <code>contactpostaladdresses.ctpa_countrygeocodeid</code>. 177 */ 178 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, GeoCodePK> COUNTRY_GEO_CODE = createField(DSL.name("ctpa_countrygeocodeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId())); 179 180 /** 181 * The column <code>contactpostaladdresses.ctpa_iscommercial</code>. 182 */ 183 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, Boolean> IS_COMMERCIAL = createField(DSL.name("ctpa_iscommercial"), SQLDataType.BIT.nullable(false), this, ""); 184 185 /** 186 * The column <code>contactpostaladdresses.ctpa_fromtime</code>. 187 */ 188 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, Long> FROM_TIME = createField(DSL.name("ctpa_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 189 190 /** 191 * The column <code>contactpostaladdresses.ctpa_thrutime</code>. 192 */ 193 public final TableField<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, Long> THRU_TIME = createField(DSL.name("ctpa_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 194 195 private ContactPostalAddresses(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses> aliased) { 196 this(alias, aliased, (Field<?>[]) null, null); 197 } 198 199 private ContactPostalAddresses(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses> aliased, Field<?>[] parameters, Condition where) { 200 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 201 } 202 203 /** 204 * Create an aliased <code>contactpostaladdresses</code> table reference 205 */ 206 public ContactPostalAddresses(String alias) { 207 this(DSL.name(alias), ContactPostalAddresses); 208 } 209 210 /** 211 * Create an aliased <code>contactpostaladdresses</code> table reference 212 */ 213 public ContactPostalAddresses(Name alias) { 214 this(alias, ContactPostalAddresses); 215 } 216 217 /** 218 * Create a <code>contactpostaladdresses</code> table reference 219 */ 220 public ContactPostalAddresses() { 221 this(DSL.name("contactpostaladdresses"), null); 222 } 223 224 @Override 225 public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses> getPrimaryKey() { 226 return KeyRegistry.CONTACT_POSTAL_ADDRESSES_PK; 227 } 228 229 @Override 230 public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses>> getUniqueKeys() { 231 return Arrays.asList(KeyRegistry.CONTACT_POSTAL_ADDRESSES_CONTACT_MECHANISM_AND_THRU_TIME_UK); 232 } 233 234 @Override 235 public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactPostalAddresses, ?>> getReferences() { 236 return Arrays.asList(KeyRegistry.CONTACT_POSTAL_ADDRESSES_CITY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_CONTACT_MECHANISM_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_COUNTRY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_COUNTY_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_NAME_SUFFIX_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_PERSONAL_TITLE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_POSTAL_CODE_GEO_CODE_FK, KeyRegistry.CONTACT_POSTAL_ADDRESSES_STATE_GEO_CODE_FK); 237 } 238 239 private transient GeoCodesPath _ctpa_citygeocodeid_fk; 240 241 /** 242 * Get the implicit join path to the <code>geocodes</code> table, via the 243 * <code>ctpa_citygeocodeid_fk</code> key. 244 */ 245 public GeoCodesPath ctpa_citygeocodeid_fk() { 246 if (_ctpa_citygeocodeid_fk == null) 247 _ctpa_citygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_CITY_GEO_CODE_FK, null); 248 249 return _ctpa_citygeocodeid_fk; 250 } 251 252 private transient ContactMechanismsPath _ctpa_cmch_contactmechanismid_fk; 253 254 /** 255 * Get the implicit join path to the <code>contactmechanisms</code> table. 256 */ 257 public ContactMechanismsPath ctpa_cmch_contactmechanismid_fk() { 258 if (_ctpa_cmch_contactmechanismid_fk == null) 259 _ctpa_cmch_contactmechanismid_fk = new ContactMechanismsPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_CONTACT_MECHANISM_FK, null); 260 261 return _ctpa_cmch_contactmechanismid_fk; 262 } 263 264 private transient GeoCodesPath _ctpa_countrygeocodeid_fk; 265 266 /** 267 * Get the implicit join path to the <code>geocodes</code> table, via the 268 * <code>ctpa_countrygeocodeid_fk</code> key. 269 */ 270 public GeoCodesPath ctpa_countrygeocodeid_fk() { 271 if (_ctpa_countrygeocodeid_fk == null) 272 _ctpa_countrygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_COUNTRY_GEO_CODE_FK, null); 273 274 return _ctpa_countrygeocodeid_fk; 275 } 276 277 private transient GeoCodesPath _ctpa_countygeocodeid_fk; 278 279 /** 280 * Get the implicit join path to the <code>geocodes</code> table, via the 281 * <code>ctpa_countygeocodeid_fk</code> key. 282 */ 283 public GeoCodesPath ctpa_countygeocodeid_fk() { 284 if (_ctpa_countygeocodeid_fk == null) 285 _ctpa_countygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_COUNTY_GEO_CODE_FK, null); 286 287 return _ctpa_countygeocodeid_fk; 288 } 289 290 private transient NameSuffixesPath _ctpa_nsfx_namesuffixid_fk; 291 292 /** 293 * Get the implicit join path to the <code>namesuffixes</code> table. 294 */ 295 public NameSuffixesPath ctpa_nsfx_namesuffixid_fk() { 296 if (_ctpa_nsfx_namesuffixid_fk == null) 297 _ctpa_nsfx_namesuffixid_fk = new NameSuffixesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_NAME_SUFFIX_FK, null); 298 299 return _ctpa_nsfx_namesuffixid_fk; 300 } 301 302 private transient PersonalTitlesPath _ctpa_pert_personaltitleid_fk; 303 304 /** 305 * Get the implicit join path to the <code>personaltitles</code> table. 306 */ 307 public PersonalTitlesPath ctpa_pert_personaltitleid_fk() { 308 if (_ctpa_pert_personaltitleid_fk == null) 309 _ctpa_pert_personaltitleid_fk = new PersonalTitlesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_PERSONAL_TITLE_FK, null); 310 311 return _ctpa_pert_personaltitleid_fk; 312 } 313 314 private transient GeoCodesPath _ctpa_postalcodegeocodeid_fk; 315 316 /** 317 * Get the implicit join path to the <code>geocodes</code> table, via the 318 * <code>ctpa_postalcodegeocodeid_fk</code> key. 319 */ 320 public GeoCodesPath ctpa_postalcodegeocodeid_fk() { 321 if (_ctpa_postalcodegeocodeid_fk == null) 322 _ctpa_postalcodegeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_POSTAL_CODE_GEO_CODE_FK, null); 323 324 return _ctpa_postalcodegeocodeid_fk; 325 } 326 327 private transient GeoCodesPath _ctpa_stategeocodeid_fk; 328 329 /** 330 * Get the implicit join path to the <code>geocodes</code> table, via the 331 * <code>ctpa_stategeocodeid_fk</code> key. 332 */ 333 public GeoCodesPath ctpa_stategeocodeid_fk() { 334 if (_ctpa_stategeocodeid_fk == null) 335 _ctpa_stategeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_POSTAL_ADDRESSES_STATE_GEO_CODE_FK, null); 336 337 return _ctpa_stategeocodeid_fk; 338 } 339 340 @Override 341 public ContactPostalAddresses as(String alias) { 342 return new ContactPostalAddresses(DSL.name(alias), this); 343 } 344 345 @Override 346 public ContactPostalAddresses as(Name alias) { 347 return new ContactPostalAddresses(alias, this); 348 } 349 350 @Override 351 public ContactPostalAddresses as(Table<?> alias) { 352 return new ContactPostalAddresses(alias.getQualifiedName(), this); 353 } 354 355 /** 356 * Rename this table 357 */ 358 @Override 359 public ContactPostalAddresses rename(String name) { 360 return new ContactPostalAddresses(DSL.name(name), null); 361 } 362 363 /** 364 * Rename this table 365 */ 366 @Override 367 public ContactPostalAddresses rename(Name name) { 368 return new ContactPostalAddresses(name, null); 369 } 370 371 /** 372 * Rename this table 373 */ 374 @Override 375 public ContactPostalAddresses rename(Table<?> name) { 376 return new ContactPostalAddresses(name.getQualifiedName(), null); 377 } 378 379 /** 380 * Create an inline derived table from this table 381 */ 382 @Override 383 public ContactPostalAddresses where(Condition condition) { 384 return new ContactPostalAddresses(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 385 } 386 387 /** 388 * Create an inline derived table from this table 389 */ 390 @Override 391 public ContactPostalAddresses where(Collection<? extends Condition> conditions) { 392 return where(DSL.and(conditions)); 393 } 394 395 /** 396 * Create an inline derived table from this table 397 */ 398 @Override 399 public ContactPostalAddresses where(Condition... conditions) { 400 return where(DSL.and(conditions)); 401 } 402 403 /** 404 * Create an inline derived table from this table 405 */ 406 @Override 407 public ContactPostalAddresses where(Field<Boolean> condition) { 408 return where(DSL.condition(condition)); 409 } 410 411 /** 412 * Create an inline derived table from this table 413 */ 414 @Override 415 @PlainSQL 416 public ContactPostalAddresses where(SQL condition) { 417 return where(DSL.condition(condition)); 418 } 419 420 /** 421 * Create an inline derived table from this table 422 */ 423 @Override 424 @PlainSQL 425 public ContactPostalAddresses where(@Stringly.SQL String condition) { 426 return where(DSL.condition(condition)); 427 } 428 429 /** 430 * Create an inline derived table from this table 431 */ 432 @Override 433 @PlainSQL 434 public ContactPostalAddresses where(@Stringly.SQL String condition, Object... binds) { 435 return where(DSL.condition(condition, binds)); 436 } 437 438 /** 439 * Create an inline derived table from this table 440 */ 441 @Override 442 @PlainSQL 443 public ContactPostalAddresses where(@Stringly.SQL String condition, QueryPart... parts) { 444 return where(DSL.condition(condition, parts)); 445 } 446 447 /** 448 * Create an inline derived table from this table 449 */ 450 @Override 451 public ContactPostalAddresses whereExists(TableLike<?> select) { 452 return where(DSL.exists(select)); 453 } 454 455 /** 456 * Create an inline derived table from this table 457 */ 458 @Override 459 public ContactPostalAddresses whereNotExists(TableLike<?> select) { 460 return where(DSL.notExists(select)); 461 } 462}