001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.item;
005
006
007import com.echothree.model.data.geo.common.pk.GeoCodePK;
008import com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeDetailPK;
009import com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodePK;
010import com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeUnitPK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.geo.GeoCodes.GeoCodesPath;
013import com.echothree.model.jooq.server.tables.item.HarmonizedTariffScheduleCodeUnits.HarmonizedTariffScheduleCodeUnitsPath;
014import com.echothree.model.jooq.server.tables.item.HarmonizedTariffScheduleCodes.HarmonizedTariffScheduleCodesPath;
015
016import java.util.Arrays;
017import java.util.Collection;
018import java.util.List;
019
020import org.jooq.Condition;
021import org.jooq.Converter;
022import org.jooq.Field;
023import org.jooq.ForeignKey;
024import org.jooq.InverseForeignKey;
025import org.jooq.Name;
026import org.jooq.Path;
027import org.jooq.PlainSQL;
028import org.jooq.QueryPart;
029import org.jooq.Record;
030import org.jooq.SQL;
031import org.jooq.Stringly;
032import org.jooq.Table;
033import org.jooq.TableField;
034import org.jooq.TableLike;
035import org.jooq.TableOptions;
036import org.jooq.UniqueKey;
037import org.jooq.impl.DSL;
038import org.jooq.impl.Internal;
039import org.jooq.impl.SQLDataType;
040import org.jooq.impl.TableImpl;
041
042
043/**
044 * This class is generated by jOOQ.
045 */
046@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
047public class HarmonizedTariffScheduleCodeDetails extends TableImpl<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of
053     * <code>harmonizedtariffschedulecodedetails</code>
054     */
055    public static final HarmonizedTariffScheduleCodeDetails HarmonizedTariffScheduleCodeDetails = new HarmonizedTariffScheduleCodeDetails();
056
057    /**
058     * The class holding records for this type
059     */
060    @Override
061    public Class<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> getRecordType() {
062        return com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails.class;
063    }
064
065    /**
066     * The column
067     * <code>harmonizedtariffschedulecodedetails.hztscdt_harmonizedtariffschedulecodedetailid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, HarmonizedTariffScheduleCodeDetailPK> HARMONIZED_TARIFF_SCHEDULE_CODE_DETAIL = createField(DSL.name("hztscdt_harmonizedtariffschedulecodedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, HarmonizedTariffScheduleCodeDetailPK.class, id -> new com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>harmonizedtariffschedulecodedetails.hztscdt_hztsc_harmonizedtariffschedulecodeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, HarmonizedTariffScheduleCodePK> HARMONIZED_TARIFF_SCHEDULE_CODE = createField(DSL.name("hztscdt_hztsc_harmonizedtariffschedulecodeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, HarmonizedTariffScheduleCodePK.class, id -> new com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodePK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column
079     * <code>harmonizedtariffschedulecodedetails.hztscdt_countrygeocodeid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, GeoCodePK> COUNTRY_GEO_CODE = createField(DSL.name("hztscdt_countrygeocodeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodePK(id), primaryKey -> primaryKey.getEntityId()));
082
083    /**
084     * The column
085     * <code>harmonizedtariffschedulecodedetails.hztscdt_harmonizedtariffschedulecodename</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, String> HARMONIZED_TARIFF_SCHEDULE_CODE_NAME = createField(DSL.name("hztscdt_harmonizedtariffschedulecodename"), SQLDataType.VARCHAR(40).nullable(false), this, "");
088
089    /**
090     * The column
091     * <code>harmonizedtariffschedulecodedetails.hztscdt_firstharmonizedtariffschedulecodeunitid</code>.
092     */
093    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, HarmonizedTariffScheduleCodeUnitPK> FIRST_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT = createField(DSL.name("hztscdt_firstharmonizedtariffschedulecodeunitid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, HarmonizedTariffScheduleCodeUnitPK.class, id -> new com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeUnitPK(id), primaryKey -> primaryKey.getEntityId()));
094
095    /**
096     * The column
097     * <code>harmonizedtariffschedulecodedetails.hztscdt_secondharmonizedtariffschedulecodeunitid</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, HarmonizedTariffScheduleCodeUnitPK> SECOND_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT = createField(DSL.name("hztscdt_secondharmonizedtariffschedulecodeunitid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, HarmonizedTariffScheduleCodeUnitPK.class, id -> new com.echothree.model.data.item.common.pk.HarmonizedTariffScheduleCodeUnitPK(id), primaryKey -> primaryKey.getEntityId()));
100
101    /**
102     * The column
103     * <code>harmonizedtariffschedulecodedetails.hztscdt_isdefault</code>.
104     */
105    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, Boolean> IS_DEFAULT = createField(DSL.name("hztscdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
106
107    /**
108     * The column
109     * <code>harmonizedtariffschedulecodedetails.hztscdt_sortorder</code>.
110     */
111    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, Integer> SORT_ORDER = createField(DSL.name("hztscdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
112
113    /**
114     * The column
115     * <code>harmonizedtariffschedulecodedetails.hztscdt_fromtime</code>.
116     */
117    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, Long> FROM_TIME = createField(DSL.name("hztscdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
118
119    /**
120     * The column
121     * <code>harmonizedtariffschedulecodedetails.hztscdt_thrutime</code>.
122     */
123    public final TableField<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, Long> THRU_TIME = createField(DSL.name("hztscdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
124
125    private HarmonizedTariffScheduleCodeDetails(Name alias, Table<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> aliased) {
126        this(alias, aliased, (Field<?>[]) null, null);
127    }
128
129    private HarmonizedTariffScheduleCodeDetails(Name alias, Table<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> aliased, Field<?>[] parameters, Condition where) {
130        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
131    }
132
133    /**
134     * Create an aliased <code>harmonizedtariffschedulecodedetails</code> table
135     * reference
136     */
137    public HarmonizedTariffScheduleCodeDetails(String alias) {
138        this(DSL.name(alias), HarmonizedTariffScheduleCodeDetails);
139    }
140
141    /**
142     * Create an aliased <code>harmonizedtariffschedulecodedetails</code> table
143     * reference
144     */
145    public HarmonizedTariffScheduleCodeDetails(Name alias) {
146        this(alias, HarmonizedTariffScheduleCodeDetails);
147    }
148
149    /**
150     * Create a <code>harmonizedtariffschedulecodedetails</code> table reference
151     */
152    public HarmonizedTariffScheduleCodeDetails() {
153        this(DSL.name("harmonizedtariffschedulecodedetails"), null);
154    }
155
156    public <O extends Record> HarmonizedTariffScheduleCodeDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> parentPath) {
157        super(path, childPath, parentPath, HarmonizedTariffScheduleCodeDetails);
158    }
159
160    /**
161     * A subtype implementing {@link Path} for simplified path-based joins.
162     */
163    public static class HarmonizedTariffScheduleCodeDetailsPath extends HarmonizedTariffScheduleCodeDetails implements Path<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> {
164
165        private static final long serialVersionUID = 1L;
166        public <O extends Record> HarmonizedTariffScheduleCodeDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> parentPath) {
167            super(path, childPath, parentPath);
168        }
169        private HarmonizedTariffScheduleCodeDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> aliased) {
170            super(alias, aliased);
171        }
172
173        @Override
174        public HarmonizedTariffScheduleCodeDetailsPath as(String alias) {
175            return new HarmonizedTariffScheduleCodeDetailsPath(DSL.name(alias), this);
176        }
177
178        @Override
179        public HarmonizedTariffScheduleCodeDetailsPath as(Name alias) {
180            return new HarmonizedTariffScheduleCodeDetailsPath(alias, this);
181        }
182
183        @Override
184        public HarmonizedTariffScheduleCodeDetailsPath as(Table<?> alias) {
185            return new HarmonizedTariffScheduleCodeDetailsPath(alias.getQualifiedName(), this);
186        }
187    }
188
189    @Override
190    public UniqueKey<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails> getPrimaryKey() {
191        return KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_PK;
192    }
193
194    @Override
195    public List<UniqueKey<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails>> getUniqueKeys() {
196        return Arrays.asList(KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_HARMONIZED_TARIFF_SCHEDULE_CODE_AND_THRU_TIME_UK, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_COUNTRY_GEO_CODE_AND_HARMONIZED_TARIFF_SCHEDULE_CODE_NAME_AND_THRU_TIME_UK);
197    }
198
199    @Override
200    public List<ForeignKey<com.echothree.model.jooq.server.records.item.HarmonizedTariffScheduleCodeDetails, ?>> getReferences() {
201        return Arrays.asList(KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_COUNTRY_GEO_CODE_FK, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_FIRST_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_FK, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_HARMONIZED_TARIFF_SCHEDULE_CODE_FK, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_SECOND_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_FK);
202    }
203
204    private transient GeoCodesPath _hztscdt_countrygeocodeid_fk;
205
206    /**
207     * Get the implicit join path to the <code>geocodes</code> table.
208     */
209    public GeoCodesPath hztscdt_countrygeocodeid_fk() {
210        if (_hztscdt_countrygeocodeid_fk == null)
211            _hztscdt_countrygeocodeid_fk = new GeoCodesPath(this, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_COUNTRY_GEO_CODE_FK, null);
212
213        return _hztscdt_countrygeocodeid_fk;
214    }
215
216    private transient HarmonizedTariffScheduleCodeUnitsPath _hztscdt_firstharmonizedtariffschedulecodeunitid_fk;
217
218    /**
219     * Get the implicit join path to the
220     * <code>harmonizedtariffschedulecodeunits</code> table, via the
221     * <code>hztscdt_firstharmonizedtariffschedulecodeunitid_fk</code> key.
222     */
223    public HarmonizedTariffScheduleCodeUnitsPath hztscdt_firstharmonizedtariffschedulecodeunitid_fk() {
224        if (_hztscdt_firstharmonizedtariffschedulecodeunitid_fk == null)
225            _hztscdt_firstharmonizedtariffschedulecodeunitid_fk = new HarmonizedTariffScheduleCodeUnitsPath(this, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_FIRST_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_FK, null);
226
227        return _hztscdt_firstharmonizedtariffschedulecodeunitid_fk;
228    }
229
230    private transient HarmonizedTariffScheduleCodesPath _hztscdt_hztsc_harmonizedtariffschedulecodeid_fk;
231
232    /**
233     * Get the implicit join path to the
234     * <code>harmonizedtariffschedulecodes</code> table.
235     */
236    public HarmonizedTariffScheduleCodesPath hztscdt_hztsc_harmonizedtariffschedulecodeid_fk() {
237        if (_hztscdt_hztsc_harmonizedtariffschedulecodeid_fk == null)
238            _hztscdt_hztsc_harmonizedtariffschedulecodeid_fk = new HarmonizedTariffScheduleCodesPath(this, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_HARMONIZED_TARIFF_SCHEDULE_CODE_FK, null);
239
240        return _hztscdt_hztsc_harmonizedtariffschedulecodeid_fk;
241    }
242
243    private transient HarmonizedTariffScheduleCodeUnitsPath _hztscdt_secondharmonizedtariffschedulecodeunitid_fk;
244
245    /**
246     * Get the implicit join path to the
247     * <code>harmonizedtariffschedulecodeunits</code> table, via the
248     * <code>hztscdt_secondharmonizedtariffschedulecodeunitid_fk</code> key.
249     */
250    public HarmonizedTariffScheduleCodeUnitsPath hztscdt_secondharmonizedtariffschedulecodeunitid_fk() {
251        if (_hztscdt_secondharmonizedtariffschedulecodeunitid_fk == null)
252            _hztscdt_secondharmonizedtariffschedulecodeunitid_fk = new HarmonizedTariffScheduleCodeUnitsPath(this, KeyRegistry.HARMONIZED_TARIFF_SCHEDULE_CODE_DETAILS_SECOND_HARMONIZED_TARIFF_SCHEDULE_CODE_UNIT_FK, null);
253
254        return _hztscdt_secondharmonizedtariffschedulecodeunitid_fk;
255    }
256
257    @Override
258    public HarmonizedTariffScheduleCodeDetails as(String alias) {
259        return new HarmonizedTariffScheduleCodeDetails(DSL.name(alias), this);
260    }
261
262    @Override
263    public HarmonizedTariffScheduleCodeDetails as(Name alias) {
264        return new HarmonizedTariffScheduleCodeDetails(alias, this);
265    }
266
267    @Override
268    public HarmonizedTariffScheduleCodeDetails as(Table<?> alias) {
269        return new HarmonizedTariffScheduleCodeDetails(alias.getQualifiedName(), this);
270    }
271
272    /**
273     * Rename this table
274     */
275    @Override
276    public HarmonizedTariffScheduleCodeDetails rename(String name) {
277        return new HarmonizedTariffScheduleCodeDetails(DSL.name(name), null);
278    }
279
280    /**
281     * Rename this table
282     */
283    @Override
284    public HarmonizedTariffScheduleCodeDetails rename(Name name) {
285        return new HarmonizedTariffScheduleCodeDetails(name, null);
286    }
287
288    /**
289     * Rename this table
290     */
291    @Override
292    public HarmonizedTariffScheduleCodeDetails rename(Table<?> name) {
293        return new HarmonizedTariffScheduleCodeDetails(name.getQualifiedName(), null);
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    public HarmonizedTariffScheduleCodeDetails where(Condition condition) {
301        return new HarmonizedTariffScheduleCodeDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
302    }
303
304    /**
305     * Create an inline derived table from this table
306     */
307    @Override
308    public HarmonizedTariffScheduleCodeDetails where(Collection<? extends Condition> conditions) {
309        return where(DSL.and(conditions));
310    }
311
312    /**
313     * Create an inline derived table from this table
314     */
315    @Override
316    public HarmonizedTariffScheduleCodeDetails where(Condition... conditions) {
317        return where(DSL.and(conditions));
318    }
319
320    /**
321     * Create an inline derived table from this table
322     */
323    @Override
324    public HarmonizedTariffScheduleCodeDetails where(Field<Boolean> condition) {
325        return where(DSL.condition(condition));
326    }
327
328    /**
329     * Create an inline derived table from this table
330     */
331    @Override
332    @PlainSQL
333    public HarmonizedTariffScheduleCodeDetails where(SQL condition) {
334        return where(DSL.condition(condition));
335    }
336
337    /**
338     * Create an inline derived table from this table
339     */
340    @Override
341    @PlainSQL
342    public HarmonizedTariffScheduleCodeDetails where(@Stringly.SQL String condition) {
343        return where(DSL.condition(condition));
344    }
345
346    /**
347     * Create an inline derived table from this table
348     */
349    @Override
350    @PlainSQL
351    public HarmonizedTariffScheduleCodeDetails where(@Stringly.SQL String condition, Object... binds) {
352        return where(DSL.condition(condition, binds));
353    }
354
355    /**
356     * Create an inline derived table from this table
357     */
358    @Override
359    @PlainSQL
360    public HarmonizedTariffScheduleCodeDetails where(@Stringly.SQL String condition, QueryPart... parts) {
361        return where(DSL.condition(condition, parts));
362    }
363
364    /**
365     * Create an inline derived table from this table
366     */
367    @Override
368    public HarmonizedTariffScheduleCodeDetails whereExists(TableLike<?> select) {
369        return where(DSL.exists(select));
370    }
371
372    /**
373     * Create an inline derived table from this table
374     */
375    @Override
376    public HarmonizedTariffScheduleCodeDetails whereNotExists(TableLike<?> select) {
377        return where(DSL.notExists(select));
378    }
379}