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.SecurityRoleDetailPK;
008import com.echothree.model.data.security.common.pk.SecurityRoleGroupPK;
009import com.echothree.model.data.security.common.pk.SecurityRolePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.security.SecurityRoleGroups.SecurityRoleGroupsPath;
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.InverseForeignKey;
023import org.jooq.Name;
024import org.jooq.Path;
025import org.jooq.PlainSQL;
026import org.jooq.QueryPart;
027import org.jooq.Record;
028import org.jooq.SQL;
029import org.jooq.Stringly;
030import org.jooq.Table;
031import org.jooq.TableField;
032import org.jooq.TableLike;
033import org.jooq.TableOptions;
034import org.jooq.UniqueKey;
035import org.jooq.impl.DSL;
036import org.jooq.impl.Internal;
037import org.jooq.impl.SQLDataType;
038import org.jooq.impl.TableImpl;
039
040
041/**
042 * This class is generated by jOOQ.
043 */
044@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
045public class SecurityRoleDetails extends TableImpl<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>securityroledetails</code>
051     */
052    public static final SecurityRoleDetails SecurityRoleDetails = new SecurityRoleDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.security.SecurityRoleDetails.class;
060    }
061
062    /**
063     * The column <code>securityroledetails.sroldt_securityroledetailid</code>.
064     */
065    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, SecurityRoleDetailPK> SECURITY_ROLE_DETAIL = createField(DSL.name("sroldt_securityroledetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SecurityRoleDetailPK.class, id -> new com.echothree.model.data.security.common.pk.SecurityRoleDetailPK(id), primaryKey -> primaryKey.getEntityId()));
066
067    /**
068     * The column <code>securityroledetails.sroldt_srol_securityroleid</code>.
069     */
070    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, SecurityRolePK> SECURITY_ROLE = createField(DSL.name("sroldt_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()));
071
072    /**
073     * The column
074     * <code>securityroledetails.sroldt_srg_securityrolegroupid</code>.
075     */
076    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, SecurityRoleGroupPK> SECURITY_ROLE_GROUP = createField(DSL.name("sroldt_srg_securityrolegroupid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SecurityRoleGroupPK.class, id -> new com.echothree.model.data.security.common.pk.SecurityRoleGroupPK(id), primaryKey -> primaryKey.getEntityId()));
077
078    /**
079     * The column <code>securityroledetails.sroldt_securityrolename</code>.
080     */
081    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, String> SECURITY_ROLE_NAME = createField(DSL.name("sroldt_securityrolename"), SQLDataType.VARCHAR(40).nullable(false), this, "");
082
083    /**
084     * The column <code>securityroledetails.sroldt_isdefault</code>.
085     */
086    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, Boolean> IS_DEFAULT = createField(DSL.name("sroldt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
087
088    /**
089     * The column <code>securityroledetails.sroldt_sortorder</code>.
090     */
091    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, Integer> SORT_ORDER = createField(DSL.name("sroldt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
092
093    /**
094     * The column <code>securityroledetails.sroldt_fromtime</code>.
095     */
096    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, Long> FROM_TIME = createField(DSL.name("sroldt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
097
098    /**
099     * The column <code>securityroledetails.sroldt_thrutime</code>.
100     */
101    public final TableField<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, Long> THRU_TIME = createField(DSL.name("sroldt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
102
103    private SecurityRoleDetails(Name alias, Table<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> aliased) {
104        this(alias, aliased, (Field<?>[]) null, null);
105    }
106
107    private SecurityRoleDetails(Name alias, Table<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> aliased, Field<?>[] parameters, Condition where) {
108        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
109    }
110
111    /**
112     * Create an aliased <code>securityroledetails</code> table reference
113     */
114    public SecurityRoleDetails(String alias) {
115        this(DSL.name(alias), SecurityRoleDetails);
116    }
117
118    /**
119     * Create an aliased <code>securityroledetails</code> table reference
120     */
121    public SecurityRoleDetails(Name alias) {
122        this(alias, SecurityRoleDetails);
123    }
124
125    /**
126     * Create a <code>securityroledetails</code> table reference
127     */
128    public SecurityRoleDetails() {
129        this(DSL.name("securityroledetails"), null);
130    }
131
132    public <O extends Record> SecurityRoleDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.security.SecurityRoleDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.security.SecurityRoleDetails> parentPath) {
133        super(path, childPath, parentPath, SecurityRoleDetails);
134    }
135
136    /**
137     * A subtype implementing {@link Path} for simplified path-based joins.
138     */
139    public static class SecurityRoleDetailsPath extends SecurityRoleDetails implements Path<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> {
140
141        private static final long serialVersionUID = 1L;
142        public <O extends Record> SecurityRoleDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.security.SecurityRoleDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.security.SecurityRoleDetails> parentPath) {
143            super(path, childPath, parentPath);
144        }
145        private SecurityRoleDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> aliased) {
146            super(alias, aliased);
147        }
148
149        @Override
150        public SecurityRoleDetailsPath as(String alias) {
151            return new SecurityRoleDetailsPath(DSL.name(alias), this);
152        }
153
154        @Override
155        public SecurityRoleDetailsPath as(Name alias) {
156            return new SecurityRoleDetailsPath(alias, this);
157        }
158
159        @Override
160        public SecurityRoleDetailsPath as(Table<?> alias) {
161            return new SecurityRoleDetailsPath(alias.getQualifiedName(), this);
162        }
163    }
164
165    @Override
166    public UniqueKey<com.echothree.model.jooq.server.records.security.SecurityRoleDetails> getPrimaryKey() {
167        return KeyRegistry.SECURITY_ROLE_DETAILS_PK;
168    }
169
170    @Override
171    public List<UniqueKey<com.echothree.model.jooq.server.records.security.SecurityRoleDetails>> getUniqueKeys() {
172        return Arrays.asList(KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_AND_THRU_TIME_UK, KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_GROUP_AND_SECURITY_ROLE_NAME_AND_THRU_TIME_UK);
173    }
174
175    @Override
176    public List<ForeignKey<com.echothree.model.jooq.server.records.security.SecurityRoleDetails, ?>> getReferences() {
177        return Arrays.asList(KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_GROUP_FK, KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_FK);
178    }
179
180    private transient SecurityRoleGroupsPath _sroldt_srg_securityrolegroupid_fk;
181
182    /**
183     * Get the implicit join path to the <code>securityrolegroups</code> table.
184     */
185    public SecurityRoleGroupsPath sroldt_srg_securityrolegroupid_fk() {
186        if (_sroldt_srg_securityrolegroupid_fk == null)
187            _sroldt_srg_securityrolegroupid_fk = new SecurityRoleGroupsPath(this, KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_GROUP_FK, null);
188
189        return _sroldt_srg_securityrolegroupid_fk;
190    }
191
192    private transient SecurityRolesPath _sroldt_srol_securityroleid_fk;
193
194    /**
195     * Get the implicit join path to the <code>securityroles</code> table.
196     */
197    public SecurityRolesPath sroldt_srol_securityroleid_fk() {
198        if (_sroldt_srol_securityroleid_fk == null)
199            _sroldt_srol_securityroleid_fk = new SecurityRolesPath(this, KeyRegistry.SECURITY_ROLE_DETAILS_SECURITY_ROLE_FK, null);
200
201        return _sroldt_srol_securityroleid_fk;
202    }
203
204    @Override
205    public SecurityRoleDetails as(String alias) {
206        return new SecurityRoleDetails(DSL.name(alias), this);
207    }
208
209    @Override
210    public SecurityRoleDetails as(Name alias) {
211        return new SecurityRoleDetails(alias, this);
212    }
213
214    @Override
215    public SecurityRoleDetails as(Table<?> alias) {
216        return new SecurityRoleDetails(alias.getQualifiedName(), this);
217    }
218
219    /**
220     * Rename this table
221     */
222    @Override
223    public SecurityRoleDetails rename(String name) {
224        return new SecurityRoleDetails(DSL.name(name), null);
225    }
226
227    /**
228     * Rename this table
229     */
230    @Override
231    public SecurityRoleDetails rename(Name name) {
232        return new SecurityRoleDetails(name, null);
233    }
234
235    /**
236     * Rename this table
237     */
238    @Override
239    public SecurityRoleDetails rename(Table<?> name) {
240        return new SecurityRoleDetails(name.getQualifiedName(), null);
241    }
242
243    /**
244     * Create an inline derived table from this table
245     */
246    @Override
247    public SecurityRoleDetails where(Condition condition) {
248        return new SecurityRoleDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
249    }
250
251    /**
252     * Create an inline derived table from this table
253     */
254    @Override
255    public SecurityRoleDetails where(Collection<? extends Condition> conditions) {
256        return where(DSL.and(conditions));
257    }
258
259    /**
260     * Create an inline derived table from this table
261     */
262    @Override
263    public SecurityRoleDetails where(Condition... conditions) {
264        return where(DSL.and(conditions));
265    }
266
267    /**
268     * Create an inline derived table from this table
269     */
270    @Override
271    public SecurityRoleDetails where(Field<Boolean> condition) {
272        return where(DSL.condition(condition));
273    }
274
275    /**
276     * Create an inline derived table from this table
277     */
278    @Override
279    @PlainSQL
280    public SecurityRoleDetails where(SQL condition) {
281        return where(DSL.condition(condition));
282    }
283
284    /**
285     * Create an inline derived table from this table
286     */
287    @Override
288    @PlainSQL
289    public SecurityRoleDetails where(@Stringly.SQL String 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 SecurityRoleDetails where(@Stringly.SQL String condition, Object... binds) {
299        return where(DSL.condition(condition, binds));
300    }
301
302    /**
303     * Create an inline derived table from this table
304     */
305    @Override
306    @PlainSQL
307    public SecurityRoleDetails where(@Stringly.SQL String condition, QueryPart... parts) {
308        return where(DSL.condition(condition, parts));
309    }
310
311    /**
312     * Create an inline derived table from this table
313     */
314    @Override
315    public SecurityRoleDetails whereExists(TableLike<?> select) {
316        return where(DSL.exists(select));
317    }
318
319    /**
320     * Create an inline derived table from this table
321     */
322    @Override
323    public SecurityRoleDetails whereNotExists(TableLike<?> select) {
324        return where(DSL.notExists(select));
325    }
326}