001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.survey; 005 006 007import com.echothree.model.data.survey.common.pk.SurveyDetailPK; 008import com.echothree.model.data.survey.common.pk.SurveyPK; 009import com.echothree.model.data.survey.common.pk.SurveyTypePK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.survey.SurveyTypes.SurveyTypesPath; 012import com.echothree.model.jooq.server.tables.survey.Surveys.SurveysPath; 013 014import java.util.Arrays; 015import java.util.Collection; 016import java.util.List; 017 018import org.jooq.Condition; 019import org.jooq.Converter; 020import org.jooq.Field; 021import org.jooq.ForeignKey; 022import org.jooq.InverseForeignKey; 023import org.jooq.Name; 024import org.jooq.Path; 025import org.jooq.PlainSQL; 026import org.jooq.QueryPart; 027import org.jooq.Record; 028import org.jooq.SQL; 029import org.jooq.Stringly; 030import org.jooq.Table; 031import org.jooq.TableField; 032import org.jooq.TableLike; 033import org.jooq.TableOptions; 034import org.jooq.UniqueKey; 035import org.jooq.impl.DSL; 036import org.jooq.impl.Internal; 037import org.jooq.impl.SQLDataType; 038import org.jooq.impl.TableImpl; 039 040 041/** 042 * This class is generated by jOOQ. 043 */ 044@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 045public class SurveyDetails extends TableImpl<com.echothree.model.jooq.server.records.survey.SurveyDetails> { 046 047 private static final long serialVersionUID = 1L; 048 049 /** 050 * The reference instance of <code>surveydetails</code> 051 */ 052 public static final SurveyDetails SurveyDetails = new SurveyDetails(); 053 054 /** 055 * The class holding records for this type 056 */ 057 @Override 058 public Class<com.echothree.model.jooq.server.records.survey.SurveyDetails> getRecordType() { 059 return com.echothree.model.jooq.server.records.survey.SurveyDetails.class; 060 } 061 062 /** 063 * The column <code>surveydetails.srvydt_surveydetailid</code>. 064 */ 065 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, SurveyDetailPK> SURVEY_DETAIL = createField(DSL.name("srvydt_surveydetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SurveyDetailPK.class, id -> new com.echothree.model.data.survey.common.pk.SurveyDetailPK(id), primaryKey -> primaryKey.getEntityId())); 066 067 /** 068 * The column <code>surveydetails.srvydt_srvy_surveyid</code>. 069 */ 070 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, SurveyPK> SURVEY = createField(DSL.name("srvydt_srvy_surveyid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SurveyPK.class, id -> new com.echothree.model.data.survey.common.pk.SurveyPK(id), primaryKey -> primaryKey.getEntityId())); 071 072 /** 073 * The column <code>surveydetails.srvydt_srvytyp_surveytypeid</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, SurveyTypePK> SURVEY_TYPE = createField(DSL.name("srvydt_srvytyp_surveytypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SurveyTypePK.class, id -> new com.echothree.model.data.survey.common.pk.SurveyTypePK(id), primaryKey -> primaryKey.getEntityId())); 076 077 /** 078 * The column <code>surveydetails.srvydt_surveyname</code>. 079 */ 080 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, String> SURVEY_NAME = createField(DSL.name("srvydt_surveyname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 081 082 /** 083 * The column <code>surveydetails.srvydt_isdefault</code>. 084 */ 085 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, Boolean> IS_DEFAULT = createField(DSL.name("srvydt_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 086 087 /** 088 * The column <code>surveydetails.srvydt_sortorder</code>. 089 */ 090 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, Integer> SORT_ORDER = createField(DSL.name("srvydt_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 091 092 /** 093 * The column <code>surveydetails.srvydt_fromtime</code>. 094 */ 095 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, Long> FROM_TIME = createField(DSL.name("srvydt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 096 097 /** 098 * The column <code>surveydetails.srvydt_thrutime</code>. 099 */ 100 public final TableField<com.echothree.model.jooq.server.records.survey.SurveyDetails, Long> THRU_TIME = createField(DSL.name("srvydt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 101 102 private SurveyDetails(Name alias, Table<com.echothree.model.jooq.server.records.survey.SurveyDetails> aliased) { 103 this(alias, aliased, (Field<?>[]) null, null); 104 } 105 106 private SurveyDetails(Name alias, Table<com.echothree.model.jooq.server.records.survey.SurveyDetails> aliased, Field<?>[] parameters, Condition where) { 107 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 108 } 109 110 /** 111 * Create an aliased <code>surveydetails</code> table reference 112 */ 113 public SurveyDetails(String alias) { 114 this(DSL.name(alias), SurveyDetails); 115 } 116 117 /** 118 * Create an aliased <code>surveydetails</code> table reference 119 */ 120 public SurveyDetails(Name alias) { 121 this(alias, SurveyDetails); 122 } 123 124 /** 125 * Create a <code>surveydetails</code> table reference 126 */ 127 public SurveyDetails() { 128 this(DSL.name("surveydetails"), null); 129 } 130 131 public <O extends Record> SurveyDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.survey.SurveyDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.survey.SurveyDetails> parentPath) { 132 super(path, childPath, parentPath, SurveyDetails); 133 } 134 135 /** 136 * A subtype implementing {@link Path} for simplified path-based joins. 137 */ 138 public static class SurveyDetailsPath extends SurveyDetails implements Path<com.echothree.model.jooq.server.records.survey.SurveyDetails> { 139 140 private static final long serialVersionUID = 1L; 141 public <O extends Record> SurveyDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.survey.SurveyDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.survey.SurveyDetails> parentPath) { 142 super(path, childPath, parentPath); 143 } 144 private SurveyDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.survey.SurveyDetails> aliased) { 145 super(alias, aliased); 146 } 147 148 @Override 149 public SurveyDetailsPath as(String alias) { 150 return new SurveyDetailsPath(DSL.name(alias), this); 151 } 152 153 @Override 154 public SurveyDetailsPath as(Name alias) { 155 return new SurveyDetailsPath(alias, this); 156 } 157 158 @Override 159 public SurveyDetailsPath as(Table<?> alias) { 160 return new SurveyDetailsPath(alias.getQualifiedName(), this); 161 } 162 } 163 164 @Override 165 public UniqueKey<com.echothree.model.jooq.server.records.survey.SurveyDetails> getPrimaryKey() { 166 return KeyRegistry.SURVEY_DETAILS_PK; 167 } 168 169 @Override 170 public List<UniqueKey<com.echothree.model.jooq.server.records.survey.SurveyDetails>> getUniqueKeys() { 171 return Arrays.asList(KeyRegistry.SURVEY_DETAILS_SURVEY_AND_THRU_TIME_UK, KeyRegistry.SURVEY_DETAILS_SURVEY_TYPE_AND_SURVEY_NAME_AND_THRU_TIME_UK); 172 } 173 174 @Override 175 public List<ForeignKey<com.echothree.model.jooq.server.records.survey.SurveyDetails, ?>> getReferences() { 176 return Arrays.asList(KeyRegistry.SURVEY_DETAILS_SURVEY_FK, KeyRegistry.SURVEY_DETAILS_SURVEY_TYPE_FK); 177 } 178 179 private transient SurveysPath _srvydt_srvy_surveyid_fk; 180 181 /** 182 * Get the implicit join path to the <code>surveys</code> table. 183 */ 184 public SurveysPath srvydt_srvy_surveyid_fk() { 185 if (_srvydt_srvy_surveyid_fk == null) 186 _srvydt_srvy_surveyid_fk = new SurveysPath(this, KeyRegistry.SURVEY_DETAILS_SURVEY_FK, null); 187 188 return _srvydt_srvy_surveyid_fk; 189 } 190 191 private transient SurveyTypesPath _srvydt_srvytyp_surveytypeid_fk; 192 193 /** 194 * Get the implicit join path to the <code>surveytypes</code> table. 195 */ 196 public SurveyTypesPath srvydt_srvytyp_surveytypeid_fk() { 197 if (_srvydt_srvytyp_surveytypeid_fk == null) 198 _srvydt_srvytyp_surveytypeid_fk = new SurveyTypesPath(this, KeyRegistry.SURVEY_DETAILS_SURVEY_TYPE_FK, null); 199 200 return _srvydt_srvytyp_surveytypeid_fk; 201 } 202 203 @Override 204 public SurveyDetails as(String alias) { 205 return new SurveyDetails(DSL.name(alias), this); 206 } 207 208 @Override 209 public SurveyDetails as(Name alias) { 210 return new SurveyDetails(alias, this); 211 } 212 213 @Override 214 public SurveyDetails as(Table<?> alias) { 215 return new SurveyDetails(alias.getQualifiedName(), this); 216 } 217 218 /** 219 * Rename this table 220 */ 221 @Override 222 public SurveyDetails rename(String name) { 223 return new SurveyDetails(DSL.name(name), null); 224 } 225 226 /** 227 * Rename this table 228 */ 229 @Override 230 public SurveyDetails rename(Name name) { 231 return new SurveyDetails(name, null); 232 } 233 234 /** 235 * Rename this table 236 */ 237 @Override 238 public SurveyDetails rename(Table<?> name) { 239 return new SurveyDetails(name.getQualifiedName(), null); 240 } 241 242 /** 243 * Create an inline derived table from this table 244 */ 245 @Override 246 public SurveyDetails where(Condition condition) { 247 return new SurveyDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 248 } 249 250 /** 251 * Create an inline derived table from this table 252 */ 253 @Override 254 public SurveyDetails where(Collection<? extends Condition> conditions) { 255 return where(DSL.and(conditions)); 256 } 257 258 /** 259 * Create an inline derived table from this table 260 */ 261 @Override 262 public SurveyDetails where(Condition... conditions) { 263 return where(DSL.and(conditions)); 264 } 265 266 /** 267 * Create an inline derived table from this table 268 */ 269 @Override 270 public SurveyDetails where(Field<Boolean> condition) { 271 return where(DSL.condition(condition)); 272 } 273 274 /** 275 * Create an inline derived table from this table 276 */ 277 @Override 278 @PlainSQL 279 public SurveyDetails where(SQL condition) { 280 return where(DSL.condition(condition)); 281 } 282 283 /** 284 * Create an inline derived table from this table 285 */ 286 @Override 287 @PlainSQL 288 public SurveyDetails where(@Stringly.SQL String condition) { 289 return where(DSL.condition(condition)); 290 } 291 292 /** 293 * Create an inline derived table from this table 294 */ 295 @Override 296 @PlainSQL 297 public SurveyDetails where(@Stringly.SQL String condition, Object... binds) { 298 return where(DSL.condition(condition, binds)); 299 } 300 301 /** 302 * Create an inline derived table from this table 303 */ 304 @Override 305 @PlainSQL 306 public SurveyDetails where(@Stringly.SQL String condition, QueryPart... parts) { 307 return where(DSL.condition(condition, parts)); 308 } 309 310 /** 311 * Create an inline derived table from this table 312 */ 313 @Override 314 public SurveyDetails whereExists(TableLike<?> select) { 315 return where(DSL.exists(select)); 316 } 317 318 /** 319 * Create an inline derived table from this table 320 */ 321 @Override 322 public SurveyDetails whereNotExists(TableLike<?> select) { 323 return where(DSL.notExists(select)); 324 } 325}