001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.order; 005 006 007import com.echothree.model.data.order.common.pk.OrderPK; 008import com.echothree.model.data.order.common.pk.OrderRolePK; 009import com.echothree.model.data.order.common.pk.OrderRoleTypePK; 010import com.echothree.model.data.party.common.pk.PartyPK; 011import com.echothree.model.jooq.server.KeyRegistry; 012import com.echothree.model.jooq.server.tables.order.OrderRoleTypes.OrderRoleTypesPath; 013import com.echothree.model.jooq.server.tables.order.Orders.OrdersPath; 014import com.echothree.model.jooq.server.tables.party.Parties.PartiesPath; 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 OrderRoles extends TableImpl<com.echothree.model.jooq.server.records.order.OrderRoles> { 045 046 private static final long serialVersionUID = 1L; 047 048 /** 049 * The reference instance of <code>orderroles</code> 050 */ 051 public static final OrderRoles OrderRoles = new OrderRoles(); 052 053 /** 054 * The class holding records for this type 055 */ 056 @Override 057 public Class<com.echothree.model.jooq.server.records.order.OrderRoles> getRecordType() { 058 return com.echothree.model.jooq.server.records.order.OrderRoles.class; 059 } 060 061 /** 062 * The column <code>orderroles.ordr_orderroleid</code>. 063 */ 064 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, OrderRolePK> ORDER_ROLE = createField(DSL.name("ordr_orderroleid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderRolePK.class, id -> new com.echothree.model.data.order.common.pk.OrderRolePK(id), primaryKey -> primaryKey.getEntityId())); 065 066 /** 067 * The column <code>orderroles.ordr_ord_orderid</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, OrderPK> ORDER = createField(DSL.name("ordr_ord_orderid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderPK.class, id -> new com.echothree.model.data.order.common.pk.OrderPK(id), primaryKey -> primaryKey.getEntityId())); 070 071 /** 072 * The column <code>orderroles.ordr_par_partyid</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, PartyPK> PARTY = createField(DSL.name("ordr_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())); 075 076 /** 077 * The column <code>orderroles.ordr_ordrtyp_orderroletypeid</code>. 078 */ 079 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, OrderRoleTypePK> ORDER_ROLE_TYPE = createField(DSL.name("ordr_ordrtyp_orderroletypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, OrderRoleTypePK.class, id -> new com.echothree.model.data.order.common.pk.OrderRoleTypePK(id), primaryKey -> primaryKey.getEntityId())); 080 081 /** 082 * The column <code>orderroles.ordr_fromtime</code>. 083 */ 084 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, Long> FROM_TIME = createField(DSL.name("ordr_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 085 086 /** 087 * The column <code>orderroles.ordr_thrutime</code>. 088 */ 089 public final TableField<com.echothree.model.jooq.server.records.order.OrderRoles, Long> THRU_TIME = createField(DSL.name("ordr_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 090 091 private OrderRoles(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderRoles> aliased) { 092 this(alias, aliased, (Field<?>[]) null, null); 093 } 094 095 private OrderRoles(Name alias, Table<com.echothree.model.jooq.server.records.order.OrderRoles> aliased, Field<?>[] parameters, Condition where) { 096 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 097 } 098 099 /** 100 * Create an aliased <code>orderroles</code> table reference 101 */ 102 public OrderRoles(String alias) { 103 this(DSL.name(alias), OrderRoles); 104 } 105 106 /** 107 * Create an aliased <code>orderroles</code> table reference 108 */ 109 public OrderRoles(Name alias) { 110 this(alias, OrderRoles); 111 } 112 113 /** 114 * Create a <code>orderroles</code> table reference 115 */ 116 public OrderRoles() { 117 this(DSL.name("orderroles"), null); 118 } 119 120 @Override 121 public UniqueKey<com.echothree.model.jooq.server.records.order.OrderRoles> getPrimaryKey() { 122 return KeyRegistry.ORDER_ROLES_PK; 123 } 124 125 @Override 126 public List<UniqueKey<com.echothree.model.jooq.server.records.order.OrderRoles>> getUniqueKeys() { 127 return Arrays.asList(KeyRegistry.ORDER_ROLES_ORDER_AND_PARTY_AND_ORDER_ROLE_TYPE_AND_THRU_TIME_UK); 128 } 129 130 @Override 131 public List<ForeignKey<com.echothree.model.jooq.server.records.order.OrderRoles, ?>> getReferences() { 132 return Arrays.asList(KeyRegistry.ORDER_ROLES_ORDER_FK, KeyRegistry.ORDER_ROLES_ORDER_ROLE_TYPE_FK, KeyRegistry.ORDER_ROLES_PARTY_FK); 133 } 134 135 private transient OrdersPath _ordr_ord_orderid_fk; 136 137 /** 138 * Get the implicit join path to the <code>orders</code> table. 139 */ 140 public OrdersPath ordr_ord_orderid_fk() { 141 if (_ordr_ord_orderid_fk == null) 142 _ordr_ord_orderid_fk = new OrdersPath(this, KeyRegistry.ORDER_ROLES_ORDER_FK, null); 143 144 return _ordr_ord_orderid_fk; 145 } 146 147 private transient OrderRoleTypesPath _ordr_ordrtyp_orderroletypeid_fk; 148 149 /** 150 * Get the implicit join path to the <code>orderroletypes</code> table. 151 */ 152 public OrderRoleTypesPath ordr_ordrtyp_orderroletypeid_fk() { 153 if (_ordr_ordrtyp_orderroletypeid_fk == null) 154 _ordr_ordrtyp_orderroletypeid_fk = new OrderRoleTypesPath(this, KeyRegistry.ORDER_ROLES_ORDER_ROLE_TYPE_FK, null); 155 156 return _ordr_ordrtyp_orderroletypeid_fk; 157 } 158 159 private transient PartiesPath _ordr_par_partyid_fk; 160 161 /** 162 * Get the implicit join path to the <code>parties</code> table. 163 */ 164 public PartiesPath ordr_par_partyid_fk() { 165 if (_ordr_par_partyid_fk == null) 166 _ordr_par_partyid_fk = new PartiesPath(this, KeyRegistry.ORDER_ROLES_PARTY_FK, null); 167 168 return _ordr_par_partyid_fk; 169 } 170 171 @Override 172 public OrderRoles as(String alias) { 173 return new OrderRoles(DSL.name(alias), this); 174 } 175 176 @Override 177 public OrderRoles as(Name alias) { 178 return new OrderRoles(alias, this); 179 } 180 181 @Override 182 public OrderRoles as(Table<?> alias) { 183 return new OrderRoles(alias.getQualifiedName(), this); 184 } 185 186 /** 187 * Rename this table 188 */ 189 @Override 190 public OrderRoles rename(String name) { 191 return new OrderRoles(DSL.name(name), null); 192 } 193 194 /** 195 * Rename this table 196 */ 197 @Override 198 public OrderRoles rename(Name name) { 199 return new OrderRoles(name, null); 200 } 201 202 /** 203 * Rename this table 204 */ 205 @Override 206 public OrderRoles rename(Table<?> name) { 207 return new OrderRoles(name.getQualifiedName(), null); 208 } 209 210 /** 211 * Create an inline derived table from this table 212 */ 213 @Override 214 public OrderRoles where(Condition condition) { 215 return new OrderRoles(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 216 } 217 218 /** 219 * Create an inline derived table from this table 220 */ 221 @Override 222 public OrderRoles where(Collection<? extends Condition> conditions) { 223 return where(DSL.and(conditions)); 224 } 225 226 /** 227 * Create an inline derived table from this table 228 */ 229 @Override 230 public OrderRoles where(Condition... conditions) { 231 return where(DSL.and(conditions)); 232 } 233 234 /** 235 * Create an inline derived table from this table 236 */ 237 @Override 238 public OrderRoles where(Field<Boolean> condition) { 239 return where(DSL.condition(condition)); 240 } 241 242 /** 243 * Create an inline derived table from this table 244 */ 245 @Override 246 @PlainSQL 247 public OrderRoles where(SQL condition) { 248 return where(DSL.condition(condition)); 249 } 250 251 /** 252 * Create an inline derived table from this table 253 */ 254 @Override 255 @PlainSQL 256 public OrderRoles where(@Stringly.SQL String condition) { 257 return where(DSL.condition(condition)); 258 } 259 260 /** 261 * Create an inline derived table from this table 262 */ 263 @Override 264 @PlainSQL 265 public OrderRoles where(@Stringly.SQL String condition, Object... binds) { 266 return where(DSL.condition(condition, binds)); 267 } 268 269 /** 270 * Create an inline derived table from this table 271 */ 272 @Override 273 @PlainSQL 274 public OrderRoles where(@Stringly.SQL String condition, QueryPart... parts) { 275 return where(DSL.condition(condition, parts)); 276 } 277 278 /** 279 * Create an inline derived table from this table 280 */ 281 @Override 282 public OrderRoles whereExists(TableLike<?> select) { 283 return where(DSL.exists(select)); 284 } 285 286 /** 287 * Create an inline derived table from this table 288 */ 289 @Override 290 public OrderRoles whereNotExists(TableLike<?> select) { 291 return where(DSL.notExists(select)); 292 } 293}