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