001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.contact;
005
006
007import com.echothree.model.data.contact.common.pk.PostalAddressElementTypePK;
008import com.echothree.model.data.contact.common.pk.PostalAddressLineElementPK;
009import com.echothree.model.data.contact.common.pk.PostalAddressLinePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.contact.PostalAddressElementTypes.PostalAddressElementTypesPath;
012import com.echothree.model.jooq.server.tables.contact.PostalAddressLines.PostalAddressLinesPath;
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.Name;
023import org.jooq.PlainSQL;
024import org.jooq.QueryPart;
025import org.jooq.SQL;
026import org.jooq.Stringly;
027import org.jooq.Table;
028import org.jooq.TableField;
029import org.jooq.TableLike;
030import org.jooq.TableOptions;
031import org.jooq.UniqueKey;
032import org.jooq.impl.DSL;
033import org.jooq.impl.Internal;
034import org.jooq.impl.SQLDataType;
035import org.jooq.impl.TableImpl;
036
037
038/**
039 * This class is generated by jOOQ.
040 */
041@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
042public class PostalAddressLineElements extends TableImpl<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>postaladdresslineelements</code>
048     */
049    public static final PostalAddressLineElements PostalAddressLineElements = new PostalAddressLineElements();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements> getRecordType() {
056        return com.echothree.model.jooq.server.records.contact.PostalAddressLineElements.class;
057    }
058
059    /**
060     * The column
061     * <code>postaladdresslineelements.pstale_postaladdresslineelementid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, PostalAddressLineElementPK> POSTAL_ADDRESS_LINE_ELEMENT = createField(DSL.name("pstale_postaladdresslineelementid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PostalAddressLineElementPK.class, id -> new com.echothree.model.data.contact.common.pk.PostalAddressLineElementPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>postaladdresslineelements.pstale_pstal_postaladdresslineid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, PostalAddressLinePK> POSTAL_ADDRESS_LINE = createField(DSL.name("pstale_pstal_postaladdresslineid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PostalAddressLinePK.class, id -> new com.echothree.model.data.contact.common.pk.PostalAddressLinePK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>postaladdresslineelements.pstale_postaladdresslineelementsortorder</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, Integer> POSTAL_ADDRESS_LINE_ELEMENT_SORT_ORDER = createField(DSL.name("pstale_postaladdresslineelementsortorder"), SQLDataType.INTEGER.nullable(false), this, "");
076
077    /**
078     * The column
079     * <code>postaladdresslineelements.pstale_pstaetyp_postaladdresselementtypeid</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, PostalAddressElementTypePK> POSTAL_ADDRESS_ELEMENT_TYPE = createField(DSL.name("pstale_pstaetyp_postaladdresselementtypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, PostalAddressElementTypePK.class, id -> new com.echothree.model.data.contact.common.pk.PostalAddressElementTypePK(id), primaryKey -> primaryKey.getEntityId()));
082
083    /**
084     * The column <code>postaladdresslineelements.pstale_prefix</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, String> PREFIX = createField(DSL.name("pstale_prefix"), SQLDataType.VARCHAR(10), this, "");
087
088    /**
089     * The column
090     * <code>postaladdresslineelements.pstale_alwaysincludeprefix</code>.
091     */
092    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, Boolean> ALWAYS_INCLUDE_PREFIX = createField(DSL.name("pstale_alwaysincludeprefix"), SQLDataType.BIT.nullable(false), this, "");
093
094    /**
095     * The column <code>postaladdresslineelements.pstale_suffix</code>.
096     */
097    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, String> SUFFIX = createField(DSL.name("pstale_suffix"), SQLDataType.VARCHAR(10), this, "");
098
099    /**
100     * The column
101     * <code>postaladdresslineelements.pstale_alwaysincludesuffix</code>.
102     */
103    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, Boolean> ALWAYS_INCLUDE_SUFFIX = createField(DSL.name("pstale_alwaysincludesuffix"), SQLDataType.BIT.nullable(false), this, "");
104
105    /**
106     * The column <code>postaladdresslineelements.pstale_fromtime</code>.
107     */
108    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, Long> FROM_TIME = createField(DSL.name("pstale_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
109
110    /**
111     * The column <code>postaladdresslineelements.pstale_thrutime</code>.
112     */
113    public final TableField<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, Long> THRU_TIME = createField(DSL.name("pstale_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
114
115    private PostalAddressLineElements(Name alias, Table<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements> aliased) {
116        this(alias, aliased, (Field<?>[]) null, null);
117    }
118
119    private PostalAddressLineElements(Name alias, Table<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements> aliased, Field<?>[] parameters, Condition where) {
120        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
121    }
122
123    /**
124     * Create an aliased <code>postaladdresslineelements</code> table reference
125     */
126    public PostalAddressLineElements(String alias) {
127        this(DSL.name(alias), PostalAddressLineElements);
128    }
129
130    /**
131     * Create an aliased <code>postaladdresslineelements</code> table reference
132     */
133    public PostalAddressLineElements(Name alias) {
134        this(alias, PostalAddressLineElements);
135    }
136
137    /**
138     * Create a <code>postaladdresslineelements</code> table reference
139     */
140    public PostalAddressLineElements() {
141        this(DSL.name("postaladdresslineelements"), null);
142    }
143
144    @Override
145    public UniqueKey<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements> getPrimaryKey() {
146        return KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_PK;
147    }
148
149    @Override
150    public List<UniqueKey<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements>> getUniqueKeys() {
151        return Arrays.asList(KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_POSTAL_ADDRESS_LINE_AND_POSTAL_ADDRESS_LINE_ELEMENT_SORT_ORDER_AND_THRU_TIME_UK);
152    }
153
154    @Override
155    public List<ForeignKey<com.echothree.model.jooq.server.records.contact.PostalAddressLineElements, ?>> getReferences() {
156        return Arrays.asList(KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_POSTAL_ADDRESS_ELEMENT_TYPE_FK, KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_POSTAL_ADDRESS_LINE_FK);
157    }
158
159    private transient PostalAddressElementTypesPath _pstale_pstaetyp_postaladdresselementtypeid_fk;
160
161    /**
162     * Get the implicit join path to the <code>postaladdresselementtypes</code>
163     * table.
164     */
165    public PostalAddressElementTypesPath pstale_pstaetyp_postaladdresselementtypeid_fk() {
166        if (_pstale_pstaetyp_postaladdresselementtypeid_fk == null)
167            _pstale_pstaetyp_postaladdresselementtypeid_fk = new PostalAddressElementTypesPath(this, KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_POSTAL_ADDRESS_ELEMENT_TYPE_FK, null);
168
169        return _pstale_pstaetyp_postaladdresselementtypeid_fk;
170    }
171
172    private transient PostalAddressLinesPath _pstale_pstal_postaladdresslineid_fk;
173
174    /**
175     * Get the implicit join path to the <code>postaladdresslines</code> table.
176     */
177    public PostalAddressLinesPath pstale_pstal_postaladdresslineid_fk() {
178        if (_pstale_pstal_postaladdresslineid_fk == null)
179            _pstale_pstal_postaladdresslineid_fk = new PostalAddressLinesPath(this, KeyRegistry.POSTAL_ADDRESS_LINE_ELEMENTS_POSTAL_ADDRESS_LINE_FK, null);
180
181        return _pstale_pstal_postaladdresslineid_fk;
182    }
183
184    @Override
185    public PostalAddressLineElements as(String alias) {
186        return new PostalAddressLineElements(DSL.name(alias), this);
187    }
188
189    @Override
190    public PostalAddressLineElements as(Name alias) {
191        return new PostalAddressLineElements(alias, this);
192    }
193
194    @Override
195    public PostalAddressLineElements as(Table<?> alias) {
196        return new PostalAddressLineElements(alias.getQualifiedName(), this);
197    }
198
199    /**
200     * Rename this table
201     */
202    @Override
203    public PostalAddressLineElements rename(String name) {
204        return new PostalAddressLineElements(DSL.name(name), null);
205    }
206
207    /**
208     * Rename this table
209     */
210    @Override
211    public PostalAddressLineElements rename(Name name) {
212        return new PostalAddressLineElements(name, null);
213    }
214
215    /**
216     * Rename this table
217     */
218    @Override
219    public PostalAddressLineElements rename(Table<?> name) {
220        return new PostalAddressLineElements(name.getQualifiedName(), null);
221    }
222
223    /**
224     * Create an inline derived table from this table
225     */
226    @Override
227    public PostalAddressLineElements where(Condition condition) {
228        return new PostalAddressLineElements(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
229    }
230
231    /**
232     * Create an inline derived table from this table
233     */
234    @Override
235    public PostalAddressLineElements where(Collection<? extends Condition> conditions) {
236        return where(DSL.and(conditions));
237    }
238
239    /**
240     * Create an inline derived table from this table
241     */
242    @Override
243    public PostalAddressLineElements where(Condition... conditions) {
244        return where(DSL.and(conditions));
245    }
246
247    /**
248     * Create an inline derived table from this table
249     */
250    @Override
251    public PostalAddressLineElements where(Field<Boolean> condition) {
252        return where(DSL.condition(condition));
253    }
254
255    /**
256     * Create an inline derived table from this table
257     */
258    @Override
259    @PlainSQL
260    public PostalAddressLineElements where(SQL 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 PostalAddressLineElements where(@Stringly.SQL String 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 PostalAddressLineElements where(@Stringly.SQL String condition, Object... binds) {
279        return where(DSL.condition(condition, binds));
280    }
281
282    /**
283     * Create an inline derived table from this table
284     */
285    @Override
286    @PlainSQL
287    public PostalAddressLineElements where(@Stringly.SQL String condition, QueryPart... parts) {
288        return where(DSL.condition(condition, parts));
289    }
290
291    /**
292     * Create an inline derived table from this table
293     */
294    @Override
295    public PostalAddressLineElements whereExists(TableLike<?> select) {
296        return where(DSL.exists(select));
297    }
298
299    /**
300     * Create an inline derived table from this table
301     */
302    @Override
303    public PostalAddressLineElements whereNotExists(TableLike<?> select) {
304        return where(DSL.notExists(select));
305    }
306}