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