001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.chain; 005 006 007import com.echothree.model.data.chain.common.pk.ChainDetailPK; 008import com.echothree.model.data.chain.common.pk.ChainPK; 009import com.echothree.model.data.chain.common.pk.ChainTypePK; 010import com.echothree.model.data.sequence.common.pk.SequencePK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.chain.ChainTypes.ChainTypesPath; 013import com.echothree.model.jooq.server.tables.chain.Chains.ChainsPath; 014import com.echothree.model.jooq.server.tables.sequence.Sequences.SequencesPath; 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 ChainDetails extends TableImpl<com.echothree.model.jooq.server.records.chain.ChainDetails> { 048 049 private static final long serialVersionUID = 1L; 050 051 /** 052 * The reference instance of <code>chaindetails</code> 053 */ 054 public static final ChainDetails ChainDetails = new ChainDetails(); 055 056 /** 057 * The class holding records for this type 058 */ 059 @Override 060 public Class<com.echothree.model.jooq.server.records.chain.ChainDetails> getRecordType() { 061 return com.echothree.model.jooq.server.records.chain.ChainDetails.class; 062 } 063 064 /** 065 * The column <code>chaindetails.chndt_chaindetailid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, ChainDetailPK> CHAIN_DETAIL = createField(DSL.name("chndt_chaindetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ChainDetailPK.class, id -> new com.echothree.model.data.chain.common.pk.ChainDetailPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>chaindetails.chndt_chn_chainid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, ChainPK> CHAIN = createField(DSL.name("chndt_chn_chainid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ChainPK.class, id -> new com.echothree.model.data.chain.common.pk.ChainPK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>chaindetails.chndt_chntyp_chaintypeid</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, ChainTypePK> CHAIN_TYPE = createField(DSL.name("chndt_chntyp_chaintypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ChainTypePK.class, id -> new com.echothree.model.data.chain.common.pk.ChainTypePK(id), primaryKey -> primaryKey.getEntityId())); 078 079 /** 080 * The column <code>chaindetails.chndt_chainname</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, String> CHAIN_NAME = createField(DSL.name("chndt_chainname"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 083 084 /** 085 * The column <code>chaindetails.chndt_chaininstancesequenceid</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, SequencePK> CHAIN_INSTANCE_SEQUENCE = createField(DSL.name("chndt_chaininstancesequenceid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SequencePK.class, id -> new com.echothree.model.data.sequence.common.pk.SequencePK(id), primaryKey -> primaryKey.getEntityId())); 088 089 /** 090 * The column <code>chaindetails.chndt_isdefault</code>. 091 */ 092 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, Boolean> IS_DEFAULT = createField(DSL.name("chndt_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 093 094 /** 095 * The column <code>chaindetails.chndt_sortorder</code>. 096 */ 097 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, Integer> SORT_ORDER = createField(DSL.name("chndt_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 098 099 /** 100 * The column <code>chaindetails.chndt_fromtime</code>. 101 */ 102 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, Long> FROM_TIME = createField(DSL.name("chndt_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 103 104 /** 105 * The column <code>chaindetails.chndt_thrutime</code>. 106 */ 107 public final TableField<com.echothree.model.jooq.server.records.chain.ChainDetails, Long> THRU_TIME = createField(DSL.name("chndt_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 108 109 private ChainDetails(Name alias, Table<com.echothree.model.jooq.server.records.chain.ChainDetails> aliased) { 110 this(alias, aliased, (Field<?>[]) null, null); 111 } 112 113 private ChainDetails(Name alias, Table<com.echothree.model.jooq.server.records.chain.ChainDetails> aliased, Field<?>[] parameters, Condition where) { 114 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 115 } 116 117 /** 118 * Create an aliased <code>chaindetails</code> table reference 119 */ 120 public ChainDetails(String alias) { 121 this(DSL.name(alias), ChainDetails); 122 } 123 124 /** 125 * Create an aliased <code>chaindetails</code> table reference 126 */ 127 public ChainDetails(Name alias) { 128 this(alias, ChainDetails); 129 } 130 131 /** 132 * Create a <code>chaindetails</code> table reference 133 */ 134 public ChainDetails() { 135 this(DSL.name("chaindetails"), null); 136 } 137 138 public <O extends Record> ChainDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.chain.ChainDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.chain.ChainDetails> parentPath) { 139 super(path, childPath, parentPath, ChainDetails); 140 } 141 142 /** 143 * A subtype implementing {@link Path} for simplified path-based joins. 144 */ 145 public static class ChainDetailsPath extends ChainDetails implements Path<com.echothree.model.jooq.server.records.chain.ChainDetails> { 146 147 private static final long serialVersionUID = 1L; 148 public <O extends Record> ChainDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.chain.ChainDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.chain.ChainDetails> parentPath) { 149 super(path, childPath, parentPath); 150 } 151 private ChainDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.chain.ChainDetails> aliased) { 152 super(alias, aliased); 153 } 154 155 @Override 156 public ChainDetailsPath as(String alias) { 157 return new ChainDetailsPath(DSL.name(alias), this); 158 } 159 160 @Override 161 public ChainDetailsPath as(Name alias) { 162 return new ChainDetailsPath(alias, this); 163 } 164 165 @Override 166 public ChainDetailsPath as(Table<?> alias) { 167 return new ChainDetailsPath(alias.getQualifiedName(), this); 168 } 169 } 170 171 @Override 172 public UniqueKey<com.echothree.model.jooq.server.records.chain.ChainDetails> getPrimaryKey() { 173 return KeyRegistry.CHAIN_DETAILS_PK; 174 } 175 176 @Override 177 public List<UniqueKey<com.echothree.model.jooq.server.records.chain.ChainDetails>> getUniqueKeys() { 178 return Arrays.asList(KeyRegistry.CHAIN_DETAILS_CHAIN_AND_THRU_TIME_UK, KeyRegistry.CHAIN_DETAILS_CHAIN_TYPE_AND_CHAIN_NAME_AND_THRU_TIME_UK); 179 } 180 181 @Override 182 public List<ForeignKey<com.echothree.model.jooq.server.records.chain.ChainDetails, ?>> getReferences() { 183 return Arrays.asList(KeyRegistry.CHAIN_DETAILS_CHAIN_INSTANCE_SEQUENCE_FK, KeyRegistry.CHAIN_DETAILS_CHAIN_FK, KeyRegistry.CHAIN_DETAILS_CHAIN_TYPE_FK); 184 } 185 186 private transient SequencesPath _chndt_chaininstancesequenceid_fk; 187 188 /** 189 * Get the implicit join path to the <code>sequences</code> table. 190 */ 191 public SequencesPath chndt_chaininstancesequenceid_fk() { 192 if (_chndt_chaininstancesequenceid_fk == null) 193 _chndt_chaininstancesequenceid_fk = new SequencesPath(this, KeyRegistry.CHAIN_DETAILS_CHAIN_INSTANCE_SEQUENCE_FK, null); 194 195 return _chndt_chaininstancesequenceid_fk; 196 } 197 198 private transient ChainsPath _chndt_chn_chainid_fk; 199 200 /** 201 * Get the implicit join path to the <code>chains</code> table. 202 */ 203 public ChainsPath chndt_chn_chainid_fk() { 204 if (_chndt_chn_chainid_fk == null) 205 _chndt_chn_chainid_fk = new ChainsPath(this, KeyRegistry.CHAIN_DETAILS_CHAIN_FK, null); 206 207 return _chndt_chn_chainid_fk; 208 } 209 210 private transient ChainTypesPath _chndt_chntyp_chaintypeid_fk; 211 212 /** 213 * Get the implicit join path to the <code>chaintypes</code> table. 214 */ 215 public ChainTypesPath chndt_chntyp_chaintypeid_fk() { 216 if (_chndt_chntyp_chaintypeid_fk == null) 217 _chndt_chntyp_chaintypeid_fk = new ChainTypesPath(this, KeyRegistry.CHAIN_DETAILS_CHAIN_TYPE_FK, null); 218 219 return _chndt_chntyp_chaintypeid_fk; 220 } 221 222 @Override 223 public ChainDetails as(String alias) { 224 return new ChainDetails(DSL.name(alias), this); 225 } 226 227 @Override 228 public ChainDetails as(Name alias) { 229 return new ChainDetails(alias, this); 230 } 231 232 @Override 233 public ChainDetails as(Table<?> alias) { 234 return new ChainDetails(alias.getQualifiedName(), this); 235 } 236 237 /** 238 * Rename this table 239 */ 240 @Override 241 public ChainDetails rename(String name) { 242 return new ChainDetails(DSL.name(name), null); 243 } 244 245 /** 246 * Rename this table 247 */ 248 @Override 249 public ChainDetails rename(Name name) { 250 return new ChainDetails(name, null); 251 } 252 253 /** 254 * Rename this table 255 */ 256 @Override 257 public ChainDetails rename(Table<?> name) { 258 return new ChainDetails(name.getQualifiedName(), null); 259 } 260 261 /** 262 * Create an inline derived table from this table 263 */ 264 @Override 265 public ChainDetails where(Condition condition) { 266 return new ChainDetails(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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails 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 ChainDetails whereNotExists(TableLike<?> select) { 342 return where(DSL.notExists(select)); 343 } 344}