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