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