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.ContactMechanismAliasPK;
008import com.echothree.model.data.contact.common.pk.ContactMechanismAliasTypePK;
009import com.echothree.model.data.contact.common.pk.ContactMechanismPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.contact.ContactMechanismAliasTypes.ContactMechanismAliasTypesPath;
012import com.echothree.model.jooq.server.tables.contact.ContactMechanisms.ContactMechanismsPath;
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 ContactMechanismAliases extends TableImpl<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases> {
043
044    private static final long serialVersionUID = 1L;
045
046    /**
047     * The reference instance of <code>contactmechanismaliases</code>
048     */
049    public static final ContactMechanismAliases ContactMechanismAliases = new ContactMechanismAliases();
050
051    /**
052     * The class holding records for this type
053     */
054    @Override
055    public Class<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases> getRecordType() {
056        return com.echothree.model.jooq.server.records.contact.ContactMechanismAliases.class;
057    }
058
059    /**
060     * The column
061     * <code>contactmechanismaliases.cmchal_contactmechanismaliasid</code>.
062     */
063    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, ContactMechanismAliasPK> CONTACT_MECHANISM_ALIAS = createField(DSL.name("cmchal_contactmechanismaliasid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismAliasPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismAliasPK(id), primaryKey -> primaryKey.getEntityId()));
064
065    /**
066     * The column
067     * <code>contactmechanismaliases.cmchal_cmch_contactmechanismid</code>.
068     */
069    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, ContactMechanismPK> CONTACT_MECHANISM = createField(DSL.name("cmchal_cmch_contactmechanismid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismPK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismPK(id), primaryKey -> primaryKey.getEntityId()));
070
071    /**
072     * The column
073     * <code>contactmechanismaliases.cmchal_cmchaltyp_contactmechanismaliastypeid</code>.
074     */
075    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, ContactMechanismAliasTypePK> CONTACT_MECHANISM_ALIAS_TYPE = createField(DSL.name("cmchal_cmchaltyp_contactmechanismaliastypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, ContactMechanismAliasTypePK.class, id -> new com.echothree.model.data.contact.common.pk.ContactMechanismAliasTypePK(id), primaryKey -> primaryKey.getEntityId()));
076
077    /**
078     * The column <code>contactmechanismaliases.cmchal_alias</code>.
079     */
080    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, String> ALIAS = createField(DSL.name("cmchal_alias"), SQLDataType.VARCHAR(40).nullable(false), this, "");
081
082    /**
083     * The column <code>contactmechanismaliases.cmchal_fromtime</code>.
084     */
085    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, Long> FROM_TIME = createField(DSL.name("cmchal_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
086
087    /**
088     * The column <code>contactmechanismaliases.cmchal_thrutime</code>.
089     */
090    public final TableField<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, Long> THRU_TIME = createField(DSL.name("cmchal_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
091
092    private ContactMechanismAliases(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases> aliased) {
093        this(alias, aliased, (Field<?>[]) null, null);
094    }
095
096    private ContactMechanismAliases(Name alias, Table<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases> aliased, Field<?>[] parameters, Condition where) {
097        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
098    }
099
100    /**
101     * Create an aliased <code>contactmechanismaliases</code> table reference
102     */
103    public ContactMechanismAliases(String alias) {
104        this(DSL.name(alias), ContactMechanismAliases);
105    }
106
107    /**
108     * Create an aliased <code>contactmechanismaliases</code> table reference
109     */
110    public ContactMechanismAliases(Name alias) {
111        this(alias, ContactMechanismAliases);
112    }
113
114    /**
115     * Create a <code>contactmechanismaliases</code> table reference
116     */
117    public ContactMechanismAliases() {
118        this(DSL.name("contactmechanismaliases"), null);
119    }
120
121    @Override
122    public UniqueKey<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases> getPrimaryKey() {
123        return KeyRegistry.CONTACT_MECHANISM_ALIASES_PK;
124    }
125
126    @Override
127    public List<UniqueKey<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases>> getUniqueKeys() {
128        return Arrays.asList(KeyRegistry.CONTACT_MECHANISM_ALIASES_CONTACT_MECHANISM_ALIAS_TYPE_AND_ALIAS_AND_THRU_TIME_UK);
129    }
130
131    @Override
132    public List<ForeignKey<com.echothree.model.jooq.server.records.contact.ContactMechanismAliases, ?>> getReferences() {
133        return Arrays.asList(KeyRegistry.CONTACT_MECHANISM_ALIASES_CONTACT_MECHANISM_FK, KeyRegistry.CONTACT_MECHANISM_ALIASES_CONTACT_MECHANISM_ALIAS_TYPE_FK);
134    }
135
136    private transient ContactMechanismsPath _cmchal_cmch_contactmechanismid_fk;
137
138    /**
139     * Get the implicit join path to the <code>contactmechanisms</code> table.
140     */
141    public ContactMechanismsPath cmchal_cmch_contactmechanismid_fk() {
142        if (_cmchal_cmch_contactmechanismid_fk == null)
143            _cmchal_cmch_contactmechanismid_fk = new ContactMechanismsPath(this, KeyRegistry.CONTACT_MECHANISM_ALIASES_CONTACT_MECHANISM_FK, null);
144
145        return _cmchal_cmch_contactmechanismid_fk;
146    }
147
148    private transient ContactMechanismAliasTypesPath _cmchal_cmchaltyp_contactmechanismaliastypeid_fk;
149
150    /**
151     * Get the implicit join path to the <code>contactmechanismaliastypes</code>
152     * table.
153     */
154    public ContactMechanismAliasTypesPath cmchal_cmchaltyp_contactmechanismaliastypeid_fk() {
155        if (_cmchal_cmchaltyp_contactmechanismaliastypeid_fk == null)
156            _cmchal_cmchaltyp_contactmechanismaliastypeid_fk = new ContactMechanismAliasTypesPath(this, KeyRegistry.CONTACT_MECHANISM_ALIASES_CONTACT_MECHANISM_ALIAS_TYPE_FK, null);
157
158        return _cmchal_cmchaltyp_contactmechanismaliastypeid_fk;
159    }
160
161    @Override
162    public ContactMechanismAliases as(String alias) {
163        return new ContactMechanismAliases(DSL.name(alias), this);
164    }
165
166    @Override
167    public ContactMechanismAliases as(Name alias) {
168        return new ContactMechanismAliases(alias, this);
169    }
170
171    @Override
172    public ContactMechanismAliases as(Table<?> alias) {
173        return new ContactMechanismAliases(alias.getQualifiedName(), this);
174    }
175
176    /**
177     * Rename this table
178     */
179    @Override
180    public ContactMechanismAliases rename(String name) {
181        return new ContactMechanismAliases(DSL.name(name), null);
182    }
183
184    /**
185     * Rename this table
186     */
187    @Override
188    public ContactMechanismAliases rename(Name name) {
189        return new ContactMechanismAliases(name, null);
190    }
191
192    /**
193     * Rename this table
194     */
195    @Override
196    public ContactMechanismAliases rename(Table<?> name) {
197        return new ContactMechanismAliases(name.getQualifiedName(), null);
198    }
199
200    /**
201     * Create an inline derived table from this table
202     */
203    @Override
204    public ContactMechanismAliases where(Condition condition) {
205        return new ContactMechanismAliases(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
206    }
207
208    /**
209     * Create an inline derived table from this table
210     */
211    @Override
212    public ContactMechanismAliases where(Collection<? extends Condition> conditions) {
213        return where(DSL.and(conditions));
214    }
215
216    /**
217     * Create an inline derived table from this table
218     */
219    @Override
220    public ContactMechanismAliases where(Condition... conditions) {
221        return where(DSL.and(conditions));
222    }
223
224    /**
225     * Create an inline derived table from this table
226     */
227    @Override
228    public ContactMechanismAliases where(Field<Boolean> condition) {
229        return where(DSL.condition(condition));
230    }
231
232    /**
233     * Create an inline derived table from this table
234     */
235    @Override
236    @PlainSQL
237    public ContactMechanismAliases where(SQL condition) {
238        return where(DSL.condition(condition));
239    }
240
241    /**
242     * Create an inline derived table from this table
243     */
244    @Override
245    @PlainSQL
246    public ContactMechanismAliases where(@Stringly.SQL String condition) {
247        return where(DSL.condition(condition));
248    }
249
250    /**
251     * Create an inline derived table from this table
252     */
253    @Override
254    @PlainSQL
255    public ContactMechanismAliases where(@Stringly.SQL String condition, Object... binds) {
256        return where(DSL.condition(condition, binds));
257    }
258
259    /**
260     * Create an inline derived table from this table
261     */
262    @Override
263    @PlainSQL
264    public ContactMechanismAliases where(@Stringly.SQL String condition, QueryPart... parts) {
265        return where(DSL.condition(condition, parts));
266    }
267
268    /**
269     * Create an inline derived table from this table
270     */
271    @Override
272    public ContactMechanismAliases whereExists(TableLike<?> select) {
273        return where(DSL.exists(select));
274    }
275
276    /**
277     * Create an inline derived table from this table
278     */
279    @Override
280    public ContactMechanismAliases whereNotExists(TableLike<?> select) {
281        return where(DSL.notExists(select));
282    }
283}