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.ContactTelephonePK; 009import com.echothree.model.data.geo.common.pk.GeoCodePK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.contact.ContactMechanisms.ContactMechanismsPath; 012import com.echothree.model.jooq.server.tables.geo.GeoCodes.GeoCodesPath; 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 ContactTelephones extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactTelephones> { 043 044 private static final long serialVersionUID = 1L; 045 046 /** 047 * The reference instance of <code>contacttelephones</code> 048 */ 049 public static final ContactTelephones ContactTelephones = new ContactTelephones(); 050 051 /** 052 * The class holding records for this type 053 */ 054 @Override 055 public Class<com.echothree.model.jooq.server.records.contact.ContactTelephones> getRecordType() { 056 return com.echothree.model.jooq.server.records.contact.ContactTelephones.class; 057 } 058 059 /** 060 * The column <code>contacttelephones.cttp_contacttelephoneid</code>. 061 */ 062 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, ContactTelephonePK> CONTACT_TELEPHONE = createField(DSL.name("cttp_contacttelephoneid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactTelephonePK.class, id -> new com.echothree.model.data.contact.common.pk.ContactTelephonePK(id), primaryKey -> primaryKey.getEntityId())); 063 064 /** 065 * The column <code>contacttelephones.cttp_cmch_contactmechanismid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, ContactMechanismPK> CONTACT_MECHANISM = createField(DSL.name("cttp_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())); 068 069 /** 070 * The column <code>contacttelephones.cttp_countrygeocodeid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, GeoCodePK> COUNTRY_GEO_CODE = createField(DSL.name("cttp_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())); 073 074 /** 075 * The column <code>contacttelephones.cttp_areacode</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, String> AREA_CODE = createField(DSL.name("cttp_areacode"), SQLDataType.VARCHAR(5), this, ""); 078 079 /** 080 * The column <code>contacttelephones.cttp_telephonenumber</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, String> TELEPHONE_NUMBER = createField(DSL.name("cttp_telephonenumber"), SQLDataType.VARCHAR(25).nullable(false), this, ""); 083 084 /** 085 * The column <code>contacttelephones.cttp_telephoneextension</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, String> TELEPHONE_EXTENSION = createField(DSL.name("cttp_telephoneextension"), SQLDataType.VARCHAR(10), this, ""); 088 089 /** 090 * The column <code>contacttelephones.cttp_fromtime</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, Long> FROM_TIME = createField(DSL.name("cttp_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 093 094 /** 095 * The column <code>contacttelephones.cttp_thrutime</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.contact.ContactTelephones, Long> THRU_TIME = createField(DSL.name("cttp_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 098 099 private ContactTelephones(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactTelephones> aliased) { 100 this(alias, aliased, (Field<?>[]) null, null); 101 } 102 103 private ContactTelephones(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactTelephones> aliased, Field<?>[] parameters, Condition where) { 104 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 105 } 106 107 /** 108 * Create an aliased <code>contacttelephones</code> table reference 109 */ 110 public ContactTelephones(String alias) { 111 this(DSL.name(alias), ContactTelephones); 112 } 113 114 /** 115 * Create an aliased <code>contacttelephones</code> table reference 116 */ 117 public ContactTelephones(Name alias) { 118 this(alias, ContactTelephones); 119 } 120 121 /** 122 * Create a <code>contacttelephones</code> table reference 123 */ 124 public ContactTelephones() { 125 this(DSL.name("contacttelephones"), null); 126 } 127 128 @Override 129 public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactTelephones> getPrimaryKey() { 130 return KeyRegistry.CONTACT_TELEPHONES_PK; 131 } 132 133 @Override 134 public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactTelephones>> getUniqueKeys() { 135 return Arrays.asList(KeyRegistry.CONTACT_TELEPHONES_CONTACT_MECHANISM_AND_THRU_TIME_UK); 136 } 137 138 @Override 139 public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactTelephones, ?>> getReferences() { 140 return Arrays.asList(KeyRegistry.CONTACT_TELEPHONES_CONTACT_MECHANISM_FK, KeyRegistry.CONTACT_TELEPHONES_COUNTRY_GEO_CODE_FK); 141 } 142 143 private transient ContactMechanismsPath _cttp_cmch_contactmechanismid_fk; 144 145 /** 146 * Get the implicit join path to the <code>contactmechanisms</code> table. 147 */ 148 public ContactMechanismsPath cttp_cmch_contactmechanismid_fk() { 149 if (_cttp_cmch_contactmechanismid_fk == null) 150 _cttp_cmch_contactmechanismid_fk = new ContactMechanismsPath(this, KeyRegistry.CONTACT_TELEPHONES_CONTACT_MECHANISM_FK, null); 151 152 return _cttp_cmch_contactmechanismid_fk; 153 } 154 155 private transient GeoCodesPath _cttp_countrygeocodeid_fk; 156 157 /** 158 * Get the implicit join path to the <code>geocodes</code> table. 159 */ 160 public GeoCodesPath cttp_countrygeocodeid_fk() { 161 if (_cttp_countrygeocodeid_fk == null) 162 _cttp_countrygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.CONTACT_TELEPHONES_COUNTRY_GEO_CODE_FK, null); 163 164 return _cttp_countrygeocodeid_fk; 165 } 166 167 @Override 168 public ContactTelephones as(String alias) { 169 return new ContactTelephones(DSL.name(alias), this); 170 } 171 172 @Override 173 public ContactTelephones as(Name alias) { 174 return new ContactTelephones(alias, this); 175 } 176 177 @Override 178 public ContactTelephones as(Table<?> alias) { 179 return new ContactTelephones(alias.getQualifiedName(), this); 180 } 181 182 /** 183 * Rename this table 184 */ 185 @Override 186 public ContactTelephones rename(String name) { 187 return new ContactTelephones(DSL.name(name), null); 188 } 189 190 /** 191 * Rename this table 192 */ 193 @Override 194 public ContactTelephones rename(Name name) { 195 return new ContactTelephones(name, null); 196 } 197 198 /** 199 * Rename this table 200 */ 201 @Override 202 public ContactTelephones rename(Table<?> name) { 203 return new ContactTelephones(name.getQualifiedName(), null); 204 } 205 206 /** 207 * Create an inline derived table from this table 208 */ 209 @Override 210 public ContactTelephones where(Condition condition) { 211 return new ContactTelephones(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 212 } 213 214 /** 215 * Create an inline derived table from this table 216 */ 217 @Override 218 public ContactTelephones where(Collection<? extends Condition> conditions) { 219 return where(DSL.and(conditions)); 220 } 221 222 /** 223 * Create an inline derived table from this table 224 */ 225 @Override 226 public ContactTelephones where(Condition... conditions) { 227 return where(DSL.and(conditions)); 228 } 229 230 /** 231 * Create an inline derived table from this table 232 */ 233 @Override 234 public ContactTelephones where(Field<Boolean> condition) { 235 return where(DSL.condition(condition)); 236 } 237 238 /** 239 * Create an inline derived table from this table 240 */ 241 @Override 242 @PlainSQL 243 public ContactTelephones where(SQL condition) { 244 return where(DSL.condition(condition)); 245 } 246 247 /** 248 * Create an inline derived table from this table 249 */ 250 @Override 251 @PlainSQL 252 public ContactTelephones where(@Stringly.SQL String condition) { 253 return where(DSL.condition(condition)); 254 } 255 256 /** 257 * Create an inline derived table from this table 258 */ 259 @Override 260 @PlainSQL 261 public ContactTelephones where(@Stringly.SQL String condition, Object... binds) { 262 return where(DSL.condition(condition, binds)); 263 } 264 265 /** 266 * Create an inline derived table from this table 267 */ 268 @Override 269 @PlainSQL 270 public ContactTelephones where(@Stringly.SQL String condition, QueryPart... parts) { 271 return where(DSL.condition(condition, parts)); 272 } 273 274 /** 275 * Create an inline derived table from this table 276 */ 277 @Override 278 public ContactTelephones whereExists(TableLike<?> select) { 279 return where(DSL.exists(select)); 280 } 281 282 /** 283 * Create an inline derived table from this table 284 */ 285 @Override 286 public ContactTelephones whereNotExists(TableLike<?> select) { 287 return where(DSL.notExists(select)); 288 } 289}