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