001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.employee; 005 006 007import com.echothree.model.data.employee.common.pk.LeaveDetailPK; 008import com.echothree.model.data.employee.common.pk.LeavePK; 009import com.echothree.model.data.employee.common.pk.LeaveReasonPK; 010import com.echothree.model.data.employee.common.pk.LeaveTypePK; 011import com.echothree.model.data.party.common.pk.PartyPK; 012import com.echothree.model.jooq.server.KeyRegistry; 013import com.echothree.model.jooq.server.tables.employee.LeaveReasons.LeaveReasonsPath; 014import com.echothree.model.jooq.server.tables.employee.LeaveTypes.LeaveTypesPath; 015import com.echothree.model.jooq.server.tables.employee.Leaves.LeavesPath; 016import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 017 018import java.util.Arrays; 019import java.util.Collection; 020import java.util.List; 021 022import org.jooq.Condition; 023import org.jooq.Converter; 024import org.jooq.Field; 025import org.jooq.ForeignKey; 026import org.jooq.InverseForeignKey; 027import org.jooq.Name; 028import org.jooq.Path; 029import org.jooq.PlainSQL; 030import org.jooq.QueryPart; 031import org.jooq.Record; 032import org.jooq.SQL; 033import org.jooq.Stringly; 034import org.jooq.Table; 035import org.jooq.TableField; 036import org.jooq.TableLike; 037import org.jooq.TableOptions; 038import org.jooq.UniqueKey; 039import org.jooq.impl.DSL; 040import org.jooq.impl.Internal; 041import org.jooq.impl.SQLDataType; 042import org.jooq.impl.TableImpl; 043 044 045/** 046 * This class is generated by jOOQ. 047 */ 048@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 049public class LeaveDetails extends TableImpl<com.echothree.model.jooq.server.records.employee.LeaveDetails> { 050 051 private static final long serialVersionUID = 1L; 052 053 /** 054 * The reference instance of <code>leavedetails</code> 055 */ 056 public static final LeaveDetails LeaveDetails = new LeaveDetails(); 057 058 /** 059 * The class holding records for this type 060 */ 061 @Override 062 public Class<com.echothree.model.jooq.server.records.employee.LeaveDetails> getRecordType() { 063 return com.echothree.model.jooq.server.records.employee.LeaveDetails.class; 064 } 065 066 /** 067 * The column <code>leavedetails.lvdt_leavedetailid</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, LeaveDetailPK> LEAVE_DETAIL = createField(DSL.name("lvdt_leavedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LeaveDetailPK.class, id -> new com.echothree.model.data.employee.common.pk.LeaveDetailPK(id), primaryKey -> primaryKey.getEntityId())); 070 071 /** 072 * The column <code>leavedetails.lvdt_lv_leaveid</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, LeavePK> LEAVE = createField(DSL.name("lvdt_lv_leaveid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LeavePK.class, id -> new com.echothree.model.data.employee.common.pk.LeavePK(id), primaryKey -> primaryKey.getEntityId())); 075 076 /** 077 * The column <code>leavedetails.lvdt_leavename</code>. 078 */ 079 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, String> LEAVE_NAME = createField(DSL.name("lvdt_leavename"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 080 081 /** 082 * The column <code>leavedetails.lvdt_par_partyid</code>. 083 */ 084 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, PartyPK> PARTY = createField(DSL.name("lvdt_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())); 085 086 /** 087 * The column <code>leavedetails.lvdt_companypartyid</code>. 088 */ 089 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, PartyPK> COMPANY_PARTY = createField(DSL.name("lvdt_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())); 090 091 /** 092 * The column <code>leavedetails.lvdt_lvtyp_leavetypeid</code>. 093 */ 094 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, LeaveTypePK> LEAVE_TYPE = createField(DSL.name("lvdt_lvtyp_leavetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LeaveTypePK.class, id -> new com.echothree.model.data.employee.common.pk.LeaveTypePK(id), primaryKey -> primaryKey.getEntityId())); 095 096 /** 097 * The column <code>leavedetails.lvdt_lvrsn_leavereasonid</code>. 098 */ 099 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, LeaveReasonPK> LEAVE_REASON = createField(DSL.name("lvdt_lvrsn_leavereasonid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LeaveReasonPK.class, id -> new com.echothree.model.data.employee.common.pk.LeaveReasonPK(id), primaryKey -> primaryKey.getEntityId())); 100 101 /** 102 * The column <code>leavedetails.lvdt_starttime</code>. 103 */ 104 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, Long> START_TIME = createField(DSL.name("lvdt_starttime"), SQLDataType.BIGINT.nullable(false), this, ""); 105 106 /** 107 * The column <code>leavedetails.lvdt_endtime</code>. 108 */ 109 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, Long> END_TIME = createField(DSL.name("lvdt_endtime"), SQLDataType.BIGINT, this, ""); 110 111 /** 112 * The column <code>leavedetails.lvdt_totaltime</code>. 113 */ 114 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, Long> TOTAL_TIME = createField(DSL.name("lvdt_totaltime"), SQLDataType.BIGINT, this, ""); 115 116 /** 117 * The column <code>leavedetails.lvdt_fromtime</code>. 118 */ 119 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, Long> FROM_TIME = createField(DSL.name("lvdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 120 121 /** 122 * The column <code>leavedetails.lvdt_thrutime</code>. 123 */ 124 public final TableField<com.echothree.model.jooq.server.records.employee.LeaveDetails, Long> THRU_TIME = createField(DSL.name("lvdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 125 126 private LeaveDetails(Name alias, Table<com.echothree.model.jooq.server.records.employee.LeaveDetails> aliased) { 127 this(alias, aliased, (Field<?>[]) null, null); 128 } 129 130 private LeaveDetails(Name alias, Table<com.echothree.model.jooq.server.records.employee.LeaveDetails> aliased, Field<?>[] parameters, Condition where) { 131 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 132 } 133 134 /** 135 * Create an aliased <code>leavedetails</code> table reference 136 */ 137 public LeaveDetails(String alias) { 138 this(DSL.name(alias), LeaveDetails); 139 } 140 141 /** 142 * Create an aliased <code>leavedetails</code> table reference 143 */ 144 public LeaveDetails(Name alias) { 145 this(alias, LeaveDetails); 146 } 147 148 /** 149 * Create a <code>leavedetails</code> table reference 150 */ 151 public LeaveDetails() { 152 this(DSL.name("leavedetails"), null); 153 } 154 155 public <O extends Record> LeaveDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.LeaveDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.LeaveDetails> parentPath) { 156 super(path, childPath, parentPath, LeaveDetails); 157 } 158 159 /** 160 * A subtype implementing {@link Path} for simplified path-based joins. 161 */ 162 public static class LeaveDetailsPath extends LeaveDetails implements Path<com.echothree.model.jooq.server.records.employee.LeaveDetails> { 163 164 private static final long serialVersionUID = 1L; 165 public <O extends Record> LeaveDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.employee.LeaveDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.employee.LeaveDetails> parentPath) { 166 super(path, childPath, parentPath); 167 } 168 private LeaveDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.employee.LeaveDetails> aliased) { 169 super(alias, aliased); 170 } 171 172 @Override 173 public LeaveDetailsPath as(String alias) { 174 return new LeaveDetailsPath(DSL.name(alias), this); 175 } 176 177 @Override 178 public LeaveDetailsPath as(Name alias) { 179 return new LeaveDetailsPath(alias, this); 180 } 181 182 @Override 183 public LeaveDetailsPath as(Table<?> alias) { 184 return new LeaveDetailsPath(alias.getQualifiedName(), this); 185 } 186 } 187 188 @Override 189 public UniqueKey<com.echothree.model.jooq.server.records.employee.LeaveDetails> getPrimaryKey() { 190 return KeyRegistry.LEAVE_DETAILS_PK; 191 } 192 193 @Override 194 public List<UniqueKey<com.echothree.model.jooq.server.records.employee.LeaveDetails>> getUniqueKeys() { 195 return Arrays.asList(KeyRegistry.LEAVE_DETAILS_LEAVE_AND_THRU_TIME_UK, KeyRegistry.LEAVE_DETAILS_LEAVE_NAME_AND_THRU_TIME_UK); 196 } 197 198 @Override 199 public List<ForeignKey<com.echothree.model.jooq.server.records.employee.LeaveDetails, ?>> getReferences() { 200 return Arrays.asList(KeyRegistry.LEAVE_DETAILS_COMPANY_PARTY_FK, KeyRegistry.LEAVE_DETAILS_LEAVE_FK, KeyRegistry.LEAVE_DETAILS_LEAVE_REASON_FK, KeyRegistry.LEAVE_DETAILS_LEAVE_TYPE_FK, KeyRegistry.LEAVE_DETAILS_PARTY_FK); 201 } 202 203 private transient PartiesPath _lvdt_companypartyid_fk; 204 205 /** 206 * Get the implicit join path to the <code>parties</code> table, via the 207 * <code>lvdt_companypartyid_fk</code> key. 208 */ 209 public PartiesPath lvdt_companypartyid_fk() { 210 if (_lvdt_companypartyid_fk == null) 211 _lvdt_companypartyid_fk = new PartiesPath(this, KeyRegistry.LEAVE_DETAILS_COMPANY_PARTY_FK, null); 212 213 return _lvdt_companypartyid_fk; 214 } 215 216 private transient LeavesPath _lvdt_lv_leaveid_fk; 217 218 /** 219 * Get the implicit join path to the <code>leaves</code> table. 220 */ 221 public LeavesPath lvdt_lv_leaveid_fk() { 222 if (_lvdt_lv_leaveid_fk == null) 223 _lvdt_lv_leaveid_fk = new LeavesPath(this, KeyRegistry.LEAVE_DETAILS_LEAVE_FK, null); 224 225 return _lvdt_lv_leaveid_fk; 226 } 227 228 private transient LeaveReasonsPath _lvdt_lvrsn_leavereasonid_fk; 229 230 /** 231 * Get the implicit join path to the <code>leavereasons</code> table. 232 */ 233 public LeaveReasonsPath lvdt_lvrsn_leavereasonid_fk() { 234 if (_lvdt_lvrsn_leavereasonid_fk == null) 235 _lvdt_lvrsn_leavereasonid_fk = new LeaveReasonsPath(this, KeyRegistry.LEAVE_DETAILS_LEAVE_REASON_FK, null); 236 237 return _lvdt_lvrsn_leavereasonid_fk; 238 } 239 240 private transient LeaveTypesPath _lvdt_lvtyp_leavetypeid_fk; 241 242 /** 243 * Get the implicit join path to the <code>leavetypes</code> table. 244 */ 245 public LeaveTypesPath lvdt_lvtyp_leavetypeid_fk() { 246 if (_lvdt_lvtyp_leavetypeid_fk == null) 247 _lvdt_lvtyp_leavetypeid_fk = new LeaveTypesPath(this, KeyRegistry.LEAVE_DETAILS_LEAVE_TYPE_FK, null); 248 249 return _lvdt_lvtyp_leavetypeid_fk; 250 } 251 252 private transient PartiesPath _lvdt_par_partyid_fk; 253 254 /** 255 * Get the implicit join path to the <code>parties</code> table, via the 256 * <code>lvdt_par_partyid_fk</code> key. 257 */ 258 public PartiesPath lvdt_par_partyid_fk() { 259 if (_lvdt_par_partyid_fk == null) 260 _lvdt_par_partyid_fk = new PartiesPath(this, KeyRegistry.LEAVE_DETAILS_PARTY_FK, null); 261 262 return _lvdt_par_partyid_fk; 263 } 264 265 @Override 266 public LeaveDetails as(String alias) { 267 return new LeaveDetails(DSL.name(alias), this); 268 } 269 270 @Override 271 public LeaveDetails as(Name alias) { 272 return new LeaveDetails(alias, this); 273 } 274 275 @Override 276 public LeaveDetails as(Table<?> alias) { 277 return new LeaveDetails(alias.getQualifiedName(), this); 278 } 279 280 /** 281 * Rename this table 282 */ 283 @Override 284 public LeaveDetails rename(String name) { 285 return new LeaveDetails(DSL.name(name), null); 286 } 287 288 /** 289 * Rename this table 290 */ 291 @Override 292 public LeaveDetails rename(Name name) { 293 return new LeaveDetails(name, null); 294 } 295 296 /** 297 * Rename this table 298 */ 299 @Override 300 public LeaveDetails rename(Table<?> name) { 301 return new LeaveDetails(name.getQualifiedName(), null); 302 } 303 304 /** 305 * Create an inline derived table from this table 306 */ 307 @Override 308 public LeaveDetails where(Condition condition) { 309 return new LeaveDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 310 } 311 312 /** 313 * Create an inline derived table from this table 314 */ 315 @Override 316 public LeaveDetails where(Collection<? extends Condition> conditions) { 317 return where(DSL.and(conditions)); 318 } 319 320 /** 321 * Create an inline derived table from this table 322 */ 323 @Override 324 public LeaveDetails where(Condition... conditions) { 325 return where(DSL.and(conditions)); 326 } 327 328 /** 329 * Create an inline derived table from this table 330 */ 331 @Override 332 public LeaveDetails where(Field<Boolean> 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 LeaveDetails where(SQL condition) { 342 return where(DSL.condition(condition)); 343 } 344 345 /** 346 * Create an inline derived table from this table 347 */ 348 @Override 349 @PlainSQL 350 public LeaveDetails where(@Stringly.SQL String condition) { 351 return where(DSL.condition(condition)); 352 } 353 354 /** 355 * Create an inline derived table from this table 356 */ 357 @Override 358 @PlainSQL 359 public LeaveDetails where(@Stringly.SQL String condition, Object... binds) { 360 return where(DSL.condition(condition, binds)); 361 } 362 363 /** 364 * Create an inline derived table from this table 365 */ 366 @Override 367 @PlainSQL 368 public LeaveDetails where(@Stringly.SQL String condition, QueryPart... parts) { 369 return where(DSL.condition(condition, parts)); 370 } 371 372 /** 373 * Create an inline derived table from this table 374 */ 375 @Override 376 public LeaveDetails whereExists(TableLike<?> select) { 377 return where(DSL.exists(select)); 378 } 379 380 /** 381 * Create an inline derived table from this table 382 */ 383 @Override 384 public LeaveDetails whereNotExists(TableLike<?> select) { 385 return where(DSL.notExists(select)); 386 } 387}