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