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.CancellationKindDetailPK;
008import com.echothree.model.data.cancellationpolicy.common.pk.CancellationKindPK;
009import com.echothree.model.data.sequence.common.pk.SequenceTypePK;
010import com.echothree.model.jooq.server.KeyRegistry;
011import com.echothree.model.jooq.server.tables.cancellationpolicy.CancellationKinds.CancellationKindsPath;
012import com.echothree.model.jooq.server.tables.sequence.SequenceTypes.SequenceTypesPath;
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 CancellationKindDetails extends TableImpl<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> {
046
047    private static final long serialVersionUID = 1L;
048
049    /**
050     * The reference instance of <code>cancellationkinddetails</code>
051     */
052    public static final CancellationKindDetails CancellationKindDetails = new CancellationKindDetails();
053
054    /**
055     * The class holding records for this type
056     */
057    @Override
058    public Class<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> getRecordType() {
059        return com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails.class;
060    }
061
062    /**
063     * The column
064     * <code>cancellationkinddetails.cnclkdt_cancellationkinddetailid</code>.
065     */
066    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, CancellationKindDetailPK> CANCELLATION_KIND_DETAIL = createField(DSL.name("cnclkdt_cancellationkinddetailid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CancellationKindDetailPK.class, id -> new com.echothree.model.data.cancellationpolicy.common.pk.CancellationKindDetailPK(id), primaryKey -> primaryKey.getEntityId()));
067
068    /**
069     * The column
070     * <code>cancellationkinddetails.cnclkdt_cnclk_cancellationkindid</code>.
071     */
072    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, CancellationKindPK> CANCELLATION_KIND = createField(DSL.name("cnclkdt_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()));
073
074    /**
075     * The column
076     * <code>cancellationkinddetails.cnclkdt_cancellationkindname</code>.
077     */
078    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, String> CANCELLATION_KIND_NAME = createField(DSL.name("cnclkdt_cancellationkindname"), SQLDataType.VARCHAR(40).nullable(false), this, "");
079
080    /**
081     * The column
082     * <code>cancellationkinddetails.cnclkdt_cancellationsequencetypeid</code>.
083     */
084    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, SequenceTypePK> CANCELLATION_SEQUENCE_TYPE = createField(DSL.name("cnclkdt_cancellationsequencetypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, SequenceTypePK.class, id -> new com.echothree.model.data.sequence.common.pk.SequenceTypePK(id), primaryKey -> primaryKey.getEntityId()));
085
086    /**
087     * The column <code>cancellationkinddetails.cnclkdt_isdefault</code>.
088     */
089    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, Boolean> IS_DEFAULT = createField(DSL.name("cnclkdt_isdefault"), SQLDataType.BIT.nullable(false), this, "");
090
091    /**
092     * The column <code>cancellationkinddetails.cnclkdt_sortorder</code>.
093     */
094    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, Integer> SORT_ORDER = createField(DSL.name("cnclkdt_sortorder"), SQLDataType.INTEGER.nullable(false), this, "");
095
096    /**
097     * The column <code>cancellationkinddetails.cnclkdt_fromtime</code>.
098     */
099    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, Long> FROM_TIME = createField(DSL.name("cnclkdt_fromtime"), SQLDataType.BIGINT.nullable(false), this, "");
100
101    /**
102     * The column <code>cancellationkinddetails.cnclkdt_thrutime</code>.
103     */
104    public final TableField<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, Long> THRU_TIME = createField(DSL.name("cnclkdt_thrutime"), SQLDataType.BIGINT.nullable(false), this, "");
105
106    private CancellationKindDetails(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> aliased) {
107        this(alias, aliased, (Field<?>[]) null, null);
108    }
109
110    private CancellationKindDetails(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> aliased, Field<?>[] parameters, Condition where) {
111        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
112    }
113
114    /**
115     * Create an aliased <code>cancellationkinddetails</code> table reference
116     */
117    public CancellationKindDetails(String alias) {
118        this(DSL.name(alias), CancellationKindDetails);
119    }
120
121    /**
122     * Create an aliased <code>cancellationkinddetails</code> table reference
123     */
124    public CancellationKindDetails(Name alias) {
125        this(alias, CancellationKindDetails);
126    }
127
128    /**
129     * Create a <code>cancellationkinddetails</code> table reference
130     */
131    public CancellationKindDetails() {
132        this(DSL.name("cancellationkinddetails"), null);
133    }
134
135    public <O extends Record> CancellationKindDetails(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> parentPath) {
136        super(path, childPath, parentPath, CancellationKindDetails);
137    }
138
139    /**
140     * A subtype implementing {@link Path} for simplified path-based joins.
141     */
142    public static class CancellationKindDetailsPath extends CancellationKindDetails implements Path<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> {
143
144        private static final long serialVersionUID = 1L;
145        public <O extends Record> CancellationKindDetailsPath(Table<O> path, ForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> childPath, InverseForeignKey<O, com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> parentPath) {
146            super(path, childPath, parentPath);
147        }
148        private CancellationKindDetailsPath(Name alias, Table<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> aliased) {
149            super(alias, aliased);
150        }
151
152        @Override
153        public CancellationKindDetailsPath as(String alias) {
154            return new CancellationKindDetailsPath(DSL.name(alias), this);
155        }
156
157        @Override
158        public CancellationKindDetailsPath as(Name alias) {
159            return new CancellationKindDetailsPath(alias, this);
160        }
161
162        @Override
163        public CancellationKindDetailsPath as(Table<?> alias) {
164            return new CancellationKindDetailsPath(alias.getQualifiedName(), this);
165        }
166    }
167
168    @Override
169    public UniqueKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails> getPrimaryKey() {
170        return KeyRegistry.CANCELLATION_KIND_DETAILS_PK;
171    }
172
173    @Override
174    public List<UniqueKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails>> getUniqueKeys() {
175        return Arrays.asList(KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_KIND_AND_THRU_TIME_UK, KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_KIND_NAME_AND_THRU_TIME_UK);
176    }
177
178    @Override
179    public List<ForeignKey<com.echothree.model.jooq.server.records.cancellationpolicy.CancellationKindDetails, ?>> getReferences() {
180        return Arrays.asList(KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_SEQUENCE_TYPE_FK, KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_KIND_FK);
181    }
182
183    private transient SequenceTypesPath _cnclkdt_cancellationsequencetypeid_fk;
184
185    /**
186     * Get the implicit join path to the <code>sequencetypes</code> table.
187     */
188    public SequenceTypesPath cnclkdt_cancellationsequencetypeid_fk() {
189        if (_cnclkdt_cancellationsequencetypeid_fk == null)
190            _cnclkdt_cancellationsequencetypeid_fk = new SequenceTypesPath(this, KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_SEQUENCE_TYPE_FK, null);
191
192        return _cnclkdt_cancellationsequencetypeid_fk;
193    }
194
195    private transient CancellationKindsPath _cnclkdt_cnclk_cancellationkindid_fk;
196
197    /**
198     * Get the implicit join path to the <code>cancellationkinds</code> table.
199     */
200    public CancellationKindsPath cnclkdt_cnclk_cancellationkindid_fk() {
201        if (_cnclkdt_cnclk_cancellationkindid_fk == null)
202            _cnclkdt_cnclk_cancellationkindid_fk = new CancellationKindsPath(this, KeyRegistry.CANCELLATION_KIND_DETAILS_CANCELLATION_KIND_FK, null);
203
204        return _cnclkdt_cnclk_cancellationkindid_fk;
205    }
206
207    @Override
208    public CancellationKindDetails as(String alias) {
209        return new CancellationKindDetails(DSL.name(alias), this);
210    }
211
212    @Override
213    public CancellationKindDetails as(Name alias) {
214        return new CancellationKindDetails(alias, this);
215    }
216
217    @Override
218    public CancellationKindDetails as(Table<?> alias) {
219        return new CancellationKindDetails(alias.getQualifiedName(), this);
220    }
221
222    /**
223     * Rename this table
224     */
225    @Override
226    public CancellationKindDetails rename(String name) {
227        return new CancellationKindDetails(DSL.name(name), null);
228    }
229
230    /**
231     * Rename this table
232     */
233    @Override
234    public CancellationKindDetails rename(Name name) {
235        return new CancellationKindDetails(name, null);
236    }
237
238    /**
239     * Rename this table
240     */
241    @Override
242    public CancellationKindDetails rename(Table<?> name) {
243        return new CancellationKindDetails(name.getQualifiedName(), null);
244    }
245
246    /**
247     * Create an inline derived table from this table
248     */
249    @Override
250    public CancellationKindDetails where(Condition condition) {
251        return new CancellationKindDetails(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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails 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 CancellationKindDetails whereNotExists(TableLike<?> select) {
327        return where(DSL.notExists(select));
328    }
329}