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