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