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