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