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