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