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.CampaignContentPK;
008import com.echothree.model.data.campaign.common.pk.CampaignMediumPK;
009import com.echothree.model.data.campaign.common.pk.CampaignPK;
010import com.echothree.model.data.campaign.common.pk.CampaignSourcePK;
011import com.echothree.model.data.campaign.common.pk.CampaignTermPK;
012import com.echothree.model.data.campaign.common.pk.UserVisitCampaignPK;
013import com.echothree.model.data.user.common.pk.UserVisitPK;
014import com.echothree.model.jooq.server.KeyRegistry;
015import com.echothree.model.jooq.server.tables.campaign.CampaignContents.CampaignContentsPath;
016import com.echothree.model.jooq.server.tables.campaign.CampaignMediums.CampaignMediumsPath;
017import com.echothree.model.jooq.server.tables.campaign.CampaignSources.CampaignSourcesPath;
018import com.echothree.model.jooq.server.tables.campaign.CampaignTerms.CampaignTermsPath;
019import com.echothree.model.jooq.server.tables.campaign.Campaigns.CampaignsPath;
020import com.echothree.model.jooq.server.tables.user.UserVisits.UserVisitsPath;
021
022import java.util.Arrays;
023import java.util.Collection;
024import java.util.List;
025
026import org.jooq.Condition;
027import org.jooq.Converter;
028import org.jooq.Field;
029import org.jooq.ForeignKey;
030import org.jooq.Name;
031import org.jooq.PlainSQL;
032import org.jooq.QueryPart;
033import org.jooq.SQL;
034import org.jooq.Stringly;
035import org.jooq.Table;
036import org.jooq.TableField;
037import org.jooq.TableLike;
038import org.jooq.TableOptions;
039import org.jooq.UniqueKey;
040import org.jooq.impl.DSL;
041import org.jooq.impl.Internal;
042import org.jooq.impl.SQLDataType;
043import org.jooq.impl.TableImpl;
044
045
046/**
047 * This class is generated by jOOQ.
048 */
049@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
050public class UserVisitCampaigns extends TableImpl<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns> {
051
052    private static final long serialVersionUID = 1L;
053
054    /**
055     * The reference instance of <code>uservisitcampaigns</code>
056     */
057    public static final UserVisitCampaigns UserVisitCampaigns = new UserVisitCampaigns();
058
059    /**
060     * The class holding records for this type
061     */
062    @Override
063    public Class<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns> getRecordType() {
064        return com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns.class;
065    }
066
067    /**
068     * The column <code>uservisitcampaigns.uviscmpgn_uservisitcampaignid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, UserVisitCampaignPK> USER_VISIT_CAMPAIGN = createField(DSL.name("uviscmpgn_uservisitcampaignid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, UserVisitCampaignPK.class, id -> new com.echothree.model.data.campaign.common.pk.UserVisitCampaignPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column <code>uservisitcampaigns.uviscmpgn_uvis_uservisitid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, UserVisitPK> USER_VISIT = createField(DSL.name("uviscmpgn_uvis_uservisitid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, UserVisitPK.class, id -> new com.echothree.model.data.user.common.pk.UserVisitPK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column
079     * <code>uservisitcampaigns.uviscmpgn_uservisitcampaignsequence</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, Integer> USER_VISIT_CAMPAIGN_SEQUENCE = createField(DSL.name("uviscmpgn_uservisitcampaignsequence"), SQLDataType.INTEGER.nullable(false), this, "");
082
083    /**
084     * The column <code>uservisitcampaigns.uviscmpgn_time</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, Long> TIME = createField(DSL.name("uviscmpgn_time"), SQLDataType.BIGINT.nullable(false), this, "");
087
088    /**
089     * The column <code>uservisitcampaigns.uviscmpgn_cmpgn_campaignid</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, CampaignPK> CAMPAIGN = createField(DSL.name("uviscmpgn_cmpgn_campaignid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CampaignPK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignPK(id), primaryKey -> primaryKey.getEntityId()));
092
093    /**
094     * The column
095     * <code>uservisitcampaigns.uviscmpgn_cmpgnsrc_campaignsourceid</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, CampaignSourcePK> CAMPAIGN_SOURCE = createField(DSL.name("uviscmpgn_cmpgnsrc_campaignsourceid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CampaignSourcePK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignSourcePK(id), primaryKey -> primaryKey.getEntityId()));
098
099    /**
100     * The column
101     * <code>uservisitcampaigns.uviscmpgn_cmpgnmdm_campaignmediumid</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, CampaignMediumPK> CAMPAIGN_MEDIUM = createField(DSL.name("uviscmpgn_cmpgnmdm_campaignmediumid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CampaignMediumPK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignMediumPK(id), primaryKey -> primaryKey.getEntityId()));
104
105    /**
106     * The column
107     * <code>uservisitcampaigns.uviscmpgn_cmpgntrm_campaigntermid</code>.
108     */
109    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, CampaignTermPK> CAMPAIGN_TERM = createField(DSL.name("uviscmpgn_cmpgntrm_campaigntermid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CampaignTermPK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignTermPK(id), primaryKey -> primaryKey.getEntityId()));
110
111    /**
112     * The column
113     * <code>uservisitcampaigns.uviscmpgn_cmpgncnt_campaigncontentid</code>.
114     */
115    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, CampaignContentPK> CAMPAIGN_CONTENT = createField(DSL.name("uviscmpgn_cmpgncnt_campaigncontentid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, CampaignContentPK.class, id -> new com.echothree.model.data.campaign.common.pk.CampaignContentPK(id), primaryKey -> primaryKey.getEntityId()));
116
117    /**
118     * The column <code>uservisitcampaigns.uviscmpgn_fromtime</code>.
119     */
120    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, Long> FROM_TIME = createField(DSL.name("uviscmpgn_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
121
122    /**
123     * The column <code>uservisitcampaigns.uviscmpgn_thrutime</code>.
124     */
125    public final TableField<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, Long> THRU_TIME = createField(DSL.name("uviscmpgn_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
126
127    private UserVisitCampaigns(Name alias, Table<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns> aliased) {
128        this(alias, aliased, (Field<?>[]) null, null);
129    }
130
131    private UserVisitCampaigns(Name alias, Table<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns> aliased, Field<?>[] parameters, Condition where) {
132        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
133    }
134
135    /**
136     * Create an aliased <code>uservisitcampaigns</code> table reference
137     */
138    public UserVisitCampaigns(String alias) {
139        this(DSL.name(alias), UserVisitCampaigns);
140    }
141
142    /**
143     * Create an aliased <code>uservisitcampaigns</code> table reference
144     */
145    public UserVisitCampaigns(Name alias) {
146        this(alias, UserVisitCampaigns);
147    }
148
149    /**
150     * Create a <code>uservisitcampaigns</code> table reference
151     */
152    public UserVisitCampaigns() {
153        this(DSL.name("uservisitcampaigns"), null);
154    }
155
156    @Override
157    public UniqueKey<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns> getPrimaryKey() {
158        return KeyRegistry.USER_VISIT_CAMPAIGNS_PK;
159    }
160
161    @Override
162    public List<UniqueKey<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns>> getUniqueKeys() {
163        return Arrays.asList(KeyRegistry.USER_VISIT_CAMPAIGNS_USER_VISIT_AND_USER_VISIT_CAMPAIGN_SEQUENCE_AND_THRU_TIME_UK);
164    }
165
166    @Override
167    public List<ForeignKey<com.echothree.model.jooq.server.records.campaign.UserVisitCampaigns, ?>> getReferences() {
168        return Arrays.asList(KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_FK, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_CONTENT_FK, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_MEDIUM_FK, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_SOURCE_FK, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_TERM_FK, KeyRegistry.USER_VISIT_CAMPAIGNS_USER_VISIT_FK);
169    }
170
171    private transient CampaignsPath _uviscmpgn_cmpgn_campaignid_fk;
172
173    /**
174     * Get the implicit join path to the <code>campaigns</code> table.
175     */
176    public CampaignsPath uviscmpgn_cmpgn_campaignid_fk() {
177        if (_uviscmpgn_cmpgn_campaignid_fk == null)
178            _uviscmpgn_cmpgn_campaignid_fk = new CampaignsPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_FK, null);
179
180        return _uviscmpgn_cmpgn_campaignid_fk;
181    }
182
183    private transient CampaignContentsPath _uviscmpgn_cmpgncnt_campaigncontentid_fk;
184
185    /**
186     * Get the implicit join path to the <code>campaigncontents</code> table.
187     */
188    public CampaignContentsPath uviscmpgn_cmpgncnt_campaigncontentid_fk() {
189        if (_uviscmpgn_cmpgncnt_campaigncontentid_fk == null)
190            _uviscmpgn_cmpgncnt_campaigncontentid_fk = new CampaignContentsPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_CONTENT_FK, null);
191
192        return _uviscmpgn_cmpgncnt_campaigncontentid_fk;
193    }
194
195    private transient CampaignMediumsPath _uviscmpgn_cmpgnmdm_campaignmediumid_fk;
196
197    /**
198     * Get the implicit join path to the <code>campaignmediums</code> table.
199     */
200    public CampaignMediumsPath uviscmpgn_cmpgnmdm_campaignmediumid_fk() {
201        if (_uviscmpgn_cmpgnmdm_campaignmediumid_fk == null)
202            _uviscmpgn_cmpgnmdm_campaignmediumid_fk = new CampaignMediumsPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_MEDIUM_FK, null);
203
204        return _uviscmpgn_cmpgnmdm_campaignmediumid_fk;
205    }
206
207    private transient CampaignSourcesPath _uviscmpgn_cmpgnsrc_campaignsourceid_fk;
208
209    /**
210     * Get the implicit join path to the <code>campaignsources</code> table.
211     */
212    public CampaignSourcesPath uviscmpgn_cmpgnsrc_campaignsourceid_fk() {
213        if (_uviscmpgn_cmpgnsrc_campaignsourceid_fk == null)
214            _uviscmpgn_cmpgnsrc_campaignsourceid_fk = new CampaignSourcesPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_SOURCE_FK, null);
215
216        return _uviscmpgn_cmpgnsrc_campaignsourceid_fk;
217    }
218
219    private transient CampaignTermsPath _uviscmpgn_cmpgntrm_campaigntermid_fk;
220
221    /**
222     * Get the implicit join path to the <code>campaignterms</code> table.
223     */
224    public CampaignTermsPath uviscmpgn_cmpgntrm_campaigntermid_fk() {
225        if (_uviscmpgn_cmpgntrm_campaigntermid_fk == null)
226            _uviscmpgn_cmpgntrm_campaigntermid_fk = new CampaignTermsPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_CAMPAIGN_TERM_FK, null);
227
228        return _uviscmpgn_cmpgntrm_campaigntermid_fk;
229    }
230
231    private transient UserVisitsPath _uviscmpgn_uvis_uservisitid_fk;
232
233    /**
234     * Get the implicit join path to the <code>uservisits</code> table.
235     */
236    public UserVisitsPath uviscmpgn_uvis_uservisitid_fk() {
237        if (_uviscmpgn_uvis_uservisitid_fk == null)
238            _uviscmpgn_uvis_uservisitid_fk = new UserVisitsPath(this, KeyRegistry.USER_VISIT_CAMPAIGNS_USER_VISIT_FK, null);
239
240        return _uviscmpgn_uvis_uservisitid_fk;
241    }
242
243    @Override
244    public UserVisitCampaigns as(String alias) {
245        return new UserVisitCampaigns(DSL.name(alias), this);
246    }
247
248    @Override
249    public UserVisitCampaigns as(Name alias) {
250        return new UserVisitCampaigns(alias, this);
251    }
252
253    @Override
254    public UserVisitCampaigns as(Table<?> alias) {
255        return new UserVisitCampaigns(alias.getQualifiedName(), this);
256    }
257
258    /**
259     * Rename this table
260     */
261    @Override
262    public UserVisitCampaigns rename(String name) {
263        return new UserVisitCampaigns(DSL.name(name), null);
264    }
265
266    /**
267     * Rename this table
268     */
269    @Override
270    public UserVisitCampaigns rename(Name name) {
271        return new UserVisitCampaigns(name, null);
272    }
273
274    /**
275     * Rename this table
276     */
277    @Override
278    public UserVisitCampaigns rename(Table<?> name) {
279        return new UserVisitCampaigns(name.getQualifiedName(), null);
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    public UserVisitCampaigns where(Condition condition) {
287        return new UserVisitCampaigns(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
288    }
289
290    /**
291     * Create an inline derived table from this table
292     */
293    @Override
294    public UserVisitCampaigns where(Collection<? extends Condition> conditions) {
295        return where(DSL.and(conditions));
296    }
297
298    /**
299     * Create an inline derived table from this table
300     */
301    @Override
302    public UserVisitCampaigns where(Condition... conditions) {
303        return where(DSL.and(conditions));
304    }
305
306    /**
307     * Create an inline derived table from this table
308     */
309    @Override
310    public UserVisitCampaigns where(Field<Boolean> condition) {
311        return where(DSL.condition(condition));
312    }
313
314    /**
315     * Create an inline derived table from this table
316     */
317    @Override
318    @PlainSQL
319    public UserVisitCampaigns where(SQL condition) {
320        return where(DSL.condition(condition));
321    }
322
323    /**
324     * Create an inline derived table from this table
325     */
326    @Override
327    @PlainSQL
328    public UserVisitCampaigns where(@Stringly.SQL String condition) {
329        return where(DSL.condition(condition));
330    }
331
332    /**
333     * Create an inline derived table from this table
334     */
335    @Override
336    @PlainSQL
337    public UserVisitCampaigns where(@Stringly.SQL String condition, Object... binds) {
338        return where(DSL.condition(condition, binds));
339    }
340
341    /**
342     * Create an inline derived table from this table
343     */
344    @Override
345    @PlainSQL
346    public UserVisitCampaigns where(@Stringly.SQL String condition, QueryPart... parts) {
347        return where(DSL.condition(condition, parts));
348    }
349
350    /**
351     * Create an inline derived table from this table
352     */
353    @Override
354    public UserVisitCampaigns whereExists(TableLike<?> select) {
355        return where(DSL.exists(select));
356    }
357
358    /**
359     * Create an inline derived table from this table
360     */
361    @Override
362    public UserVisitCampaigns whereNotExists(TableLike<?> select) {
363        return where(DSL.notExists(select));
364    }
365}