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