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.ContactEmailAddressPK; 008import com.echothree.model.data.contact.common.pk.ContactMechanismPK; 009import com.echothree.model.jooq.server.KeyRegistry; 010import com.echothree.model.jooq.server.tables.contact.ContactMechanisms.ContactMechanismsPath; 011 012import java.util.Arrays; 013import java.util.Collection; 014import java.util.List; 015 016import org.jooq.Condition; 017import org.jooq.Converter; 018import org.jooq.Field; 019import org.jooq.ForeignKey; 020import org.jooq.Name; 021import org.jooq.PlainSQL; 022import org.jooq.QueryPart; 023import org.jooq.SQL; 024import org.jooq.Stringly; 025import org.jooq.Table; 026import org.jooq.TableField; 027import org.jooq.TableLike; 028import org.jooq.TableOptions; 029import org.jooq.UniqueKey; 030import org.jooq.impl.DSL; 031import org.jooq.impl.Internal; 032import org.jooq.impl.SQLDataType; 033import org.jooq.impl.TableImpl; 034 035 036/** 037 * This class is generated by jOOQ. 038 */ 039@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 040public class ContactEmailAddresses extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses> { 041 042 private static final long serialVersionUID = 1L; 043 044 /** 045 * The reference instance of <code>contactemailaddresses</code> 046 */ 047 public static final ContactEmailAddresses ContactEmailAddresses = new ContactEmailAddresses(); 048 049 /** 050 * The class holding records for this type 051 */ 052 @Override 053 public Class<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses> getRecordType() { 054 return com.echothree.model.jooq.server.records.contact.ContactEmailAddresses.class; 055 } 056 057 /** 058 * The column <code>contactemailaddresses.ctea_contactemailaddressid</code>. 059 */ 060 public final TableField<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, ContactEmailAddressPK> CONTACT_EMAIL_ADDRESS = createField(DSL.name("ctea_contactemailaddressid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactEmailAddressPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactEmailAddressPK(id), primaryKey -> primaryKey.getEntityId())); 061 062 /** 063 * The column 064 * <code>contactemailaddresses.ctea_cmch_contactmechanismid</code>. 065 */ 066 public final TableField<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, ContactMechanismPK> CONTACT_MECHANISM = createField(DSL.name("ctea_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())); 067 068 /** 069 * The column <code>contactemailaddresses.ctea_emailaddress</code>. 070 */ 071 public final TableField<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, String> EMAIL_ADDRESS = createField(DSL.name("ctea_emailaddress"), SQLDataType.VARCHAR(80).nullable(false), this, ""); 072 073 /** 074 * The column <code>contactemailaddresses.ctea_fromtime</code>. 075 */ 076 public final TableField<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, Long> FROM_TIME = createField(DSL.name("ctea_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 077 078 /** 079 * The column <code>contactemailaddresses.ctea_thrutime</code>. 080 */ 081 public final TableField<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, Long> THRU_TIME = createField(DSL.name("ctea_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 082 083 private ContactEmailAddresses(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses> aliased) { 084 this(alias, aliased, (Field<?>[]) null, null); 085 } 086 087 private ContactEmailAddresses(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses> aliased, Field<?>[] parameters, Condition where) { 088 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 089 } 090 091 /** 092 * Create an aliased <code>contactemailaddresses</code> table reference 093 */ 094 public ContactEmailAddresses(String alias) { 095 this(DSL.name(alias), ContactEmailAddresses); 096 } 097 098 /** 099 * Create an aliased <code>contactemailaddresses</code> table reference 100 */ 101 public ContactEmailAddresses(Name alias) { 102 this(alias, ContactEmailAddresses); 103 } 104 105 /** 106 * Create a <code>contactemailaddresses</code> table reference 107 */ 108 public ContactEmailAddresses() { 109 this(DSL.name("contactemailaddresses"), null); 110 } 111 112 @Override 113 public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses> getPrimaryKey() { 114 return KeyRegistry.CONTACT_EMAIL_ADDRESSES_PK; 115 } 116 117 @Override 118 public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses>> getUniqueKeys() { 119 return Arrays.asList(KeyRegistry.CONTACT_EMAIL_ADDRESSES_CONTACT_MECHANISM_AND_THRU_TIME_UK); 120 } 121 122 @Override 123 public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactEmailAddresses, ?>> getReferences() { 124 return Arrays.asList(KeyRegistry.CONTACT_EMAIL_ADDRESSES_CONTACT_MECHANISM_FK); 125 } 126 127 private transient ContactMechanismsPath _ctea_cmch_contactmechanismid_fk; 128 129 /** 130 * Get the implicit join path to the <code>contactmechanisms</code> table. 131 */ 132 public ContactMechanismsPath ctea_cmch_contactmechanismid_fk() { 133 if (_ctea_cmch_contactmechanismid_fk == null) 134 _ctea_cmch_contactmechanismid_fk = new ContactMechanismsPath(this, KeyRegistry.CONTACT_EMAIL_ADDRESSES_CONTACT_MECHANISM_FK, null); 135 136 return _ctea_cmch_contactmechanismid_fk; 137 } 138 139 @Override 140 public ContactEmailAddresses as(String alias) { 141 return new ContactEmailAddresses(DSL.name(alias), this); 142 } 143 144 @Override 145 public ContactEmailAddresses as(Name alias) { 146 return new ContactEmailAddresses(alias, this); 147 } 148 149 @Override 150 public ContactEmailAddresses as(Table<?> alias) { 151 return new ContactEmailAddresses(alias.getQualifiedName(), this); 152 } 153 154 /** 155 * Rename this table 156 */ 157 @Override 158 public ContactEmailAddresses rename(String name) { 159 return new ContactEmailAddresses(DSL.name(name), null); 160 } 161 162 /** 163 * Rename this table 164 */ 165 @Override 166 public ContactEmailAddresses rename(Name name) { 167 return new ContactEmailAddresses(name, null); 168 } 169 170 /** 171 * Rename this table 172 */ 173 @Override 174 public ContactEmailAddresses rename(Table<?> name) { 175 return new ContactEmailAddresses(name.getQualifiedName(), null); 176 } 177 178 /** 179 * Create an inline derived table from this table 180 */ 181 @Override 182 public ContactEmailAddresses where(Condition condition) { 183 return new ContactEmailAddresses(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 184 } 185 186 /** 187 * Create an inline derived table from this table 188 */ 189 @Override 190 public ContactEmailAddresses where(Collection<? extends Condition> conditions) { 191 return where(DSL.and(conditions)); 192 } 193 194 /** 195 * Create an inline derived table from this table 196 */ 197 @Override 198 public ContactEmailAddresses where(Condition... conditions) { 199 return where(DSL.and(conditions)); 200 } 201 202 /** 203 * Create an inline derived table from this table 204 */ 205 @Override 206 public ContactEmailAddresses where(Field<Boolean> condition) { 207 return where(DSL.condition(condition)); 208 } 209 210 /** 211 * Create an inline derived table from this table 212 */ 213 @Override 214 @PlainSQL 215 public ContactEmailAddresses where(SQL condition) { 216 return where(DSL.condition(condition)); 217 } 218 219 /** 220 * Create an inline derived table from this table 221 */ 222 @Override 223 @PlainSQL 224 public ContactEmailAddresses where(@Stringly.SQL String condition) { 225 return where(DSL.condition(condition)); 226 } 227 228 /** 229 * Create an inline derived table from this table 230 */ 231 @Override 232 @PlainSQL 233 public ContactEmailAddresses where(@Stringly.SQL String condition, Object... binds) { 234 return where(DSL.condition(condition, binds)); 235 } 236 237 /** 238 * Create an inline derived table from this table 239 */ 240 @Override 241 @PlainSQL 242 public ContactEmailAddresses where(@Stringly.SQL String condition, QueryPart... parts) { 243 return where(DSL.condition(condition, parts)); 244 } 245 246 /** 247 * Create an inline derived table from this table 248 */ 249 @Override 250 public ContactEmailAddresses whereExists(TableLike<?> select) { 251 return where(DSL.exists(select)); 252 } 253 254 /** 255 * Create an inline derived table from this table 256 */ 257 @Override 258 public ContactEmailAddresses whereNotExists(TableLike<?> select) { 259 return where(DSL.notExists(select)); 260 } 261}