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