001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.printer;
005
006
007import com.echothree.model.data.printer.common.pk.PrinterDetailPK;
008import com.echothree.model.data.printer.common.pk.PrinterGroupPK;
009import com.echothree.model.data.printer.common.pk.PrinterPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.printer.PrinterGroups.PrinterGroupsPath;
012import com.echothree.model.jooq.server.tables.printer.Printers.PrintersPath;
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 PrinterDetails extends TableImpl<com.echothree.model.jooq.server.records.printer.PrinterDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>printerdetails</code>
051     */
052    public static final PrinterDetails PrinterDetails = new PrinterDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.printer.PrinterDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.printer.PrinterDetails.class;
060    }
061
062    /**
063     * The column <code>printerdetails.prndt_printerdetailid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, PrinterDetailPK> PRINTER_DETAIL = createField(DSL.name("prndt_printerdetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PrinterDetailPK.class, id -> new com.echothree.model.data.printer.common.pk.PrinterDetailPK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column <code>printerdetails.prndt_prn_printerid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, PrinterPK> PRINTER = createField(DSL.name("prndt_prn_printerid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PrinterPK.class, id -> new com.echothree.model.data.printer.common.pk.PrinterPK(id), primaryKey -> primaryKey.getEntityId()));
071
072    /**
073     * The column <code>printerdetails.prndt_printername</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, String> PRINTER_NAME = createField(DSL.name("prndt_printername"), SQLDataType.VARCHAR(40).nullable(false), this, "");
076
077    /**
078     * The column <code>printerdetails.prndt_prngrp_printergroupid</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, PrinterGroupPK> PRINTER_GROUP = createField(DSL.name("prndt_prngrp_printergroupid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PrinterGroupPK.class, id -> new com.echothree.model.data.printer.common.pk.PrinterGroupPK(id), primaryKey -> primaryKey.getEntityId()));
081
082    /**
083     * The column <code>printerdetails.prndt_priority</code>.
084     */
085    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, Integer> PRIORITY = createField(DSL.name("prndt_priority"), SQLDataType.INTEGER.nullable(false), this, "");
086
087    /**
088     * The column <code>printerdetails.prndt_fromtime</code>.
089     */
090    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, Long> FROM_TIME = createField(DSL.name("prndt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
091
092    /**
093     * The column <code>printerdetails.prndt_thrutime</code>.
094     */
095    public final TableField<com.echothree.model.jooq.server.records.printer.PrinterDetails, Long> THRU_TIME = createField(DSL.name("prndt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
096
097    private PrinterDetails(Name alias, Table<com.echothree.model.jooq.server.records.printer.PrinterDetails> aliased) {
098        this(alias, aliased, (Field<?>[]) null, null);
099    }
100
101    private PrinterDetails(Name alias, Table<com.echothree.model.jooq.server.records.printer.PrinterDetails> aliased, Field<?>[] parameters, Condition where) {
102        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
103    }
104
105    /**
106     * Create an aliased <code>printerdetails</code> table reference
107     */
108    public PrinterDetails(String alias) {
109        this(DSL.name(alias), PrinterDetails);
110    }
111
112    /**
113     * Create an aliased <code>printerdetails</code> table reference
114     */
115    public PrinterDetails(Name alias) {
116        this(alias, PrinterDetails);
117    }
118
119    /**
120     * Create a <code>printerdetails</code> table reference
121     */
122    public PrinterDetails() {
123        this(DSL.name("printerdetails"), null);
124    }
125
126    public <O extends Record> PrinterDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.printer.PrinterDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.printer.PrinterDetails> parentPath) {
127        super(path, childPath, parentPath, PrinterDetails);
128    }
129
130    /**
131     * A subtype implementing {@link Path} for simplified path-based joins.
132     */
133    public static class PrinterDetailsPath extends PrinterDetails implements Path<com.echothree.model.jooq.server.records.printer.PrinterDetails> {
134
135        private static final long serialVersionUID = 1L;
136        public <O extends Record> PrinterDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.printer.PrinterDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.printer.PrinterDetails> parentPath) {
137            super(path, childPath, parentPath);
138        }
139        private PrinterDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.printer.PrinterDetails> aliased) {
140            super(alias, aliased);
141        }
142
143        @Override
144        public PrinterDetailsPath as(String alias) {
145            return new PrinterDetailsPath(DSL.name(alias), this);
146        }
147
148        @Override
149        public PrinterDetailsPath as(Name alias) {
150            return new PrinterDetailsPath(alias, this);
151        }
152
153        @Override
154        public PrinterDetailsPath as(Table<?> alias) {
155            return new PrinterDetailsPath(alias.getQualifiedName(), this);
156        }
157    }
158
159    @Override
160    public UniqueKey<com.echothree.model.jooq.server.records.printer.PrinterDetails> getPrimaryKey() {
161        return KeyRegistry.PRINTER_DETAILS_PK;
162    }
163
164    @Override
165    public List<UniqueKey<com.echothree.model.jooq.server.records.printer.PrinterDetails>> getUniqueKeys() {
166        return Arrays.asList(KeyRegistry.PRINTER_DETAILS_PRINTER_AND_THRU_TIME_UK, KeyRegistry.PRINTER_DETAILS_PRINTER_NAME_AND_THRU_TIME_UK);
167    }
168
169    @Override
170    public List<ForeignKey<com.echothree.model.jooq.server.records.printer.PrinterDetails, ?>> getReferences() {
171        return Arrays.asList(KeyRegistry.PRINTER_DETAILS_PRINTER_FK, KeyRegistry.PRINTER_DETAILS_PRINTER_GROUP_FK);
172    }
173
174    private transient PrintersPath _prndt_prn_printerid_fk;
175
176    /**
177     * Get the implicit join path to the <code>printers</code> table.
178     */
179    public PrintersPath prndt_prn_printerid_fk() {
180        if (_prndt_prn_printerid_fk == null)
181            _prndt_prn_printerid_fk = new PrintersPath(this, KeyRegistry.PRINTER_DETAILS_PRINTER_FK, null);
182
183        return _prndt_prn_printerid_fk;
184    }
185
186    private transient PrinterGroupsPath _prndt_prngrp_printergroupid_fk;
187
188    /**
189     * Get the implicit join path to the <code>printergroups</code> table.
190     */
191    public PrinterGroupsPath prndt_prngrp_printergroupid_fk() {
192        if (_prndt_prngrp_printergroupid_fk == null)
193            _prndt_prngrp_printergroupid_fk = new PrinterGroupsPath(this, KeyRegistry.PRINTER_DETAILS_PRINTER_GROUP_FK, null);
194
195        return _prndt_prngrp_printergroupid_fk;
196    }
197
198    @Override
199    public PrinterDetails as(String alias) {
200        return new PrinterDetails(DSL.name(alias), this);
201    }
202
203    @Override
204    public PrinterDetails as(Name alias) {
205        return new PrinterDetails(alias, this);
206    }
207
208    @Override
209    public PrinterDetails as(Table<?> alias) {
210        return new PrinterDetails(alias.getQualifiedName(), this);
211    }
212
213    /**
214     * Rename this table
215     */
216    @Override
217    public PrinterDetails rename(String name) {
218        return new PrinterDetails(DSL.name(name), null);
219    }
220
221    /**
222     * Rename this table
223     */
224    @Override
225    public PrinterDetails rename(Name name) {
226        return new PrinterDetails(name, null);
227    }
228
229    /**
230     * Rename this table
231     */
232    @Override
233    public PrinterDetails rename(Table<?> name) {
234        return new PrinterDetails(name.getQualifiedName(), null);
235    }
236
237    /**
238     * Create an inline derived table from this table
239     */
240    @Override
241    public PrinterDetails where(Condition condition) {
242        return new PrinterDetails(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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails 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 PrinterDetails whereNotExists(TableLike<?> select) {
318        return where(DSL.notExists(select));
319    }
320}