001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.search;
005
006
007import com.echothree.model.data.party.common.pk.PartyPK;
008import com.echothree.model.data.search.common.pk.CachedSearchPK;
009import com.echothree.model.data.search.common.pk.SearchPK;
010import com.echothree.model.data.search.common.pk.SearchTypePK;
011import com.echothree.model.data.search.common.pk.SearchUseTypePK;
012import com.echothree.model.jooq.server.KeyRegistry;
013import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath;
014import com.echothree.model.jooq.server.tables.search.CachedSearches.CachedSearchesPath;
015import com.echothree.model.jooq.server.tables.search.SearchTypes.SearchTypesPath;
016import com.echothree.model.jooq.server.tables.search.SearchUseTypes.SearchUseTypesPath;
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 Searches extends TableImpl<com.echothree.model.jooq.server.records.search.Searches> {
050
051    private static final long serialVersionUID = 1L;
052
053    /**
054     * The reference instance of <code>searches</code>
055     */
056    public static final Searches Searches = new Searches();
057
058    /**
059     * The class holding records for this type
060     */
061    @Override
062    public Class<com.echothree.model.jooq.server.records.search.Searches> getRecordType() {
063        return com.echothree.model.jooq.server.records.search.Searches.class;
064    }
065
066    /**
067     * The column <code>searches.srch_searchid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.search.Searches, SearchPK> SEARCH = createField(DSL.name("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()));
070
071    /**
072     * The column <code>searches.srch_par_partyid</code>.
073     */
074    public final TableField<com.echothree.model.jooq.server.records.search.Searches, PartyPK> PARTY = createField(DSL.name("srch_par_partyid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, PartyPK.class, id -> new com.echothree.model.data.party.common.pk.PartyPK(id), primaryKey -> primaryKey.getEntityId()));
075
076    /**
077     * The column <code>searches.srch_partyverified</code>.
078     */
079    public final TableField<com.echothree.model.jooq.server.records.search.Searches, Boolean> PARTY_VERIFIED = createField(DSL.name("srch_partyverified"), SQLDataType.BIT, this, "");
080
081    /**
082     * The column <code>searches.srch_srchtyp_searchtypeid</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.search.Searches, SearchTypePK> SEARCH_TYPE = createField(DSL.name("srch_srchtyp_searchtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SearchTypePK.class, id -> new com.echothree.model.data.search.common.pk.SearchTypePK(id), primaryKey -> primaryKey.getEntityId()));
085
086    /**
087     * The column <code>searches.srch_executedtime</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.search.Searches, Long> EXECUTED_TIME = createField(DSL.name("srch_executedtime"), SQLDataType.BIGINT.nullable(false), this, "");
090
091    /**
092     * The column <code>searches.srch_srchutyp_searchusetypeid</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.search.Searches, SearchUseTypePK> SEARCH_USE_TYPE = createField(DSL.name("srch_srchutyp_searchusetypeid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SearchUseTypePK.class, id -> new com.echothree.model.data.search.common.pk.SearchUseTypePK(id), primaryKey -> primaryKey.getEntityId()));
095
096    /**
097     * The column <code>searches.srch_csrch_cachedsearchid</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.search.Searches, CachedSearchPK> CACHED_SEARCH = createField(DSL.name("srch_csrch_cachedsearchid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CachedSearchPK.class, id -> new com.echothree.model.data.search.common.pk.CachedSearchPK(id), primaryKey -> primaryKey.getEntityId()));
100
101    /**
102     * The column <code>searches.srch_fromtime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.search.Searches, Long> FROM_TIME = createField(DSL.name("srch_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    /**
107     * The column <code>searches.srch_thrutime</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.search.Searches, Long> THRU_TIME = createField(DSL.name("srch_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
110
111    private Searches(Name alias, Table<com.echothree.model.jooq.server.records.search.Searches> aliased) {
112        this(alias, aliased, (Field<?>[]) null, null);
113    }
114
115    private Searches(Name alias, Table<com.echothree.model.jooq.server.records.search.Searches> aliased, Field<?>[] parameters, Condition where) {
116        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
117    }
118
119    /**
120     * Create an aliased <code>searches</code> table reference
121     */
122    public Searches(String alias) {
123        this(DSL.name(alias), Searches);
124    }
125
126    /**
127     * Create an aliased <code>searches</code> table reference
128     */
129    public Searches(Name alias) {
130        this(alias, Searches);
131    }
132
133    /**
134     * Create a <code>searches</code> table reference
135     */
136    public Searches() {
137        this(DSL.name("searches"), null);
138    }
139
140    public <O extends Record> Searches(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.search.Searches> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.search.Searches> parentPath) {
141        super(path, childPath, parentPath, Searches);
142    }
143
144    /**
145     * A subtype implementing {@link Path} for simplified path-based joins.
146     */
147    public static class SearchesPath extends Searches implements Path<com.echothree.model.jooq.server.records.search.Searches> {
148
149        private static final long serialVersionUID = 1L;
150        public <O extends Record> SearchesPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.search.Searches> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.search.Searches> parentPath) {
151            super(path, childPath, parentPath);
152        }
153        private SearchesPath(Name alias, Table<com.echothree.model.jooq.server.records.search.Searches> aliased) {
154            super(alias, aliased);
155        }
156
157        @Override
158        public SearchesPath as(String alias) {
159            return new SearchesPath(DSL.name(alias), this);
160        }
161
162        @Override
163        public SearchesPath as(Name alias) {
164            return new SearchesPath(alias, this);
165        }
166
167        @Override
168        public SearchesPath as(Table<?> alias) {
169            return new SearchesPath(alias.getQualifiedName(), this);
170        }
171    }
172
173    @Override
174    public UniqueKey<com.echothree.model.jooq.server.records.search.Searches> getPrimaryKey() {
175        return KeyRegistry.SEARCHES_PK;
176    }
177
178    @Override
179    public List<ForeignKey<com.echothree.model.jooq.server.records.search.Searches, ?>> getReferences() {
180        return Arrays.asList(KeyRegistry.SEARCHES_CACHED_SEARCH_FK, KeyRegistry.SEARCHES_PARTY_FK, KeyRegistry.SEARCHES_SEARCH_TYPE_FK, KeyRegistry.SEARCHES_SEARCH_USE_TYPE_FK);
181    }
182
183    private transient CachedSearchesPath _srch_csrch_cachedsearchid_fk;
184
185    /**
186     * Get the implicit join path to the <code>cachedsearches</code> table.
187     */
188    public CachedSearchesPath srch_csrch_cachedsearchid_fk() {
189        if (_srch_csrch_cachedsearchid_fk == null)
190            _srch_csrch_cachedsearchid_fk = new CachedSearchesPath(this, KeyRegistry.SEARCHES_CACHED_SEARCH_FK, null);
191
192        return _srch_csrch_cachedsearchid_fk;
193    }
194
195    private transient PartiesPath _srch_par_partyid_fk;
196
197    /**
198     * Get the implicit join path to the <code>parties</code> table.
199     */
200    public PartiesPath srch_par_partyid_fk() {
201        if (_srch_par_partyid_fk == null)
202            _srch_par_partyid_fk = new PartiesPath(this, KeyRegistry.SEARCHES_PARTY_FK, null);
203
204        return _srch_par_partyid_fk;
205    }
206
207    private transient SearchTypesPath _srch_srchtyp_searchtypeid_fk;
208
209    /**
210     * Get the implicit join path to the <code>searchtypes</code> table.
211     */
212    public SearchTypesPath srch_srchtyp_searchtypeid_fk() {
213        if (_srch_srchtyp_searchtypeid_fk == null)
214            _srch_srchtyp_searchtypeid_fk = new SearchTypesPath(this, KeyRegistry.SEARCHES_SEARCH_TYPE_FK, null);
215
216        return _srch_srchtyp_searchtypeid_fk;
217    }
218
219    private transient SearchUseTypesPath _srch_srchutyp_searchusetypeid_fk;
220
221    /**
222     * Get the implicit join path to the <code>searchusetypes</code> table.
223     */
224    public SearchUseTypesPath srch_srchutyp_searchusetypeid_fk() {
225        if (_srch_srchutyp_searchusetypeid_fk == null)
226            _srch_srchutyp_searchusetypeid_fk = new SearchUseTypesPath(this, KeyRegistry.SEARCHES_SEARCH_USE_TYPE_FK, null);
227
228        return _srch_srchutyp_searchusetypeid_fk;
229    }
230
231    @Override
232    public Searches as(String alias) {
233        return new Searches(DSL.name(alias), this);
234    }
235
236    @Override
237    public Searches as(Name alias) {
238        return new Searches(alias, this);
239    }
240
241    @Override
242    public Searches as(Table<?> alias) {
243        return new Searches(alias.getQualifiedName(), this);
244    }
245
246    /**
247     * Rename this table
248     */
249    @Override
250    public Searches rename(String name) {
251        return new Searches(DSL.name(name), null);
252    }
253
254    /**
255     * Rename this table
256     */
257    @Override
258    public Searches rename(Name name) {
259        return new Searches(name, null);
260    }
261
262    /**
263     * Rename this table
264     */
265    @Override
266    public Searches rename(Table<?> name) {
267        return new Searches(name.getQualifiedName(), null);
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    public Searches where(Condition condition) {
275        return new Searches(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
276    }
277
278    /**
279     * Create an inline derived table from this table
280     */
281    @Override
282    public Searches where(Collection<? extends Condition> conditions) {
283        return where(DSL.and(conditions));
284    }
285
286    /**
287     * Create an inline derived table from this table
288     */
289    @Override
290    public Searches where(Condition... conditions) {
291        return where(DSL.and(conditions));
292    }
293
294    /**
295     * Create an inline derived table from this table
296     */
297    @Override
298    public Searches where(Field<Boolean> 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 Searches where(SQL 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 Searches where(@Stringly.SQL String condition) {
317        return where(DSL.condition(condition));
318    }
319
320    /**
321     * Create an inline derived table from this table
322     */
323    @Override
324    @PlainSQL
325    public Searches where(@Stringly.SQL String condition, Object... binds) {
326        return where(DSL.condition(condition, binds));
327    }
328
329    /**
330     * Create an inline derived table from this table
331     */
332    @Override
333    @PlainSQL
334    public Searches where(@Stringly.SQL String condition, QueryPart... parts) {
335        return where(DSL.condition(condition, parts));
336    }
337
338    /**
339     * Create an inline derived table from this table
340     */
341    @Override
342    public Searches whereExists(TableLike<?> select) {
343        return where(DSL.exists(select));
344    }
345
346    /**
347     * Create an inline derived table from this table
348     */
349    @Override
350    public Searches whereNotExists(TableLike<?> select) {
351        return where(DSL.notExists(select));
352    }
353}