001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.party; 005 006 007import com.echothree.model.data.party.common.pk.PartyPK; 008import com.echothree.model.data.party.common.pk.PartyRelationshipPK; 009import com.echothree.model.data.party.common.pk.PartyRelationshipTypePK; 010import com.echothree.model.data.party.common.pk.RoleTypePK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 013import com.echothree.model.jooq.server.tables.party.PartyRelationshipTypes.PartyRelationshipTypesPath; 014import com.echothree.model.jooq.server.tables.party.RoleTypes.RoleTypesPath; 015 016import java.util.Arrays; 017import java.util.Collection; 018import java.util.List; 019 020import org.jooq.Condition; 021import org.jooq.Converter; 022import org.jooq.Field; 023import org.jooq.ForeignKey; 024import org.jooq.InverseForeignKey; 025import org.jooq.Name; 026import org.jooq.Path; 027import org.jooq.PlainSQL; 028import org.jooq.QueryPart; 029import org.jooq.Record; 030import org.jooq.SQL; 031import org.jooq.Stringly; 032import org.jooq.Table; 033import org.jooq.TableField; 034import org.jooq.TableLike; 035import org.jooq.TableOptions; 036import org.jooq.UniqueKey; 037import org.jooq.impl.DSL; 038import org.jooq.impl.Internal; 039import org.jooq.impl.SQLDataType; 040import org.jooq.impl.TableImpl; 041 042 043/** 044 * This class is generated by jOOQ. 045 */ 046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 047public class PartyRelationships extends TableImpl<com.echothree.model.jooq.server.records.party.PartyRelationships> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>partyrelationships</code> 053 */ 054 public static final PartyRelationships PartyRelationships = new PartyRelationships(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.party.PartyRelationships> getRecordType() { 061 return com.echothree.model.jooq.server.records.party.PartyRelationships.class; 062 } 063 064 /** 065 * The column <code>partyrelationships.prel_partyrelationshipid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, PartyRelationshipPK> PARTY_RELATIONSHIP = createField(DSL.name("prel_partyrelationshipid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyRelationshipPK.class, id -> new com.echothree.model.data.party.common.pk.PartyRelationshipPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column 071 * <code>partyrelationships.prel_prt_partyrelationshiptypeid</code>. 072 */ 073 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, PartyRelationshipTypePK> PARTY_RELATIONSHIP_TYPE = createField(DSL.name("prel_prt_partyrelationshiptypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyRelationshipTypePK.class, id -> new com.echothree.model.data.party.common.pk.PartyRelationshipTypePK(id), primaryKey -> primaryKey.getEntityId())); 074 075 /** 076 * The column <code>partyrelationships.prel_frompartyid</code>. 077 */ 078 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, PartyPK> FROM_PARTY = createField(DSL.name("prel_frompartyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId())); 079 080 /** 081 * The column <code>partyrelationships.prel_fromroletypeid</code>. 082 */ 083 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, RoleTypePK> FROM_ROLE_TYPE = createField(DSL.name("prel_fromroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RoleTypePK.class, id -> new com.echothree.model.data.party.common.pk.RoleTypePK(id), primaryKey -> primaryKey.getEntityId())); 084 085 /** 086 * The column <code>partyrelationships.prel_topartyid</code>. 087 */ 088 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, PartyPK> TO_PARTY = createField(DSL.name("prel_topartyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId())); 089 090 /** 091 * The column <code>partyrelationships.prel_toroletypeid</code>. 092 */ 093 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, RoleTypePK> TO_ROLE_TYPE = createField(DSL.name("prel_toroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, RoleTypePK.class, id -> new com.echothree.model.data.party.common.pk.RoleTypePK(id), primaryKey -> primaryKey.getEntityId())); 094 095 /** 096 * The column <code>partyrelationships.prel_fromtime</code>. 097 */ 098 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, Long> FROM_TIME = createField(DSL.name("prel_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 099 100 /** 101 * The column <code>partyrelationships.prel_thrutime</code>. 102 */ 103 public final TableField<com.echothree.model.jooq.server.records.party.PartyRelationships, Long> THRU_TIME = createField(DSL.name("prel_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 104 105 private PartyRelationships(Name alias, Table<com.echothree.model.jooq.server.records.party.PartyRelationships> aliased) { 106 this(alias, aliased, (Field<?>[]) null, null); 107 } 108 109 private PartyRelationships(Name alias, Table<com.echothree.model.jooq.server.records.party.PartyRelationships> aliased, Field<?>[] parameters, Condition where) { 110 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 111 } 112 113 /** 114 * Create an aliased <code>partyrelationships</code> table reference 115 */ 116 public PartyRelationships(String alias) { 117 this(DSL.name(alias), PartyRelationships); 118 } 119 120 /** 121 * Create an aliased <code>partyrelationships</code> table reference 122 */ 123 public PartyRelationships(Name alias) { 124 this(alias, PartyRelationships); 125 } 126 127 /** 128 * Create a <code>partyrelationships</code> table reference 129 */ 130 public PartyRelationships() { 131 this(DSL.name("partyrelationships"), null); 132 } 133 134 public <O extends Record> PartyRelationships(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.party.PartyRelationships> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.party.PartyRelationships> parentPath) { 135 super(path, childPath, parentPath, PartyRelationships); 136 } 137 138 /** 139 * A subtype implementing {@link Path} for simplified path-based joins. 140 */ 141 public static class PartyRelationshipsPath extends PartyRelationships implements Path<com.echothree.model.jooq.server.records.party.PartyRelationships> { 142 143 private static final long serialVersionUID = 1L; 144 public <O extends Record> PartyRelationshipsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.party.PartyRelationships> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.party.PartyRelationships> parentPath) { 145 super(path, childPath, parentPath); 146 } 147 private PartyRelationshipsPath(Name alias, Table<com.echothree.model.jooq.server.records.party.PartyRelationships> aliased) { 148 super(alias, aliased); 149 } 150 151 @Override 152 public PartyRelationshipsPath as(String alias) { 153 return new PartyRelationshipsPath(DSL.name(alias), this); 154 } 155 156 @Override 157 public PartyRelationshipsPath as(Name alias) { 158 return new PartyRelationshipsPath(alias, this); 159 } 160 161 @Override 162 public PartyRelationshipsPath as(Table<?> alias) { 163 return new PartyRelationshipsPath(alias.getQualifiedName(), this); 164 } 165 } 166 167 @Override 168 public UniqueKey<com.echothree.model.jooq.server.records.party.PartyRelationships> getPrimaryKey() { 169 return KeyRegistry.PARTY_RELATIONSHIPS_PK; 170 } 171 172 @Override 173 public List<UniqueKey<com.echothree.model.jooq.server.records.party.PartyRelationships>> getUniqueKeys() { 174 return Arrays.asList(KeyRegistry.PARTY_RELATIONSHIPS_PARTY_RELATIONSHIP_TYPE_AND_FROM_PARTY_AND_FROM_ROLE_TYPE_AND_TO_PARTY_AND_TO_ROLE_TYPE_AND_THRU_TIME_UK); 175 } 176 177 @Override 178 public List<ForeignKey<com.echothree.model.jooq.server.records.party.PartyRelationships, ?>> getReferences() { 179 return Arrays.asList(KeyRegistry.PARTY_RELATIONSHIPS_FROM_PARTY_FK, KeyRegistry.PARTY_RELATIONSHIPS_FROM_ROLE_TYPE_FK, KeyRegistry.PARTY_RELATIONSHIPS_PARTY_RELATIONSHIP_TYPE_FK, KeyRegistry.PARTY_RELATIONSHIPS_TO_PARTY_FK, KeyRegistry.PARTY_RELATIONSHIPS_TO_ROLE_TYPE_FK); 180 } 181 182 private transient PartiesPath _prel_frompartyid_fk; 183 184 /** 185 * Get the implicit join path to the <code>parties</code> table, via the 186 * <code>prel_frompartyid_fk</code> key. 187 */ 188 public PartiesPath prel_frompartyid_fk() { 189 if (_prel_frompartyid_fk == null) 190 _prel_frompartyid_fk = new PartiesPath(this, KeyRegistry.PARTY_RELATIONSHIPS_FROM_PARTY_FK, null); 191 192 return _prel_frompartyid_fk; 193 } 194 195 private transient RoleTypesPath _prel_fromroletypeid_fk; 196 197 /** 198 * Get the implicit join path to the <code>roletypes</code> table, via the 199 * <code>prel_fromroletypeid_fk</code> key. 200 */ 201 public RoleTypesPath prel_fromroletypeid_fk() { 202 if (_prel_fromroletypeid_fk == null) 203 _prel_fromroletypeid_fk = new RoleTypesPath(this, KeyRegistry.PARTY_RELATIONSHIPS_FROM_ROLE_TYPE_FK, null); 204 205 return _prel_fromroletypeid_fk; 206 } 207 208 private transient PartyRelationshipTypesPath _prel_prt_partyrelationshiptypeid_fk; 209 210 /** 211 * Get the implicit join path to the <code>partyrelationshiptypes</code> 212 * table. 213 */ 214 public PartyRelationshipTypesPath prel_prt_partyrelationshiptypeid_fk() { 215 if (_prel_prt_partyrelationshiptypeid_fk == null) 216 _prel_prt_partyrelationshiptypeid_fk = new PartyRelationshipTypesPath(this, KeyRegistry.PARTY_RELATIONSHIPS_PARTY_RELATIONSHIP_TYPE_FK, null); 217 218 return _prel_prt_partyrelationshiptypeid_fk; 219 } 220 221 private transient PartiesPath _prel_topartyid_fk; 222 223 /** 224 * Get the implicit join path to the <code>parties</code> table, via the 225 * <code>prel_topartyid_fk</code> key. 226 */ 227 public PartiesPath prel_topartyid_fk() { 228 if (_prel_topartyid_fk == null) 229 _prel_topartyid_fk = new PartiesPath(this, KeyRegistry.PARTY_RELATIONSHIPS_TO_PARTY_FK, null); 230 231 return _prel_topartyid_fk; 232 } 233 234 private transient RoleTypesPath _prel_toroletypeid_fk; 235 236 /** 237 * Get the implicit join path to the <code>roletypes</code> table, via the 238 * <code>prel_toroletypeid_fk</code> key. 239 */ 240 public RoleTypesPath prel_toroletypeid_fk() { 241 if (_prel_toroletypeid_fk == null) 242 _prel_toroletypeid_fk = new RoleTypesPath(this, KeyRegistry.PARTY_RELATIONSHIPS_TO_ROLE_TYPE_FK, null); 243 244 return _prel_toroletypeid_fk; 245 } 246 247 @Override 248 public PartyRelationships as(String alias) { 249 return new PartyRelationships(DSL.name(alias), this); 250 } 251 252 @Override 253 public PartyRelationships as(Name alias) { 254 return new PartyRelationships(alias, this); 255 } 256 257 @Override 258 public PartyRelationships as(Table<?> alias) { 259 return new PartyRelationships(alias.getQualifiedName(), this); 260 } 261 262 /** 263 * Rename this table 264 */ 265 @Override 266 public PartyRelationships rename(String name) { 267 return new PartyRelationships(DSL.name(name), null); 268 } 269 270 /** 271 * Rename this table 272 */ 273 @Override 274 public PartyRelationships rename(Name name) { 275 return new PartyRelationships(name, null); 276 } 277 278 /** 279 * Rename this table 280 */ 281 @Override 282 public PartyRelationships rename(Table<?> name) { 283 return new PartyRelationships(name.getQualifiedName(), null); 284 } 285 286 /** 287 * Create an inline derived table from this table 288 */ 289 @Override 290 public PartyRelationships where(Condition condition) { 291 return new PartyRelationships(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 292 } 293 294 /** 295 * Create an inline derived table from this table 296 */ 297 @Override 298 public PartyRelationships where(Collection<? extends Condition> conditions) { 299 return where(DSL.and(conditions)); 300 } 301 302 /** 303 * Create an inline derived table from this table 304 */ 305 @Override 306 public PartyRelationships where(Condition... conditions) { 307 return where(DSL.and(conditions)); 308 } 309 310 /** 311 * Create an inline derived table from this table 312 */ 313 @Override 314 public PartyRelationships where(Field<Boolean> condition) { 315 return where(DSL.condition(condition)); 316 } 317 318 /** 319 * Create an inline derived table from this table 320 */ 321 @Override 322 @PlainSQL 323 public PartyRelationships where(SQL condition) { 324 return where(DSL.condition(condition)); 325 } 326 327 /** 328 * Create an inline derived table from this table 329 */ 330 @Override 331 @PlainSQL 332 public PartyRelationships where(@Stringly.SQL String condition) { 333 return where(DSL.condition(condition)); 334 } 335 336 /** 337 * Create an inline derived table from this table 338 */ 339 @Override 340 @PlainSQL 341 public PartyRelationships where(@Stringly.SQL String condition, Object... binds) { 342 return where(DSL.condition(condition, binds)); 343 } 344 345 /** 346 * Create an inline derived table from this table 347 */ 348 @Override 349 @PlainSQL 350 public PartyRelationships where(@Stringly.SQL String condition, QueryPart... parts) { 351 return where(DSL.condition(condition, parts)); 352 } 353 354 /** 355 * Create an inline derived table from this table 356 */ 357 @Override 358 public PartyRelationships whereExists(TableLike<?> select) { 359 return where(DSL.exists(select)); 360 } 361 362 /** 363 * Create an inline derived table from this table 364 */ 365 @Override 366 public PartyRelationships whereNotExists(TableLike<?> select) { 367 return where(DSL.notExists(select)); 368 } 369}