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