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.PartyDivisionPK; 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 PartyDivisions extends TableImpl<com.echothree.model.jooq.server.records.party.PartyDivisions> { 041 042 private static final long serialVersionUID = 1L; 043 044 /** 045 * The reference instance of <code>partydivisions</code> 046 */ 047 public static final PartyDivisions PartyDivisions = new PartyDivisions(); 048 049 /** 050 * The class holding records for this type 051 */ 052 @Override 053 public Class<com.echothree.model.jooq.server.records.party.PartyDivisions> getRecordType() { 054 return com.echothree.model.jooq.server.records.party.PartyDivisions.class; 055 } 056 057 /** 058 * The column <code>partydivisions.pdiv_partydivisionid</code>. 059 */ 060 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, PartyDivisionPK> PARTY_DIVISION = createField(DSL.name("pdiv_partydivisionid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PartyDivisionPK.class, id -> new com.echothree.model.data.party.common.pk.PartyDivisionPK(id), primaryKey -> primaryKey.getEntityId())); 061 062 /** 063 * The column <code>partydivisions.pdiv_par_partyid</code>. 064 */ 065 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, PartyPK> PARTY = createField(DSL.name("pdiv_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>partydivisions.pdiv_companypartyid</code>. 069 */ 070 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, PartyPK> COMPANY_PARTY = createField(DSL.name("pdiv_companypartyid"), 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>partydivisions.pdiv_partydivisionname</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, String> PARTY_DIVISION_NAME = createField(DSL.name("pdiv_partydivisionname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 076 077 /** 078 * The column <code>partydivisions.pdiv_isdefault</code>. 079 */ 080 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, Boolean> IS_DEFAULT = createField(DSL.name("pdiv_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 081 082 /** 083 * The column <code>partydivisions.pdiv_sortorder</code>. 084 */ 085 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, Integer> SORT_ORDER = createField(DSL.name("pdiv_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 086 087 /** 088 * The column <code>partydivisions.pdiv_fromtime</code>. 089 */ 090 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, Long> FROM_TIME = createField(DSL.name("pdiv_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 091 092 /** 093 * The column <code>partydivisions.pdiv_thrutime</code>. 094 */ 095 public final TableField<com.echothree.model.jooq.server.records.party.PartyDivisions, Long> THRU_TIME = createField(DSL.name("pdiv_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 096 097 private PartyDivisions(Name alias, Table<com.echothree.model.jooq.server.records.party.PartyDivisions> aliased) { 098 this(alias, aliased, (Field<?>[]) null, null); 099 } 100 101 private PartyDivisions(Name alias, Table<com.echothree.model.jooq.server.records.party.PartyDivisions> aliased, Field<?>[] parameters, Condition where) { 102 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 103 } 104 105 /** 106 * Create an aliased <code>partydivisions</code> table reference 107 */ 108 public PartyDivisions(String alias) { 109 this(DSL.name(alias), PartyDivisions); 110 } 111 112 /** 113 * Create an aliased <code>partydivisions</code> table reference 114 */ 115 public PartyDivisions(Name alias) { 116 this(alias, PartyDivisions); 117 } 118 119 /** 120 * Create a <code>partydivisions</code> table reference 121 */ 122 public PartyDivisions() { 123 this(DSL.name("partydivisions"), null); 124 } 125 126 @Override 127 public UniqueKey<com.echothree.model.jooq.server.records.party.PartyDivisions> getPrimaryKey() { 128 return KeyRegistry.PARTY_DIVISIONS_PK; 129 } 130 131 @Override 132 public List<UniqueKey<com.echothree.model.jooq.server.records.party.PartyDivisions>> getUniqueKeys() { 133 return Arrays.asList(KeyRegistry.PARTY_DIVISIONS_PARTY_AND_THRU_TIME_UK, KeyRegistry.PARTY_DIVISIONS_COMPANY_PARTY_AND_PARTY_DIVISION_NAME_AND_THRU_TIME_UK); 134 } 135 136 @Override 137 public List<ForeignKey<com.echothree.model.jooq.server.records.party.PartyDivisions, ?>> getReferences() { 138 return Arrays.asList(KeyRegistry.PARTY_DIVISIONS_COMPANY_PARTY_FK, KeyRegistry.PARTY_DIVISIONS_PARTY_FK); 139 } 140 141 private transient PartiesPath _pdiv_companypartyid_fk; 142 143 /** 144 * Get the implicit join path to the <code>parties</code> table, via the 145 * <code>pdiv_companypartyid_fk</code> key. 146 */ 147 public PartiesPath pdiv_companypartyid_fk() { 148 if (_pdiv_companypartyid_fk == null) 149 _pdiv_companypartyid_fk = new PartiesPath(this, KeyRegistry.PARTY_DIVISIONS_COMPANY_PARTY_FK, null); 150 151 return _pdiv_companypartyid_fk; 152 } 153 154 private transient PartiesPath _pdiv_par_partyid_fk; 155 156 /** 157 * Get the implicit join path to the <code>parties</code> table, via the 158 * <code>pdiv_par_partyid_fk</code> key. 159 */ 160 public PartiesPath pdiv_par_partyid_fk() { 161 if (_pdiv_par_partyid_fk == null) 162 _pdiv_par_partyid_fk = new PartiesPath(this, KeyRegistry.PARTY_DIVISIONS_PARTY_FK, null); 163 164 return _pdiv_par_partyid_fk; 165 } 166 167 @Override 168 public PartyDivisions as(String alias) { 169 return new PartyDivisions(DSL.name(alias), this); 170 } 171 172 @Override 173 public PartyDivisions as(Name alias) { 174 return new PartyDivisions(alias, this); 175 } 176 177 @Override 178 public PartyDivisions as(Table<?> alias) { 179 return new PartyDivisions(alias.getQualifiedName(), this); 180 } 181 182 /** 183 * Rename this table 184 */ 185 @Override 186 public PartyDivisions rename(String name) { 187 return new PartyDivisions(DSL.name(name), null); 188 } 189 190 /** 191 * Rename this table 192 */ 193 @Override 194 public PartyDivisions rename(Name name) { 195 return new PartyDivisions(name, null); 196 } 197 198 /** 199 * Rename this table 200 */ 201 @Override 202 public PartyDivisions rename(Table<?> name) { 203 return new PartyDivisions(name.getQualifiedName(), null); 204 } 205 206 /** 207 * Create an inline derived table from this table 208 */ 209 @Override 210 public PartyDivisions where(Condition condition) { 211 return new PartyDivisions(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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions 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 PartyDivisions whereNotExists(TableLike<?> select) { 287 return where(DSL.notExists(select)); 288 } 289}