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