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.PartyContactMechanismPurposeDetailPK; 008import com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposePK; 009import com.echothree.model.jooq.server.KeyRegistry; 010import com.echothree.model.jooq.server.tables.contact.PartyContactMechanismPurposeDetails.PartyContactMechanismPurposeDetailsPath; 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.InverseForeignKey; 021import org.jooq.Name; 022import org.jooq.Path; 023import org.jooq.PlainSQL; 024import org.jooq.QueryPart; 025import org.jooq.Record; 026import org.jooq.SQL; 027import org.jooq.Stringly; 028import org.jooq.Table; 029import org.jooq.TableField; 030import org.jooq.TableLike; 031import org.jooq.TableOptions; 032import org.jooq.UniqueKey; 033import org.jooq.impl.DSL; 034import org.jooq.impl.Internal; 035import org.jooq.impl.SQLDataType; 036import org.jooq.impl.TableImpl; 037 038 039/** 040 * This class is generated by jOOQ. 041 */ 042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 043public class PartyContactMechanismPurposes extends TableImpl<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> { 044 045 private static final long serialVersionUID = 1L; 046 047 /** 048 * The reference instance of <code>partycontactmechanismpurposes</code> 049 */ 050 public static final PartyContactMechanismPurposes PartyContactMechanismPurposes = new PartyContactMechanismPurposes(); 051 052 /** 053 * The class holding records for this type 054 */ 055 @Override 056 public Class<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> getRecordType() { 057 return com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes.class; 058 } 059 060 /** 061 * The column 062 * <code>partycontactmechanismpurposes.pcmp_partycontactmechanismpurposeid</code>. 063 */ 064 public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes, PartyContactMechanismPurposePK> PARTY_CONTACT_MECHANISM_PURPOSE = createField(DSL.name("pcmp_partycontactmechanismpurposeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyContactMechanismPurposePK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposePK(id), primaryKey -> primaryKey.getEntityId())); 065 066 /** 067 * The column 068 * <code>partycontactmechanismpurposes.pcmp_activedetailid</code>. 069 */ 070 public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes, PartyContactMechanismPurposeDetailPK> ACTIVE_DETAIL = createField(DSL.name("pcmp_activedetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PartyContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId())); 071 072 /** 073 * The column <code>partycontactmechanismpurposes.pcmp_lastdetailid</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes, PartyContactMechanismPurposeDetailPK> LAST_DETAIL = createField(DSL.name("pcmp_lastdetailid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PartyContactMechanismPurposeDetailPK.class, id -> new com.echothree.model.data.contact.common.pk.PartyContactMechanismPurposeDetailPK(id), primaryKey -> primaryKey.getEntityId())); 076 077 private PartyContactMechanismPurposes(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> aliased) { 078 this(alias, aliased, (Field<?>[]) null, null); 079 } 080 081 private PartyContactMechanismPurposes(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> aliased, Field<?>[] parameters, Condition where) { 082 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 083 } 084 085 /** 086 * Create an aliased <code>partycontactmechanismpurposes</code> table 087 * reference 088 */ 089 public PartyContactMechanismPurposes(String alias) { 090 this(DSL.name(alias), PartyContactMechanismPurposes); 091 } 092 093 /** 094 * Create an aliased <code>partycontactmechanismpurposes</code> table 095 * reference 096 */ 097 public PartyContactMechanismPurposes(Name alias) { 098 this(alias, PartyContactMechanismPurposes); 099 } 100 101 /** 102 * Create a <code>partycontactmechanismpurposes</code> table reference 103 */ 104 public PartyContactMechanismPurposes() { 105 this(DSL.name("partycontactmechanismpurposes"), null); 106 } 107 108 public <O extends Record> PartyContactMechanismPurposes(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> parentPath) { 109 super(path, childPath, parentPath, PartyContactMechanismPurposes); 110 } 111 112 /** 113 * A subtype implementing {@link Path} for simplified path-based joins. 114 */ 115 public static class PartyContactMechanismPurposesPath extends PartyContactMechanismPurposes implements Path<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> { 116 117 private static final long serialVersionUID = 1L; 118 public <O extends Record> PartyContactMechanismPurposesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> parentPath) { 119 super(path, childPath, parentPath); 120 } 121 private PartyContactMechanismPurposesPath(Name alias, Table<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> aliased) { 122 super(alias, aliased); 123 } 124 125 @Override 126 public PartyContactMechanismPurposesPath as(String alias) { 127 return new PartyContactMechanismPurposesPath(DSL.name(alias), this); 128 } 129 130 @Override 131 public PartyContactMechanismPurposesPath as(Name alias) { 132 return new PartyContactMechanismPurposesPath(alias, this); 133 } 134 135 @Override 136 public PartyContactMechanismPurposesPath as(Table<?> alias) { 137 return new PartyContactMechanismPurposesPath(alias.getQualifiedName(), this); 138 } 139 } 140 141 @Override 142 public UniqueKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes> getPrimaryKey() { 143 return KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_PK; 144 } 145 146 @Override 147 public List<UniqueKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes>> getUniqueKeys() { 148 return Arrays.asList(KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_UK, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_UK); 149 } 150 151 @Override 152 public List<ForeignKey<com.echothree.model.jooq.server.records.contact.PartyContactMechanismPurposes, ?>> getReferences() { 153 return Arrays.asList(KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_FK, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_FK); 154 } 155 156 private transient PartyContactMechanismPurposeDetailsPath _pcmp_activedetailid_fk; 157 158 /** 159 * Get the implicit join path to the 160 * <code>partycontactmechanismpurposedetails</code> table, via the 161 * <code>pcmp_activedetailid_fk</code> key. 162 */ 163 public PartyContactMechanismPurposeDetailsPath pcmp_activedetailid_fk() { 164 if (_pcmp_activedetailid_fk == null) 165 _pcmp_activedetailid_fk = new PartyContactMechanismPurposeDetailsPath(this, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_ACTIVE_DETAIL_FK, null); 166 167 return _pcmp_activedetailid_fk; 168 } 169 170 private transient PartyContactMechanismPurposeDetailsPath _pcmp_lastdetailid_fk; 171 172 /** 173 * Get the implicit join path to the 174 * <code>partycontactmechanismpurposedetails</code> table, via the 175 * <code>pcmp_lastdetailid_fk</code> key. 176 */ 177 public PartyContactMechanismPurposeDetailsPath pcmp_lastdetailid_fk() { 178 if (_pcmp_lastdetailid_fk == null) 179 _pcmp_lastdetailid_fk = new PartyContactMechanismPurposeDetailsPath(this, KeyRegistry.PARTY_CONTACT_MECHANISM_PURPOSES_LAST_DETAIL_FK, null); 180 181 return _pcmp_lastdetailid_fk; 182 } 183 184 @Override 185 public PartyContactMechanismPurposes as(String alias) { 186 return new PartyContactMechanismPurposes(DSL.name(alias), this); 187 } 188 189 @Override 190 public PartyContactMechanismPurposes as(Name alias) { 191 return new PartyContactMechanismPurposes(alias, this); 192 } 193 194 @Override 195 public PartyContactMechanismPurposes as(Table<?> alias) { 196 return new PartyContactMechanismPurposes(alias.getQualifiedName(), this); 197 } 198 199 /** 200 * Rename this table 201 */ 202 @Override 203 public PartyContactMechanismPurposes rename(String name) { 204 return new PartyContactMechanismPurposes(DSL.name(name), null); 205 } 206 207 /** 208 * Rename this table 209 */ 210 @Override 211 public PartyContactMechanismPurposes rename(Name name) { 212 return new PartyContactMechanismPurposes(name, null); 213 } 214 215 /** 216 * Rename this table 217 */ 218 @Override 219 public PartyContactMechanismPurposes rename(Table<?> name) { 220 return new PartyContactMechanismPurposes(name.getQualifiedName(), null); 221 } 222 223 /** 224 * Create an inline derived table from this table 225 */ 226 @Override 227 public PartyContactMechanismPurposes where(Condition condition) { 228 return new PartyContactMechanismPurposes(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 229 } 230 231 /** 232 * Create an inline derived table from this table 233 */ 234 @Override 235 public PartyContactMechanismPurposes where(Collection<? extends Condition> conditions) { 236 return where(DSL.and(conditions)); 237 } 238 239 /** 240 * Create an inline derived table from this table 241 */ 242 @Override 243 public PartyContactMechanismPurposes where(Condition... conditions) { 244 return where(DSL.and(conditions)); 245 } 246 247 /** 248 * Create an inline derived table from this table 249 */ 250 @Override 251 public PartyContactMechanismPurposes where(Field<Boolean> condition) { 252 return where(DSL.condition(condition)); 253 } 254 255 /** 256 * Create an inline derived table from this table 257 */ 258 @Override 259 @PlainSQL 260 public PartyContactMechanismPurposes where(SQL condition) { 261 return where(DSL.condition(condition)); 262 } 263 264 /** 265 * Create an inline derived table from this table 266 */ 267 @Override 268 @PlainSQL 269 public PartyContactMechanismPurposes where(@Stringly.SQL String condition) { 270 return where(DSL.condition(condition)); 271 } 272 273 /** 274 * Create an inline derived table from this table 275 */ 276 @Override 277 @PlainSQL 278 public PartyContactMechanismPurposes where(@Stringly.SQL String condition, Object... binds) { 279 return where(DSL.condition(condition, binds)); 280 } 281 282 /** 283 * Create an inline derived table from this table 284 */ 285 @Override 286 @PlainSQL 287 public PartyContactMechanismPurposes where(@Stringly.SQL String condition, QueryPart... parts) { 288 return where(DSL.condition(condition, parts)); 289 } 290 291 /** 292 * Create an inline derived table from this table 293 */ 294 @Override 295 public PartyContactMechanismPurposes whereExists(TableLike<?> select) { 296 return where(DSL.exists(select)); 297 } 298 299 /** 300 * Create an inline derived table from this table 301 */ 302 @Override 303 public PartyContactMechanismPurposes whereNotExists(TableLike<?> select) { 304 return where(DSL.notExists(select)); 305 } 306}