001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.carrier; 005 006 007import com.echothree.model.data.carrier.common.pk.CarrierPK; 008import com.echothree.model.data.carrier.common.pk.CarrierTypePK; 009import com.echothree.model.data.party.common.pk.PartyPK; 010import com.echothree.model.data.selector.common.pk.SelectorPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.carrier.CarrierTypes.CarrierTypesPath; 013import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 014import com.echothree.model.jooq.server.tables.selector.Selectors.SelectorsPath; 015 016import java.util.Arrays; 017import java.util.Collection; 018import java.util.List; 019 020import org.jooq.Condition; 021import org.jooq.Converter; 022import org.jooq.Field; 023import org.jooq.ForeignKey; 024import org.jooq.Name; 025import org.jooq.PlainSQL; 026import org.jooq.QueryPart; 027import org.jooq.SQL; 028import org.jooq.Stringly; 029import org.jooq.Table; 030import org.jooq.TableField; 031import org.jooq.TableLike; 032import org.jooq.TableOptions; 033import org.jooq.UniqueKey; 034import org.jooq.impl.DSL; 035import org.jooq.impl.Internal; 036import org.jooq.impl.SQLDataType; 037import org.jooq.impl.TableImpl; 038 039 040/** 041 * This class is generated by jOOQ. 042 */ 043@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 044public class Carriers extends TableImpl<com.echothree.model.jooq.server.records.carrier.Carriers> { 045 046 private static final long serialVersionUID = 1L; 047 048 /** 049 * The reference instance of <code>carriers</code> 050 */ 051 public static final Carriers Carriers = new Carriers(); 052 053 /** 054 * The class holding records for this type 055 */ 056 @Override 057 public Class<com.echothree.model.jooq.server.records.carrier.Carriers> getRecordType() { 058 return com.echothree.model.jooq.server.records.carrier.Carriers.class; 059 } 060 061 /** 062 * The column <code>carriers.crr_carrierid</code>. 063 */ 064 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, CarrierPK> CARRIER = createField(DSL.name("crr_carrierid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CarrierPK.class, id -> new com.echothree.model.data.carrier.common.pk.CarrierPK(id), primaryKey -> primaryKey.getEntityId())); 065 066 /** 067 * The column <code>carriers.crr_par_partyid</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, PartyPK> PARTY = createField(DSL.name("crr_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())); 070 071 /** 072 * The column <code>carriers.crr_carriername</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, String> CARRIER_NAME = createField(DSL.name("crr_carriername"), SQLDataType.VARCHAR(40).nullable(false), this, ""); 075 076 /** 077 * The column <code>carriers.crr_crrtyp_carriertypeid</code>. 078 */ 079 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, CarrierTypePK> CARRIER_TYPE = createField(DSL.name("crr_crrtyp_carriertypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, CarrierTypePK.class, id -> new com.echothree.model.data.carrier.common.pk.CarrierTypePK(id), primaryKey -> primaryKey.getEntityId())); 080 081 /** 082 * The column <code>carriers.crr_geocodeselectorid</code>. 083 */ 084 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, SelectorPK> GEO_CODE_SELECTOR = createField(DSL.name("crr_geocodeselectorid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorPK(id), primaryKey -> primaryKey.getEntityId())); 085 086 /** 087 * The column <code>carriers.crr_itemselectorid</code>. 088 */ 089 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, SelectorPK> ITEM_SELECTOR = createField(DSL.name("crr_itemselectorid"), SQLDataType.BIGINT, this, "", Converter.ofNullable(Long.class, SelectorPK.class, id -> new com.echothree.model.data.selector.common.pk.SelectorPK(id), primaryKey -> primaryKey.getEntityId())); 090 091 /** 092 * The column <code>carriers.crr_accountvalidationpattern</code>. 093 */ 094 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, String> ACCOUNT_VALIDATION_PATTERN = createField(DSL.name("crr_accountvalidationpattern"), SQLDataType.VARCHAR(128), this, ""); 095 096 /** 097 * The column <code>carriers.crr_isdefault</code>. 098 */ 099 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, Boolean> IS_DEFAULT = createField(DSL.name("crr_isdefault"), SQLDataType.BIT.nullable(false), this, ""); 100 101 /** 102 * The column <code>carriers.crr_sortorder</code>. 103 */ 104 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, Integer> SORT_ORDER = createField(DSL.name("crr_sortorder"), SQLDataType.INTEGER.nullable(false), this, ""); 105 106 /** 107 * The column <code>carriers.crr_fromtime</code>. 108 */ 109 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, Long> FROM_TIME = createField(DSL.name("crr_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 110 111 /** 112 * The column <code>carriers.crr_thrutime</code>. 113 */ 114 public final TableField<com.echothree.model.jooq.server.records.carrier.Carriers, Long> THRU_TIME = createField(DSL.name("crr_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 115 116 private Carriers(Name alias, Table<com.echothree.model.jooq.server.records.carrier.Carriers> aliased) { 117 this(alias, aliased, (Field<?>[]) null, null); 118 } 119 120 private Carriers(Name alias, Table<com.echothree.model.jooq.server.records.carrier.Carriers> aliased, Field<?>[] parameters, Condition where) { 121 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 122 } 123 124 /** 125 * Create an aliased <code>carriers</code> table reference 126 */ 127 public Carriers(String alias) { 128 this(DSL.name(alias), Carriers); 129 } 130 131 /** 132 * Create an aliased <code>carriers</code> table reference 133 */ 134 public Carriers(Name alias) { 135 this(alias, Carriers); 136 } 137 138 /** 139 * Create a <code>carriers</code> table reference 140 */ 141 public Carriers() { 142 this(DSL.name("carriers"), null); 143 } 144 145 @Override 146 public UniqueKey<com.echothree.model.jooq.server.records.carrier.Carriers> getPrimaryKey() { 147 return KeyRegistry.CARRIERS_PK; 148 } 149 150 @Override 151 public List<UniqueKey<com.echothree.model.jooq.server.records.carrier.Carriers>> getUniqueKeys() { 152 return Arrays.asList(KeyRegistry.CARRIERS_PARTY_AND_THRU_TIME_UK, KeyRegistry.CARRIERS_CARRIER_NAME_AND_THRU_TIME_UK, KeyRegistry.CARRIERS_CARRIER_TYPE_AND_THRU_TIME_UK); 153 } 154 155 @Override 156 public List<ForeignKey<com.echothree.model.jooq.server.records.carrier.Carriers, ?>> getReferences() { 157 return Arrays.asList(KeyRegistry.CARRIERS_CARRIER_TYPE_FK, KeyRegistry.CARRIERS_GEO_CODE_SELECTOR_FK, KeyRegistry.CARRIERS_ITEM_SELECTOR_FK, KeyRegistry.CARRIERS_PARTY_FK); 158 } 159 160 private transient CarrierTypesPath _crr_crrtyp_carriertypeid_fk; 161 162 /** 163 * Get the implicit join path to the <code>carriertypes</code> table. 164 */ 165 public CarrierTypesPath crr_crrtyp_carriertypeid_fk() { 166 if (_crr_crrtyp_carriertypeid_fk == null) 167 _crr_crrtyp_carriertypeid_fk = new CarrierTypesPath(this, KeyRegistry.CARRIERS_CARRIER_TYPE_FK, null); 168 169 return _crr_crrtyp_carriertypeid_fk; 170 } 171 172 private transient SelectorsPath _crr_geocodeselectorid_fk; 173 174 /** 175 * Get the implicit join path to the <code>selectors</code> table, via the 176 * <code>crr_geocodeselectorid_fk</code> key. 177 */ 178 public SelectorsPath crr_geocodeselectorid_fk() { 179 if (_crr_geocodeselectorid_fk == null) 180 _crr_geocodeselectorid_fk = new SelectorsPath(this, KeyRegistry.CARRIERS_GEO_CODE_SELECTOR_FK, null); 181 182 return _crr_geocodeselectorid_fk; 183 } 184 185 private transient SelectorsPath _crr_itemselectorid_fk; 186 187 /** 188 * Get the implicit join path to the <code>selectors</code> table, via the 189 * <code>crr_itemselectorid_fk</code> key. 190 */ 191 public SelectorsPath crr_itemselectorid_fk() { 192 if (_crr_itemselectorid_fk == null) 193 _crr_itemselectorid_fk = new SelectorsPath(this, KeyRegistry.CARRIERS_ITEM_SELECTOR_FK, null); 194 195 return _crr_itemselectorid_fk; 196 } 197 198 private transient PartiesPath _crr_par_partyid_fk; 199 200 /** 201 * Get the implicit join path to the <code>parties</code> table. 202 */ 203 public PartiesPath crr_par_partyid_fk() { 204 if (_crr_par_partyid_fk == null) 205 _crr_par_partyid_fk = new PartiesPath(this, KeyRegistry.CARRIERS_PARTY_FK, null); 206 207 return _crr_par_partyid_fk; 208 } 209 210 @Override 211 public Carriers as(String alias) { 212 return new Carriers(DSL.name(alias), this); 213 } 214 215 @Override 216 public Carriers as(Name alias) { 217 return new Carriers(alias, this); 218 } 219 220 @Override 221 public Carriers as(Table<?> alias) { 222 return new Carriers(alias.getQualifiedName(), this); 223 } 224 225 /** 226 * Rename this table 227 */ 228 @Override 229 public Carriers rename(String name) { 230 return new Carriers(DSL.name(name), null); 231 } 232 233 /** 234 * Rename this table 235 */ 236 @Override 237 public Carriers rename(Name name) { 238 return new Carriers(name, null); 239 } 240 241 /** 242 * Rename this table 243 */ 244 @Override 245 public Carriers rename(Table<?> name) { 246 return new Carriers(name.getQualifiedName(), null); 247 } 248 249 /** 250 * Create an inline derived table from this table 251 */ 252 @Override 253 public Carriers where(Condition condition) { 254 return new Carriers(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 255 } 256 257 /** 258 * Create an inline derived table from this table 259 */ 260 @Override 261 public Carriers where(Collection<? extends Condition> conditions) { 262 return where(DSL.and(conditions)); 263 } 264 265 /** 266 * Create an inline derived table from this table 267 */ 268 @Override 269 public Carriers where(Condition... conditions) { 270 return where(DSL.and(conditions)); 271 } 272 273 /** 274 * Create an inline derived table from this table 275 */ 276 @Override 277 public Carriers where(Field<Boolean> condition) { 278 return where(DSL.condition(condition)); 279 } 280 281 /** 282 * Create an inline derived table from this table 283 */ 284 @Override 285 @PlainSQL 286 public Carriers where(SQL condition) { 287 return where(DSL.condition(condition)); 288 } 289 290 /** 291 * Create an inline derived table from this table 292 */ 293 @Override 294 @PlainSQL 295 public Carriers where(@Stringly.SQL String condition) { 296 return where(DSL.condition(condition)); 297 } 298 299 /** 300 * Create an inline derived table from this table 301 */ 302 @Override 303 @PlainSQL 304 public Carriers where(@Stringly.SQL String condition, Object... binds) { 305 return where(DSL.condition(condition, binds)); 306 } 307 308 /** 309 * Create an inline derived table from this table 310 */ 311 @Override 312 @PlainSQL 313 public Carriers where(@Stringly.SQL String condition, QueryPart... parts) { 314 return where(DSL.condition(condition, parts)); 315 } 316 317 /** 318 * Create an inline derived table from this table 319 */ 320 @Override 321 public Carriers whereExists(TableLike<?> select) { 322 return where(DSL.exists(select)); 323 } 324 325 /** 326 * Create an inline derived table from this table 327 */ 328 @Override 329 public Carriers whereNotExists(TableLike<?> select) { 330 return where(DSL.notExists(select)); 331 } 332}