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