001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.scale; 005 006 007import com.echothree.model.data.core.common.pk.ServerServicePK; 008import com.echothree.model.data.scale.common.pk.ScaleDetailPK; 009import com.echothree.model.data.scale.common.pk.ScalePK; 010import com.echothree.model.data.scale.common.pk.ScaleTypePK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.core.ServerServices.ServerServicesPath; 013import com.echothree.model.jooq.server.tables.scale.ScaleTypes.ScaleTypesPath; 014import com.echothree.model.jooq.server.tables.scale.Scales.ScalesPath; 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 ScaleDetails extends TableImpl<com.echothree.model.jooq.server.records.scale.ScaleDetails> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>scaledetails</code> 053 */ 054 public static final ScaleDetails ScaleDetails = new ScaleDetails(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.scale.ScaleDetails> getRecordType() { 061 return com.echothree.model.jooq.server.records.scale.ScaleDetails.class; 062 } 063 064 /** 065 * The column <code>scaledetails.scldt_scaledetailid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, ScaleDetailPK> SCALE_DETAIL = createField(DSL.name("scldt_scaledetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ScaleDetailPK.class, id -> new com.echothree.model.data.scale.common.pk.ScaleDetailPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>scaledetails.scldt_scl_scaleid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, ScalePK> SCALE = createField(DSL.name("scldt_scl_scaleid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ScalePK.class, id -> new com.echothree.model.data.scale.common.pk.ScalePK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>scaledetails.scldt_scalename</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, String> SCALE_NAME = createField(DSL.name("scldt_scalename"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 078 079 /** 080 * The column <code>scaledetails.scldt_scltyp_scaletypeid</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, ScaleTypePK> SCALE_TYPE = createField(DSL.name("scldt_scltyp_scaletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ScaleTypePK.class, id -> new com.echothree.model.data.scale.common.pk.ScaleTypePK(id), primaryKey -> primaryKey.getEntityId())); 083 084 /** 085 * The column <code>scaledetails.scldt_servsrv_serverserviceid</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, ServerServicePK> SERVER_SERVICE = createField(DSL.name("scldt_servsrv_serverserviceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ServerServicePK.class, id -> new com.echothree.model.data.core.common.pk.ServerServicePK(id), primaryKey -> primaryKey.getEntityId())); 088 089 /** 090 * The column <code>scaledetails.scldt_isdefault</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, Boolean> IS_DEFAULT = createField(DSL.name("scldt_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 093 094 /** 095 * The column <code>scaledetails.scldt_sortorder</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, Integer> SORT_ORDER = createField(DSL.name("scldt_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 098 099 /** 100 * The column <code>scaledetails.scldt_fromtime</code>. 101 */ 102 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, Long> FROM_TIME = createField(DSL.name("scldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 103 104 /** 105 * The column <code>scaledetails.scldt_thrutime</code>. 106 */ 107 public final TableField<com.echothree.model.jooq.server.records.scale.ScaleDetails, Long> THRU_TIME = createField(DSL.name("scldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 108 109 private ScaleDetails(Name alias, Table<com.echothree.model.jooq.server.records.scale.ScaleDetails> aliased) { 110 this(alias, aliased, (Field<?>[]) null, null); 111 } 112 113 private ScaleDetails(Name alias, Table<com.echothree.model.jooq.server.records.scale.ScaleDetails> aliased, Field<?>[] parameters, Condition where) { 114 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 115 } 116 117 /** 118 * Create an aliased <code>scaledetails</code> table reference 119 */ 120 public ScaleDetails(String alias) { 121 this(DSL.name(alias), ScaleDetails); 122 } 123 124 /** 125 * Create an aliased <code>scaledetails</code> table reference 126 */ 127 public ScaleDetails(Name alias) { 128 this(alias, ScaleDetails); 129 } 130 131 /** 132 * Create a <code>scaledetails</code> table reference 133 */ 134 public ScaleDetails() { 135 this(DSL.name("scaledetails"), null); 136 } 137 138 public <O extends Record> ScaleDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.scale.ScaleDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.scale.ScaleDetails> parentPath) { 139 super(path, childPath, parentPath, ScaleDetails); 140 } 141 142 /** 143 * A subtype implementing {@link Path} for simplified path-based joins. 144 */ 145 public static class ScaleDetailsPath extends ScaleDetails implements Path<com.echothree.model.jooq.server.records.scale.ScaleDetails> { 146 147 private static final long serialVersionUID = 1L; 148 public <O extends Record> ScaleDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.scale.ScaleDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.scale.ScaleDetails> parentPath) { 149 super(path, childPath, parentPath); 150 } 151 private ScaleDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.scale.ScaleDetails> aliased) { 152 super(alias, aliased); 153 } 154 155 @Override 156 public ScaleDetailsPath as(String alias) { 157 return new ScaleDetailsPath(DSL.name(alias), this); 158 } 159 160 @Override 161 public ScaleDetailsPath as(Name alias) { 162 return new ScaleDetailsPath(alias, this); 163 } 164 165 @Override 166 public ScaleDetailsPath as(Table<?> alias) { 167 return new ScaleDetailsPath(alias.getQualifiedName(), this); 168 } 169 } 170 171 @Override 172 public UniqueKey<com.echothree.model.jooq.server.records.scale.ScaleDetails> getPrimaryKey() { 173 return KeyRegistry.SCALE_DETAILS_PK; 174 } 175 176 @Override 177 public List<UniqueKey<com.echothree.model.jooq.server.records.scale.ScaleDetails>> getUniqueKeys() { 178 return Arrays.asList(KeyRegistry.SCALE_DETAILS_SCALE_AND_THRU_TIME_UK, KeyRegistry.SCALE_DETAILS_SCALE_NAME_AND_THRU_TIME_UK); 179 } 180 181 @Override 182 public List<ForeignKey<com.echothree.model.jooq.server.records.scale.ScaleDetails, ?>> getReferences() { 183 return Arrays.asList(KeyRegistry.SCALE_DETAILS_SCALE_FK, KeyRegistry.SCALE_DETAILS_SCALE_TYPE_FK, KeyRegistry.SCALE_DETAILS_SERVER_SERVICE_FK); 184 } 185 186 private transient ScalesPath _scldt_scl_scaleid_fk; 187 188 /** 189 * Get the implicit join path to the <code>scales</code> table. 190 */ 191 public ScalesPath scldt_scl_scaleid_fk() { 192 if (_scldt_scl_scaleid_fk == null) 193 _scldt_scl_scaleid_fk = new ScalesPath(this, KeyRegistry.SCALE_DETAILS_SCALE_FK, null); 194 195 return _scldt_scl_scaleid_fk; 196 } 197 198 private transient ScaleTypesPath _scldt_scltyp_scaletypeid_fk; 199 200 /** 201 * Get the implicit join path to the <code>scaletypes</code> table. 202 */ 203 public ScaleTypesPath scldt_scltyp_scaletypeid_fk() { 204 if (_scldt_scltyp_scaletypeid_fk == null) 205 _scldt_scltyp_scaletypeid_fk = new ScaleTypesPath(this, KeyRegistry.SCALE_DETAILS_SCALE_TYPE_FK, null); 206 207 return _scldt_scltyp_scaletypeid_fk; 208 } 209 210 private transient ServerServicesPath _scldt_servsrv_serverserviceid_fk; 211 212 /** 213 * Get the implicit join path to the <code>serverservices</code> table. 214 */ 215 public ServerServicesPath scldt_servsrv_serverserviceid_fk() { 216 if (_scldt_servsrv_serverserviceid_fk == null) 217 _scldt_servsrv_serverserviceid_fk = new ServerServicesPath(this, KeyRegistry.SCALE_DETAILS_SERVER_SERVICE_FK, null); 218 219 return _scldt_servsrv_serverserviceid_fk; 220 } 221 222 @Override 223 public ScaleDetails as(String alias) { 224 return new ScaleDetails(DSL.name(alias), this); 225 } 226 227 @Override 228 public ScaleDetails as(Name alias) { 229 return new ScaleDetails(alias, this); 230 } 231 232 @Override 233 public ScaleDetails as(Table<?> alias) { 234 return new ScaleDetails(alias.getQualifiedName(), this); 235 } 236 237 /** 238 * Rename this table 239 */ 240 @Override 241 public ScaleDetails rename(String name) { 242 return new ScaleDetails(DSL.name(name), null); 243 } 244 245 /** 246 * Rename this table 247 */ 248 @Override 249 public ScaleDetails rename(Name name) { 250 return new ScaleDetails(name, null); 251 } 252 253 /** 254 * Rename this table 255 */ 256 @Override 257 public ScaleDetails rename(Table<?> name) { 258 return new ScaleDetails(name.getQualifiedName(), null); 259 } 260 261 /** 262 * Create an inline derived table from this table 263 */ 264 @Override 265 public ScaleDetails where(Condition condition) { 266 return new ScaleDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 267 } 268 269 /** 270 * Create an inline derived table from this table 271 */ 272 @Override 273 public ScaleDetails where(Collection<? extends Condition> conditions) { 274 return where(DSL.and(conditions)); 275 } 276 277 /** 278 * Create an inline derived table from this table 279 */ 280 @Override 281 public ScaleDetails where(Condition... conditions) { 282 return where(DSL.and(conditions)); 283 } 284 285 /** 286 * Create an inline derived table from this table 287 */ 288 @Override 289 public ScaleDetails where(Field<Boolean> condition) { 290 return where(DSL.condition(condition)); 291 } 292 293 /** 294 * Create an inline derived table from this table 295 */ 296 @Override 297 @PlainSQL 298 public ScaleDetails where(SQL condition) { 299 return where(DSL.condition(condition)); 300 } 301 302 /** 303 * Create an inline derived table from this table 304 */ 305 @Override 306 @PlainSQL 307 public ScaleDetails where(@Stringly.SQL String condition) { 308 return where(DSL.condition(condition)); 309 } 310 311 /** 312 * Create an inline derived table from this table 313 */ 314 @Override 315 @PlainSQL 316 public ScaleDetails where(@Stringly.SQL String condition, Object... binds) { 317 return where(DSL.condition(condition, binds)); 318 } 319 320 /** 321 * Create an inline derived table from this table 322 */ 323 @Override 324 @PlainSQL 325 public ScaleDetails where(@Stringly.SQL String condition, QueryPart... parts) { 326 return where(DSL.condition(condition, parts)); 327 } 328 329 /** 330 * Create an inline derived table from this table 331 */ 332 @Override 333 public ScaleDetails whereExists(TableLike<?> select) { 334 return where(DSL.exists(select)); 335 } 336 337 /** 338 * Create an inline derived table from this table 339 */ 340 @Override 341 public ScaleDetails whereNotExists(TableLike<?> select) { 342 return where(DSL.notExists(select)); 343 } 344}