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.CampaignTermDetailPK;
008import com.echothree.model.data.campaign.common.pk.CampaignTermPK;
009import com.echothree.model.jooq.server.KeyRegistry;
010import com.echothree.model.jooq.server.tables.campaign.CampaignTerms.CampaignTermsPath;
011
012import java.util.Arrays;
013import java.util.Collection;
014import java.util.List;
015
016import org.jooq.Condition;
017import org.jooq.Converter;
018import org.jooq.Field;
019import org.jooq.ForeignKey;
020import org.jooq.InverseForeignKey;
021import org.jooq.Name;
022import org.jooq.Path;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.Record;
026import org.jooq.SQL;
027import org.jooq.Stringly;
028import org.jooq.Table;
029import org.jooq.TableField;
030import org.jooq.TableLike;
031import org.jooq.TableOptions;
032import org.jooq.UniqueKey;
033import org.jooq.impl.DSL;
034import org.jooq.impl.Internal;
035import org.jooq.impl.SQLDataType;
036import org.jooq.impl.TableImpl;
037
038
039/**
040 * This class is generated by jOOQ.
041 */
042@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
043public class CampaignTermDetails extends TableImpl<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> {
044
045    private static final long serialVersionUID = 1L;
046
047    /**
048     * The reference instance of <code>campaigntermdetails</code>
049     */
050    public static final CampaignTermDetails CampaignTermDetails = new CampaignTermDetails();
051
052    /**
053     * The class holding records for this type
054     */
055    @Override
056    public Class<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> getRecordType() {
057        return com.echothree.model.jooq.server.records.campaign.CampaignTermDetails.class;
058    }
059
060    /**
061     * The column
062     * <code>campaigntermdetails.cmpgntrmdt_campaigntermdetailid</code>.
063     */
064    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, CampaignTermDetailPK> CAMPAIGN_TERM_DETAIL = createField(DSL.name("cmpgntrmdt_campaigntermdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CampaignTermDetailPK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignTermDetailPK(id), primaryKey -> primaryKey.getEntityId()));
065
066    /**
067     * The column
068     * <code>campaigntermdetails.cmpgntrmdt_cmpgntrm_campaigntermid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, CampaignTermPK> CAMPAIGN_TERM = createField(DSL.name("cmpgntrmdt_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()));
071
072    /**
073     * The column <code>campaigntermdetails.cmpgntrmdt_campaigntermname</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, String> CAMPAIGN_TERM_NAME = createField(DSL.name("cmpgntrmdt_campaigntermname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
076
077    /**
078     * The column <code>campaigntermdetails.cmpgntrmdt_valuesha1hash</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, String> VALUE_SHA1_HASH = createField(DSL.name("cmpgntrmdt_valuesha1hash"), SQLDataType.VARCHAR(28).nullable(false), this, "");
081
082    /**
083     * The column <code>campaigntermdetails.cmpgntrmdt_value</code>.
084     */
085    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, String> VALUE = createField(DSL.name("cmpgntrmdt_value"), SQLDataType.CLOB.nullable(false), this, "");
086
087    /**
088     * The column <code>campaigntermdetails.cmpgntrmdt_isdefault</code>.
089     */
090    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, Boolean> IS_DEFAULT = createField(DSL.name("cmpgntrmdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
091
092    /**
093     * The column <code>campaigntermdetails.cmpgntrmdt_sortorder</code>.
094     */
095    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, Integer> SORT_ORDER = createField(DSL.name("cmpgntrmdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
096
097    /**
098     * The column <code>campaigntermdetails.cmpgntrmdt_fromtime</code>.
099     */
100    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, Long> FROM_TIME = createField(DSL.name("cmpgntrmdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
101
102    /**
103     * The column <code>campaigntermdetails.cmpgntrmdt_thrutime</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, Long> THRU_TIME = createField(DSL.name("cmpgntrmdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
106
107    private CampaignTermDetails(Name alias, Table<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> aliased) {
108        this(alias, aliased, (Field<?>[]) null, null);
109    }
110
111    private CampaignTermDetails(Name alias, Table<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> aliased, Field<?>[] parameters, Condition where) {
112        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
113    }
114
115    /**
116     * Create an aliased <code>campaigntermdetails</code> table reference
117     */
118    public CampaignTermDetails(String alias) {
119        this(DSL.name(alias), CampaignTermDetails);
120    }
121
122    /**
123     * Create an aliased <code>campaigntermdetails</code> table reference
124     */
125    public CampaignTermDetails(Name alias) {
126        this(alias, CampaignTermDetails);
127    }
128
129    /**
130     * Create a <code>campaigntermdetails</code> table reference
131     */
132    public CampaignTermDetails() {
133        this(DSL.name("campaigntermdetails"), null);
134    }
135
136    public <O extends Record> CampaignTermDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> parentPath) {
137        super(path, childPath, parentPath, CampaignTermDetails);
138    }
139
140    /**
141     * A subtype implementing {@link Path} for simplified path-based joins.
142     */
143    public static class CampaignTermDetailsPath extends CampaignTermDetails implements Path<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> {
144
145        private static final long serialVersionUID = 1L;
146        public <O extends Record> CampaignTermDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> parentPath) {
147            super(path, childPath, parentPath);
148        }
149        private CampaignTermDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> aliased) {
150            super(alias, aliased);
151        }
152
153        @Override
154        public CampaignTermDetailsPath as(String alias) {
155            return new CampaignTermDetailsPath(DSL.name(alias), this);
156        }
157
158        @Override
159        public CampaignTermDetailsPath as(Name alias) {
160            return new CampaignTermDetailsPath(alias, this);
161        }
162
163        @Override
164        public CampaignTermDetailsPath as(Table<?> alias) {
165            return new CampaignTermDetailsPath(alias.getQualifiedName(), this);
166        }
167    }
168
169    @Override
170    public UniqueKey<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails> getPrimaryKey() {
171        return KeyRegistry.CAMPAIGN_TERM_DETAILS_PK;
172    }
173
174    @Override
175    public List<UniqueKey<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails>> getUniqueKeys() {
176        return Arrays.asList(KeyRegistry.CAMPAIGN_TERM_DETAILS_CAMPAIGN_TERM_AND_THRU_TIME_UK, KeyRegistry.CAMPAIGN_TERM_DETAILS_CAMPAIGN_TERM_NAME_AND_THRU_TIME_UK, KeyRegistry.CAMPAIGN_TERM_DETAILS_VALUE_SHA1_HASH_AND_THRU_TIME_UK);
177    }
178
179    @Override
180    public List<ForeignKey<com.echothree.model.jooq.server.records.campaign.CampaignTermDetails, ?>> getReferences() {
181        return Arrays.asList(KeyRegistry.CAMPAIGN_TERM_DETAILS_CAMPAIGN_TERM_FK);
182    }
183
184    private transient CampaignTermsPath _cmpgntrmdt_cmpgntrm_campaigntermid_fk;
185
186    /**
187     * Get the implicit join path to the <code>campaignterms</code> table.
188     */
189    public CampaignTermsPath cmpgntrmdt_cmpgntrm_campaigntermid_fk() {
190        if (_cmpgntrmdt_cmpgntrm_campaigntermid_fk == null)
191            _cmpgntrmdt_cmpgntrm_campaigntermid_fk = new CampaignTermsPath(this, KeyRegistry.CAMPAIGN_TERM_DETAILS_CAMPAIGN_TERM_FK, null);
192
193        return _cmpgntrmdt_cmpgntrm_campaigntermid_fk;
194    }
195
196    @Override
197    public CampaignTermDetails as(String alias) {
198        return new CampaignTermDetails(DSL.name(alias), this);
199    }
200
201    @Override
202    public CampaignTermDetails as(Name alias) {
203        return new CampaignTermDetails(alias, this);
204    }
205
206    @Override
207    public CampaignTermDetails as(Table<?> alias) {
208        return new CampaignTermDetails(alias.getQualifiedName(), this);
209    }
210
211    /**
212     * Rename this table
213     */
214    @Override
215    public CampaignTermDetails rename(String name) {
216        return new CampaignTermDetails(DSL.name(name), null);
217    }
218
219    /**
220     * Rename this table
221     */
222    @Override
223    public CampaignTermDetails rename(Name name) {
224        return new CampaignTermDetails(name, null);
225    }
226
227    /**
228     * Rename this table
229     */
230    @Override
231    public CampaignTermDetails rename(Table<?> name) {
232        return new CampaignTermDetails(name.getQualifiedName(), null);
233    }
234
235    /**
236     * Create an inline derived table from this table
237     */
238    @Override
239    public CampaignTermDetails where(Condition condition) {
240        return new CampaignTermDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
241    }
242
243    /**
244     * Create an inline derived table from this table
245     */
246    @Override
247    public CampaignTermDetails where(Collection<? extends Condition> conditions) {
248        return where(DSL.and(conditions));
249    }
250
251    /**
252     * Create an inline derived table from this table
253     */
254    @Override
255    public CampaignTermDetails where(Condition... conditions) {
256        return where(DSL.and(conditions));
257    }
258
259    /**
260     * Create an inline derived table from this table
261     */
262    @Override
263    public CampaignTermDetails where(Field<Boolean> 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 CampaignTermDetails where(SQL condition) {
273        return where(DSL.condition(condition));
274    }
275
276    /**
277     * Create an inline derived table from this table
278     */
279    @Override
280    @PlainSQL
281    public CampaignTermDetails where(@Stringly.SQL String condition) {
282        return where(DSL.condition(condition));
283    }
284
285    /**
286     * Create an inline derived table from this table
287     */
288    @Override
289    @PlainSQL
290    public CampaignTermDetails where(@Stringly.SQL String condition, Object... binds) {
291        return where(DSL.condition(condition, binds));
292    }
293
294    /**
295     * Create an inline derived table from this table
296     */
297    @Override
298    @PlainSQL
299    public CampaignTermDetails where(@Stringly.SQL String condition, QueryPart... parts) {
300        return where(DSL.condition(condition, parts));
301    }
302
303    /**
304     * Create an inline derived table from this table
305     */
306    @Override
307    public CampaignTermDetails whereExists(TableLike<?> select) {
308        return where(DSL.exists(select));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    public CampaignTermDetails whereNotExists(TableLike<?> select) {
316        return where(DSL.notExists(select));
317    }
318}