001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.geo;
005
006
007import com.echothree.model.data.geo.common.pk.GeoCodeDetailPK;
008import com.echothree.model.data.geo.common.pk.GeoCodePK;
009import com.echothree.model.data.geo.common.pk.GeoCodeScopePK;
010import com.echothree.model.data.geo.common.pk.GeoCodeTypePK;
011import com.echothree.model.jooq.server.KeyRegistry;
012import com.echothree.model.jooq.server.tables.geo.GeoCodeScopes.GeoCodeScopesPath;
013import com.echothree.model.jooq.server.tables.geo.GeoCodeTypes.GeoCodeTypesPath;
014import com.echothree.model.jooq.server.tables.geo.GeoCodes.GeoCodesPath;
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 GeoCodeDetails extends TableImpl<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> {
048
049    private static final long serialVersionUID = 1L;
050
051    /**
052     * The reference instance of <code>geocodedetails</code>
053     */
054    public static final GeoCodeDetails GeoCodeDetails = new GeoCodeDetails();
055
056    /**
057     * The class holding records for this type
058     */
059    @Override
060    public Class<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> getRecordType() {
061        return com.echothree.model.jooq.server.records.geo.GeoCodeDetails.class;
062    }
063
064    /**
065     * The column <code>geocodedetails.geodt_geocodedetailid</code>.
066     */
067    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, GeoCodeDetailPK> GEO_CODE_DETAIL = createField(DSL.name("geodt_geocodedetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodeDetailPK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodeDetailPK(id), primaryKey -> primaryKey.getEntityId()));
068
069    /**
070     * The column <code>geocodedetails.geodt_geo_geocodeid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, GeoCodePK> GEO_CODE = createField(DSL.name("geodt_geo_geocodeid"), 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()));
073
074    /**
075     * The column <code>geocodedetails.geodt_geocodename</code>.
076     */
077    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, String> GEO_CODE_NAME = createField(DSL.name("geodt_geocodename"), SQLDataType.VARCHAR(40).nullable(false), this, "");
078
079    /**
080     * The column <code>geocodedetails.geodt_geot_geocodetypeid</code>.
081     */
082    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, GeoCodeTypePK> GEO_CODE_TYPE = createField(DSL.name("geodt_geot_geocodetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodeTypePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodeTypePK(id), primaryKey -> primaryKey.getEntityId()));
083
084    /**
085     * The column <code>geocodedetails.geodt_geos_geocodescopeid</code>.
086     */
087    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, GeoCodeScopePK> GEO_CODE_SCOPE = createField(DSL.name("geodt_geos_geocodescopeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, GeoCodeScopePK.class, id -> new com.echothree.model.data.geo.common.pk.GeoCodeScopePK(id), primaryKey -> primaryKey.getEntityId()));
088
089    /**
090     * The column <code>geocodedetails.geodt_isdefault</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, Boolean> IS_DEFAULT = createField(DSL.name("geodt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
093
094    /**
095     * The column <code>geocodedetails.geodt_sortorder</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, Integer> SORT_ORDER = createField(DSL.name("geodt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
098
099    /**
100     * The column <code>geocodedetails.geodt_fromtime</code>.
101     */
102    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, Long> FROM_TIME = createField(DSL.name("geodt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
103
104    /**
105     * The column <code>geocodedetails.geodt_thrutime</code>.
106     */
107    public final TableField<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, Long> THRU_TIME = createField(DSL.name("geodt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
108
109    private GeoCodeDetails(Name alias, Table<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> aliased) {
110        this(alias, aliased, (Field<?>[]) null, null);
111    }
112
113    private GeoCodeDetails(Name alias, Table<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> aliased, Field<?>[] parameters, Condition where) {
114        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
115    }
116
117    /**
118     * Create an aliased <code>geocodedetails</code> table reference
119     */
120    public GeoCodeDetails(String alias) {
121        this(DSL.name(alias), GeoCodeDetails);
122    }
123
124    /**
125     * Create an aliased <code>geocodedetails</code> table reference
126     */
127    public GeoCodeDetails(Name alias) {
128        this(alias, GeoCodeDetails);
129    }
130
131    /**
132     * Create a <code>geocodedetails</code> table reference
133     */
134    public GeoCodeDetails() {
135        this(DSL.name("geocodedetails"), null);
136    }
137
138    public <O extends Record> GeoCodeDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.geo.GeoCodeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.geo.GeoCodeDetails> parentPath) {
139        super(path, childPath, parentPath, GeoCodeDetails);
140    }
141
142    /**
143     * A subtype implementing {@link Path} for simplified path-based joins.
144     */
145    public static class GeoCodeDetailsPath extends GeoCodeDetails implements Path<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> {
146
147        private static final long serialVersionUID = 1L;
148        public <O extends Record> GeoCodeDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.geo.GeoCodeDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.geo.GeoCodeDetails> parentPath) {
149            super(path, childPath, parentPath);
150        }
151        private GeoCodeDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> aliased) {
152            super(alias, aliased);
153        }
154
155        @Override
156        public GeoCodeDetailsPath as(String alias) {
157            return new GeoCodeDetailsPath(DSL.name(alias), this);
158        }
159
160        @Override
161        public GeoCodeDetailsPath as(Name alias) {
162            return new GeoCodeDetailsPath(alias, this);
163        }
164
165        @Override
166        public GeoCodeDetailsPath as(Table<?> alias) {
167            return new GeoCodeDetailsPath(alias.getQualifiedName(), this);
168        }
169    }
170
171    @Override
172    public UniqueKey<com.echothree.model.jooq.server.records.geo.GeoCodeDetails> getPrimaryKey() {
173        return KeyRegistry.GEO_CODE_DETAILS_PK;
174    }
175
176    @Override
177    public List<UniqueKey<com.echothree.model.jooq.server.records.geo.GeoCodeDetails>> getUniqueKeys() {
178        return Arrays.asList(KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_AND_THRU_TIME_UK, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_NAME_AND_THRU_TIME_UK);
179    }
180
181    @Override
182    public List<ForeignKey<com.echothree.model.jooq.server.records.geo.GeoCodeDetails, ?>> getReferences() {
183        return Arrays.asList(KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_FK, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_SCOPE_FK, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_TYPE_FK);
184    }
185
186    private transient GeoCodesPath _geodt_geo_geocodeid_fk;
187
188    /**
189     * Get the implicit join path to the <code>geocodes</code> table.
190     */
191    public GeoCodesPath geodt_geo_geocodeid_fk() {
192        if (_geodt_geo_geocodeid_fk == null)
193            _geodt_geo_geocodeid_fk = new GeoCodesPath(this, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_FK, null);
194
195        return _geodt_geo_geocodeid_fk;
196    }
197
198    private transient GeoCodeScopesPath _geodt_geos_geocodescopeid_fk;
199
200    /**
201     * Get the implicit join path to the <code>geocodescopes</code> table.
202     */
203    public GeoCodeScopesPath geodt_geos_geocodescopeid_fk() {
204        if (_geodt_geos_geocodescopeid_fk == null)
205            _geodt_geos_geocodescopeid_fk = new GeoCodeScopesPath(this, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_SCOPE_FK, null);
206
207        return _geodt_geos_geocodescopeid_fk;
208    }
209
210    private transient GeoCodeTypesPath _geodt_geot_geocodetypeid_fk;
211
212    /**
213     * Get the implicit join path to the <code>geocodetypes</code> table.
214     */
215    public GeoCodeTypesPath geodt_geot_geocodetypeid_fk() {
216        if (_geodt_geot_geocodetypeid_fk == null)
217            _geodt_geot_geocodetypeid_fk = new GeoCodeTypesPath(this, KeyRegistry.GEO_CODE_DETAILS_GEO_CODE_TYPE_FK, null);
218
219        return _geodt_geot_geocodetypeid_fk;
220    }
221
222    @Override
223    public GeoCodeDetails as(String alias) {
224        return new GeoCodeDetails(DSL.name(alias), this);
225    }
226
227    @Override
228    public GeoCodeDetails as(Name alias) {
229        return new GeoCodeDetails(alias, this);
230    }
231
232    @Override
233    public GeoCodeDetails as(Table<?> alias) {
234        return new GeoCodeDetails(alias.getQualifiedName(), this);
235    }
236
237    /**
238     * Rename this table
239     */
240    @Override
241    public GeoCodeDetails rename(String name) {
242        return new GeoCodeDetails(DSL.name(name), null);
243    }
244
245    /**
246     * Rename this table
247     */
248    @Override
249    public GeoCodeDetails rename(Name name) {
250        return new GeoCodeDetails(name, null);
251    }
252
253    /**
254     * Rename this table
255     */
256    @Override
257    public GeoCodeDetails rename(Table<?> name) {
258        return new GeoCodeDetails(name.getQualifiedName(), null);
259    }
260
261    /**
262     * Create an inline derived table from this table
263     */
264    @Override
265    public GeoCodeDetails where(Condition condition) {
266        return new GeoCodeDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
267    }
268
269    /**
270     * Create an inline derived table from this table
271     */
272    @Override
273    public GeoCodeDetails where(Collection<? extends Condition> conditions) {
274        return where(DSL.and(conditions));
275    }
276
277    /**
278     * Create an inline derived table from this table
279     */
280    @Override
281    public GeoCodeDetails where(Condition... conditions) {
282        return where(DSL.and(conditions));
283    }
284
285    /**
286     * Create an inline derived table from this table
287     */
288    @Override
289    public GeoCodeDetails where(Field<Boolean> condition) {
290        return where(DSL.condition(condition));
291    }
292
293    /**
294     * Create an inline derived table from this table
295     */
296    @Override
297    @PlainSQL
298    public GeoCodeDetails where(SQL condition) {
299        return where(DSL.condition(condition));
300    }
301
302    /**
303     * Create an inline derived table from this table
304     */
305    @Override
306    @PlainSQL
307    public GeoCodeDetails where(@Stringly.SQL String condition) {
308        return where(DSL.condition(condition));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    @PlainSQL
316    public GeoCodeDetails where(@Stringly.SQL String condition, Object... binds) {
317        return where(DSL.condition(condition, binds));
318    }
319
320    /**
321     * Create an inline derived table from this table
322     */
323    @Override
324    @PlainSQL
325    public GeoCodeDetails where(@Stringly.SQL String condition, QueryPart... parts) {
326        return where(DSL.condition(condition, parts));
327    }
328
329    /**
330     * Create an inline derived table from this table
331     */
332    @Override
333    public GeoCodeDetails whereExists(TableLike<?> select) {
334        return where(DSL.exists(select));
335    }
336
337    /**
338     * Create an inline derived table from this table
339     */
340    @Override
341    public GeoCodeDetails whereNotExists(TableLike<?> select) {
342        return where(DSL.notExists(select));
343    }
344}