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