001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.search; 005 006 007import com.echothree.model.data.core.common.pk.EntityInstancePK; 008import com.echothree.model.data.search.common.pk.SearchPK; 009import com.echothree.model.data.search.common.pk.SearchResultPK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 012import com.echothree.model.jooq.server.tables.search.Searches.SearchesPath; 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.Name; 023import org.jooq.PlainSQL; 024import org.jooq.QueryPart; 025import org.jooq.SQL; 026import org.jooq.Stringly; 027import org.jooq.Table; 028import org.jooq.TableField; 029import org.jooq.TableLike; 030import org.jooq.TableOptions; 031import org.jooq.UniqueKey; 032import org.jooq.impl.DSL; 033import org.jooq.impl.Internal; 034import org.jooq.impl.SQLDataType; 035import org.jooq.impl.TableImpl; 036 037 038/** 039 * This class is generated by jOOQ. 040 */ 041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 042public class SearchResults extends TableImpl<com.echothree.model.jooq.server.records.search.SearchResults> { 043 044 private static final long serialVersionUID = 1L; 045 046 /** 047 * The reference instance of <code>searchresults</code> 048 */ 049 public static final SearchResults SearchResults = new SearchResults(); 050 051 /** 052 * The class holding records for this type 053 */ 054 @Override 055 public Class<com.echothree.model.jooq.server.records.search.SearchResults> getRecordType() { 056 return com.echothree.model.jooq.server.records.search.SearchResults.class; 057 } 058 059 /** 060 * The column <code>searchresults.srchr_searchresultid</code>. 061 */ 062 public final TableField<com.echothree.model.jooq.server.records.search.SearchResults, SearchResultPK> SEARCH_RESULT = createField(DSL.name("srchr_searchresultid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SearchResultPK.class, id -> new com.echothree.model.data.search.common.pk.SearchResultPK(id), primaryKey -> primaryKey.getEntityId())); 063 064 /** 065 * The column <code>searchresults.srchr_srch_searchid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.search.SearchResults, SearchPK> SEARCH = createField(DSL.name("srchr_srch_searchid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SearchPK.class, id -> new com.echothree.model.data.search.common.pk.SearchPK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>searchresults.srchr_eni_entityinstanceid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.search.SearchResults, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("srchr_eni_entityinstanceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId())); 073 074 /** 075 * The column <code>searchresults.srchr_sortorder</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.search.SearchResults, Integer> SORT_ORDER = createField(DSL.name("srchr_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 078 079 private SearchResults(Name alias, Table<com.echothree.model.jooq.server.records.search.SearchResults> aliased) { 080 this(alias, aliased, (Field<?>[]) null, null); 081 } 082 083 private SearchResults(Name alias, Table<com.echothree.model.jooq.server.records.search.SearchResults> aliased, Field<?>[] parameters, Condition where) { 084 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 085 } 086 087 /** 088 * Create an aliased <code>searchresults</code> table reference 089 */ 090 public SearchResults(String alias) { 091 this(DSL.name(alias), SearchResults); 092 } 093 094 /** 095 * Create an aliased <code>searchresults</code> table reference 096 */ 097 public SearchResults(Name alias) { 098 this(alias, SearchResults); 099 } 100 101 /** 102 * Create a <code>searchresults</code> table reference 103 */ 104 public SearchResults() { 105 this(DSL.name("searchresults"), null); 106 } 107 108 @Override 109 public UniqueKey<com.echothree.model.jooq.server.records.search.SearchResults> getPrimaryKey() { 110 return KeyRegistry.SEARCH_RESULTS_PK; 111 } 112 113 @Override 114 public List<UniqueKey<com.echothree.model.jooq.server.records.search.SearchResults>> getUniqueKeys() { 115 return Arrays.asList(KeyRegistry.SEARCH_RESULTS_SEARCH_AND_ENTITY_INSTANCE_UK); 116 } 117 118 @Override 119 public List<ForeignKey<com.echothree.model.jooq.server.records.search.SearchResults, ?>> getReferences() { 120 return Arrays.asList(KeyRegistry.SEARCH_RESULTS_ENTITY_INSTANCE_FK, KeyRegistry.SEARCH_RESULTS_SEARCH_FK); 121 } 122 123 private transient EntityInstancesPath _srchr_eni_entityinstanceid_fk; 124 125 /** 126 * Get the implicit join path to the <code>entityinstances</code> table. 127 */ 128 public EntityInstancesPath srchr_eni_entityinstanceid_fk() { 129 if (_srchr_eni_entityinstanceid_fk == null) 130 _srchr_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.SEARCH_RESULTS_ENTITY_INSTANCE_FK, null); 131 132 return _srchr_eni_entityinstanceid_fk; 133 } 134 135 private transient SearchesPath _srchr_srch_searchid_fk; 136 137 /** 138 * Get the implicit join path to the <code>searches</code> table. 139 */ 140 public SearchesPath srchr_srch_searchid_fk() { 141 if (_srchr_srch_searchid_fk == null) 142 _srchr_srch_searchid_fk = new SearchesPath(this, KeyRegistry.SEARCH_RESULTS_SEARCH_FK, null); 143 144 return _srchr_srch_searchid_fk; 145 } 146 147 @Override 148 public SearchResults as(String alias) { 149 return new SearchResults(DSL.name(alias), this); 150 } 151 152 @Override 153 public SearchResults as(Name alias) { 154 return new SearchResults(alias, this); 155 } 156 157 @Override 158 public SearchResults as(Table<?> alias) { 159 return new SearchResults(alias.getQualifiedName(), this); 160 } 161 162 /** 163 * Rename this table 164 */ 165 @Override 166 public SearchResults rename(String name) { 167 return new SearchResults(DSL.name(name), null); 168 } 169 170 /** 171 * Rename this table 172 */ 173 @Override 174 public SearchResults rename(Name name) { 175 return new SearchResults(name, null); 176 } 177 178 /** 179 * Rename this table 180 */ 181 @Override 182 public SearchResults rename(Table<?> name) { 183 return new SearchResults(name.getQualifiedName(), null); 184 } 185 186 /** 187 * Create an inline derived table from this table 188 */ 189 @Override 190 public SearchResults where(Condition condition) { 191 return new SearchResults(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 192 } 193 194 /** 195 * Create an inline derived table from this table 196 */ 197 @Override 198 public SearchResults where(Collection<? extends Condition> conditions) { 199 return where(DSL.and(conditions)); 200 } 201 202 /** 203 * Create an inline derived table from this table 204 */ 205 @Override 206 public SearchResults where(Condition... conditions) { 207 return where(DSL.and(conditions)); 208 } 209 210 /** 211 * Create an inline derived table from this table 212 */ 213 @Override 214 public SearchResults where(Field<Boolean> condition) { 215 return where(DSL.condition(condition)); 216 } 217 218 /** 219 * Create an inline derived table from this table 220 */ 221 @Override 222 @PlainSQL 223 public SearchResults where(SQL condition) { 224 return where(DSL.condition(condition)); 225 } 226 227 /** 228 * Create an inline derived table from this table 229 */ 230 @Override 231 @PlainSQL 232 public SearchResults where(@Stringly.SQL String condition) { 233 return where(DSL.condition(condition)); 234 } 235 236 /** 237 * Create an inline derived table from this table 238 */ 239 @Override 240 @PlainSQL 241 public SearchResults where(@Stringly.SQL String condition, Object... binds) { 242 return where(DSL.condition(condition, binds)); 243 } 244 245 /** 246 * Create an inline derived table from this table 247 */ 248 @Override 249 @PlainSQL 250 public SearchResults where(@Stringly.SQL String condition, QueryPart... parts) { 251 return where(DSL.condition(condition, parts)); 252 } 253 254 /** 255 * Create an inline derived table from this table 256 */ 257 @Override 258 public SearchResults whereExists(TableLike<?> select) { 259 return where(DSL.exists(select)); 260 } 261 262 /** 263 * Create an inline derived table from this table 264 */ 265 @Override 266 public SearchResults whereNotExists(TableLike<?> select) { 267 return where(DSL.notExists(select)); 268 } 269}