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