001/*
002 * This file is generated by jOOQ.
003 */
004package com.echothree.model.jooq.server.tables.cancellationpolicy;
005
006
007import com.echothree.model.data.cancellationpolicy.common.pk.CancellationKindPK;
008import com.echothree.model.data.cancellationpolicy.common.pk.CancellationReasonDetailPK;
009import com.echothree.model.data.cancellationpolicy.common.pk.CancellationReasonPK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationKinds.CancellationKindsPath;
012import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationReasons.CancellationReasonsPath;
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 CancellationReasonDetails extends TableImpl<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>cancellationreasondetails</code>
051     */
052    public static final CancellationReasonDetails CancellationReasonDetails = new CancellationReasonDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>cancellationreasondetails.cnclrsndt_cancellationreasondetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, CancellationReasonDetailPK> CANCELLATION_REASON_DETAIL = createField(DSL.name("cnclrsndt_cancellationreasondetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CancellationReasonDetailPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationReasonDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>cancellationreasondetails.cnclrsndt_cnclrsn_cancellationreasonid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, CancellationReasonPK> CANCELLATION_REASON = createField(DSL.name("cnclrsndt_cnclrsn_cancellationreasonid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CancellationReasonPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationReasonPK(id), primaryKey -> primaryKey.getEntityId()));
073
074    /**
075     * The column
076     * <code>cancellationreasondetails.cnclrsndt_cnclk_cancellationkindid</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, CancellationKindPK> CANCELLATION_KIND = createField(DSL.name("cnclrsndt_cnclk_cancellationkindid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CancellationKindPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationKindPK(id), primaryKey -> primaryKey.getEntityId()));
079
080    /**
081     * The column
082     * <code>cancellationreasondetails.cnclrsndt_cancellationreasonname</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, String> CANCELLATION_REASON_NAME = createField(DSL.name("cnclrsndt_cancellationreasonname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
085
086    /**
087     * The column <code>cancellationreasondetails.cnclrsndt_isdefault</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, Boolean> IS_DEFAULT = createField(DSL.name("cnclrsndt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
090
091    /**
092     * The column <code>cancellationreasondetails.cnclrsndt_sortorder</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, Integer> SORT_ORDER = createField(DSL.name("cnclrsndt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
095
096    /**
097     * The column <code>cancellationreasondetails.cnclrsndt_fromtime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, Long> FROM_TIME = createField(DSL.name("cnclrsndt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    /**
102     * The column <code>cancellationreasondetails.cnclrsndt_thrutime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, Long> THRU_TIME = createField(DSL.name("cnclrsndt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    private CancellationReasonDetails(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> aliased) {
107        this(alias, aliased, (Field<?>[]) null, null);
108    }
109
110    private CancellationReasonDetails(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> aliased, Field<?>[] parameters, Condition where) {
111        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
112    }
113
114    /**
115     * Create an aliased <code>cancellationreasondetails</code> table reference
116     */
117    public CancellationReasonDetails(String alias) {
118        this(DSL.name(alias), CancellationReasonDetails);
119    }
120
121    /**
122     * Create an aliased <code>cancellationreasondetails</code> table reference
123     */
124    public CancellationReasonDetails(Name alias) {
125        this(alias, CancellationReasonDetails);
126    }
127
128    /**
129     * Create a <code>cancellationreasondetails</code> table reference
130     */
131    public CancellationReasonDetails() {
132        this(DSL.name("cancellationreasondetails"), null);
133    }
134
135    public <O extends Record> CancellationReasonDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> parentPath) {
136        super(path, childPath, parentPath, CancellationReasonDetails);
137    }
138
139    /**
140     * A subtype implementing {@link Path} for simplified path-based joins.
141     */
142    public static class CancellationReasonDetailsPath extends CancellationReasonDetails implements Path<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> {
143
144        private static final long serialVersionUID = 1L;
145        public <O extends Record> CancellationReasonDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> parentPath) {
146            super(path, childPath, parentPath);
147        }
148        private CancellationReasonDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> aliased) {
149            super(alias, aliased);
150        }
151
152        @Override
153        public CancellationReasonDetailsPath as(String alias) {
154            return new CancellationReasonDetailsPath(DSL.name(alias), this);
155        }
156
157        @Override
158        public CancellationReasonDetailsPath as(Name alias) {
159            return new CancellationReasonDetailsPath(alias, this);
160        }
161
162        @Override
163        public CancellationReasonDetailsPath as(Table<?> alias) {
164            return new CancellationReasonDetailsPath(alias.getQualifiedName(), this);
165        }
166    }
167
168    @Override
169    public UniqueKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails> getPrimaryKey() {
170        return KeyRegistry.CANCELLATION_REASON_DETAILS_PK;
171    }
172
173    @Override
174    public List<UniqueKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails>> getUniqueKeys() {
175        return Arrays.asList(KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_REASON_AND_THRU_TIME_UK, KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_KIND_AND_CANCELLATION_REASON_NAME_AND_THRU_TIME_UK);
176    }
177
178    @Override
179    public List<ForeignKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationReasonDetails, ?>> getReferences() {
180        return Arrays.asList(KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_KIND_FK, KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_REASON_FK);
181    }
182
183    private transient CancellationKindsPath _cnclrsndt_cnclk_cancellationkindid_fk;
184
185    /**
186     * Get the implicit join path to the <code>cancellationkinds</code> table.
187     */
188    public CancellationKindsPath cnclrsndt_cnclk_cancellationkindid_fk() {
189        if (_cnclrsndt_cnclk_cancellationkindid_fk == null)
190            _cnclrsndt_cnclk_cancellationkindid_fk = new CancellationKindsPath(this, KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_KIND_FK, null);
191
192        return _cnclrsndt_cnclk_cancellationkindid_fk;
193    }
194
195    private transient CancellationReasonsPath _cnclrsndt_cnclrsn_cancellationreasonid_fk;
196
197    /**
198     * Get the implicit join path to the <code>cancellationreasons</code> table.
199     */
200    public CancellationReasonsPath cnclrsndt_cnclrsn_cancellationreasonid_fk() {
201        if (_cnclrsndt_cnclrsn_cancellationreasonid_fk == null)
202            _cnclrsndt_cnclrsn_cancellationreasonid_fk = new CancellationReasonsPath(this, KeyRegistry.CANCELLATION_REASON_DETAILS_CANCELLATION_REASON_FK, null);
203
204        return _cnclrsndt_cnclrsn_cancellationreasonid_fk;
205    }
206
207    @Override
208    public CancellationReasonDetails as(String alias) {
209        return new CancellationReasonDetails(DSL.name(alias), this);
210    }
211
212    @Override
213    public CancellationReasonDetails as(Name alias) {
214        return new CancellationReasonDetails(alias, this);
215    }
216
217    @Override
218    public CancellationReasonDetails as(Table<?> alias) {
219        return new CancellationReasonDetails(alias.getQualifiedName(), this);
220    }
221
222    /**
223     * Rename this table
224     */
225    @Override
226    public CancellationReasonDetails rename(String name) {
227        return new CancellationReasonDetails(DSL.name(name), null);
228    }
229
230    /**
231     * Rename this table
232     */
233    @Override
234    public CancellationReasonDetails rename(Name name) {
235        return new CancellationReasonDetails(name, null);
236    }
237
238    /**
239     * Rename this table
240     */
241    @Override
242    public CancellationReasonDetails rename(Table<?> name) {
243        return new CancellationReasonDetails(name.getQualifiedName(), null);
244    }
245
246    /**
247     * Create an inline derived table from this table
248     */
249    @Override
250    public CancellationReasonDetails where(Condition condition) {
251        return new CancellationReasonDetails(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition));
252    }
253
254    /**
255     * Create an inline derived table from this table
256     */
257    @Override
258    public CancellationReasonDetails where(Collection<? extends Condition> conditions) {
259        return where(DSL.and(conditions));
260    }
261
262    /**
263     * Create an inline derived table from this table
264     */
265    @Override
266    public CancellationReasonDetails where(Condition... conditions) {
267        return where(DSL.and(conditions));
268    }
269
270    /**
271     * Create an inline derived table from this table
272     */
273    @Override
274    public CancellationReasonDetails where(Field<Boolean> condition) {
275        return where(DSL.condition(condition));
276    }
277
278    /**
279     * Create an inline derived table from this table
280     */
281    @Override
282    @PlainSQL
283    public CancellationReasonDetails where(SQL condition) {
284        return where(DSL.condition(condition));
285    }
286
287    /**
288     * Create an inline derived table from this table
289     */
290    @Override
291    @PlainSQL
292    public CancellationReasonDetails where(@Stringly.SQL String condition) {
293        return where(DSL.condition(condition));
294    }
295
296    /**
297     * Create an inline derived table from this table
298     */
299    @Override
300    @PlainSQL
301    public CancellationReasonDetails where(@Stringly.SQL String condition, Object... binds) {
302        return where(DSL.condition(condition, binds));
303    }
304
305    /**
306     * Create an inline derived table from this table
307     */
308    @Override
309    @PlainSQL
310    public CancellationReasonDetails where(@Stringly.SQL String condition, QueryPart... parts) {
311        return where(DSL.condition(condition, parts));
312    }
313
314    /**
315     * Create an inline derived table from this table
316     */
317    @Override
318    public CancellationReasonDetails whereExists(TableLike<?> select) {
319        return where(DSL.exists(select));
320    }
321
322    /**
323     * Create an inline derived table from this table
324     */
325    @Override
326    public CancellationReasonDetails whereNotExists(TableLike<?> select) {
327        return where(DSL.notExists(select));
328    }
329}