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