001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.selector;
005
006
007import com.echothree.model.data.core.common.pk.EntityAttributePK;
008import com.echothree.model.data.selector.common.pk.SelectorComparisonTypePK;
009import com.echothree.model.data.selector.common.pk.SelectorNodeComparisonPK;
010import com.echothree.model.data.selector.common.pk.SelectorNodePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.core.EntityAttributes.EntityAttributesPath;
013import com.echothree.model.jooq.server.tables.selector.SelectorComparisonTypes.SelectorComparisonTypesPath;
014import com.echothree.model.jooq.server.tables.selector.SelectorNodes.SelectorNodesPath;
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 SelectorNodeComparisons extends TableImpl<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons> {
045
046    private static final long serialVersionUID = 1L;
047
048    /**
049     * The reference instance of <code>selectornodecomparisons</code>
050     */
051    public static final SelectorNodeComparisons SelectorNodeComparisons = new SelectorNodeComparisons();
052
053    /**
054     * The class holding records for this type
055     */
056    @Override
057    public Class<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons> getRecordType() {
058        return com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons.class;
059    }
060
061    /**
062     * The column
063     * <code>selectornodecomparisons.slndcmp_selectornodecomparisonid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, SelectorNodeComparisonPK> SELECTOR_NODE_COMPARISON = createField(DSL.name("slndcmp_selectornodecomparisonid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SelectorNodeComparisonPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorNodeComparisonPK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column
069     * <code>selectornodecomparisons.slndcmp_slnd_selectornodeid</code>.
070     */
071    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, SelectorNodePK> SELECTOR_NODE = createField(DSL.name("slndcmp_slnd_selectornodeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SelectorNodePK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorNodePK(id), primaryKey -> primaryKey.getEntityId()));
072
073    /**
074     * The column
075     * <code>selectornodecomparisons.slndcmp_ena_entityattributeid</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, EntityAttributePK> ENTITY_ATTRIBUTE = createField(DSL.name("slndcmp_ena_entityattributeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityAttributePK.class, id -> new com.echothree.model.data.core.common.pk.EntityAttributePK(id), primaryKey -> primaryKey.getEntityId()));
078
079    /**
080     * The column
081     * <code>selectornodecomparisons.slndcmp_slct_selectorcomparisontypeid</code>.
082     */
083    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, SelectorComparisonTypePK> SELECTOR_COMPARISON_TYPE = createField(DSL.name("slndcmp_slct_selectorcomparisontypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SelectorComparisonTypePK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorComparisonTypePK(id), primaryKey -> primaryKey.getEntityId()));
084
085    /**
086     * The column <code>selectornodecomparisons.slndcmp_fromtime</code>.
087     */
088    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, Long> FROM_TIME = createField(DSL.name("slndcmp_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
089
090    /**
091     * The column <code>selectornodecomparisons.slndcmp_thrutime</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, Long> THRU_TIME = createField(DSL.name("slndcmp_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
094
095    private SelectorNodeComparisons(Name alias, Table<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons> aliased) {
096        this(alias, aliased, (Field<?>[]) null, null);
097    }
098
099    private SelectorNodeComparisons(Name alias, Table<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons> aliased, Field<?>[] parameters, Condition where) {
100        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
101    }
102
103    /**
104     * Create an aliased <code>selectornodecomparisons</code> table reference
105     */
106    public SelectorNodeComparisons(String alias) {
107        this(DSL.name(alias), SelectorNodeComparisons);
108    }
109
110    /**
111     * Create an aliased <code>selectornodecomparisons</code> table reference
112     */
113    public SelectorNodeComparisons(Name alias) {
114        this(alias, SelectorNodeComparisons);
115    }
116
117    /**
118     * Create a <code>selectornodecomparisons</code> table reference
119     */
120    public SelectorNodeComparisons() {
121        this(DSL.name("selectornodecomparisons"), null);
122    }
123
124    @Override
125    public UniqueKey<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons> getPrimaryKey() {
126        return KeyRegistry.SELECTOR_NODE_COMPARISONS_PK;
127    }
128
129    @Override
130    public List<UniqueKey<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons>> getUniqueKeys() {
131        return Arrays.asList(KeyRegistry.SELECTOR_NODE_COMPARISONS_SELECTOR_NODE_AND_THRU_TIME_UK);
132    }
133
134    @Override
135    public List<ForeignKey<com.echothree.model.jooq.server.records.selector.SelectorNodeComparisons, ?>> getReferences() {
136        return Arrays.asList(KeyRegistry.SELECTOR_NODE_COMPARISONS_ENTITY_ATTRIBUTE_FK, KeyRegistry.SELECTOR_NODE_COMPARISONS_SELECTOR_COMPARISON_TYPE_FK, KeyRegistry.SELECTOR_NODE_COMPARISONS_SELECTOR_NODE_FK);
137    }
138
139    private transient EntityAttributesPath _slndcmp_ena_entityattributeid_fk;
140
141    /**
142     * Get the implicit join path to the <code>entityattributes</code> table.
143     */
144    public EntityAttributesPath slndcmp_ena_entityattributeid_fk() {
145        if (_slndcmp_ena_entityattributeid_fk == null)
146            _slndcmp_ena_entityattributeid_fk = new EntityAttributesPath(this, KeyRegistry.SELECTOR_NODE_COMPARISONS_ENTITY_ATTRIBUTE_FK, null);
147
148        return _slndcmp_ena_entityattributeid_fk;
149    }
150
151    private transient SelectorComparisonTypesPath _slndcmp_slct_selectorcomparisontypeid_fk;
152
153    /**
154     * Get the implicit join path to the <code>selectorcomparisontypes</code>
155     * table.
156     */
157    public SelectorComparisonTypesPath slndcmp_slct_selectorcomparisontypeid_fk() {
158        if (_slndcmp_slct_selectorcomparisontypeid_fk == null)
159            _slndcmp_slct_selectorcomparisontypeid_fk = new SelectorComparisonTypesPath(this, KeyRegistry.SELECTOR_NODE_COMPARISONS_SELECTOR_COMPARISON_TYPE_FK, null);
160
161        return _slndcmp_slct_selectorcomparisontypeid_fk;
162    }
163
164    private transient SelectorNodesPath _slndcmp_slnd_selectornodeid_fk;
165
166    /**
167     * Get the implicit join path to the <code>selectornodes</code> table.
168     */
169    public SelectorNodesPath slndcmp_slnd_selectornodeid_fk() {
170        if (_slndcmp_slnd_selectornodeid_fk == null)
171            _slndcmp_slnd_selectornodeid_fk = new SelectorNodesPath(this, KeyRegistry.SELECTOR_NODE_COMPARISONS_SELECTOR_NODE_FK, null);
172
173        return _slndcmp_slnd_selectornodeid_fk;
174    }
175
176    @Override
177    public SelectorNodeComparisons as(String alias) {
178        return new SelectorNodeComparisons(DSL.name(alias), this);
179    }
180
181    @Override
182    public SelectorNodeComparisons as(Name alias) {
183        return new SelectorNodeComparisons(alias, this);
184    }
185
186    @Override
187    public SelectorNodeComparisons as(Table<?> alias) {
188        return new SelectorNodeComparisons(alias.getQualifiedName(), this);
189    }
190
191    /**
192     * Rename this table
193     */
194    @Override
195    public SelectorNodeComparisons rename(String name) {
196        return new SelectorNodeComparisons(DSL.name(name), null);
197    }
198
199    /**
200     * Rename this table
201     */
202    @Override
203    public SelectorNodeComparisons rename(Name name) {
204        return new SelectorNodeComparisons(name, null);
205    }
206
207    /**
208     * Rename this table
209     */
210    @Override
211    public SelectorNodeComparisons rename(Table<?> name) {
212        return new SelectorNodeComparisons(name.getQualifiedName(), null);
213    }
214
215    /**
216     * Create an inline derived table from this table
217     */
218    @Override
219    public SelectorNodeComparisons where(Condition condition) {
220        return new SelectorNodeComparisons(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
221    }
222
223    /**
224     * Create an inline derived table from this table
225     */
226    @Override
227    public SelectorNodeComparisons where(Collection<? extends Condition> conditions) {
228        return where(DSL.and(conditions));
229    }
230
231    /**
232     * Create an inline derived table from this table
233     */
234    @Override
235    public SelectorNodeComparisons where(Condition... conditions) {
236        return where(DSL.and(conditions));
237    }
238
239    /**
240     * Create an inline derived table from this table
241     */
242    @Override
243    public SelectorNodeComparisons where(Field<Boolean> condition) {
244        return where(DSL.condition(condition));
245    }
246
247    /**
248     * Create an inline derived table from this table
249     */
250    @Override
251    @PlainSQL
252    public SelectorNodeComparisons where(SQL condition) {
253        return where(DSL.condition(condition));
254    }
255
256    /**
257     * Create an inline derived table from this table
258     */
259    @Override
260    @PlainSQL
261    public SelectorNodeComparisons where(@Stringly.SQL String condition) {
262        return where(DSL.condition(condition));
263    }
264
265    /**
266     * Create an inline derived table from this table
267     */
268    @Override
269    @PlainSQL
270    public SelectorNodeComparisons where(@Stringly.SQL String condition, Object... binds) {
271        return where(DSL.condition(condition, binds));
272    }
273
274    /**
275     * Create an inline derived table from this table
276     */
277    @Override
278    @PlainSQL
279    public SelectorNodeComparisons where(@Stringly.SQL String condition, QueryPart... parts) {
280        return where(DSL.condition(condition, parts));
281    }
282
283    /**
284     * Create an inline derived table from this table
285     */
286    @Override
287    public SelectorNodeComparisons whereExists(TableLike<?> select) {
288        return where(DSL.exists(select));
289    }
290
291    /**
292     * Create an inline derived table from this table
293     */
294    @Override
295    public SelectorNodeComparisons whereNotExists(TableLike<?> select) {
296        return where(DSL.notExists(select));
297    }
298}