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