001/* 002 * This file is generated by jOOQ. 003 */ 004package com.echothree.model.jooq.server.tables.core; 005 006 007import com.echothree.model.data.core.common.pk.EntityAttributePK; 008import com.echothree.model.data.core.common.pk.EntityCollectionAttributePK; 009import com.echothree.model.data.core.common.pk.EntityInstancePK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.core.EntityAttributes.EntityAttributesPath; 012import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 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 EntityCollectionAttributes extends TableImpl<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes> { 043 044 private static final long serialVersionUID = 1L; 045 046 /** 047 * The reference instance of <code>entitycollectionattributes</code> 048 */ 049 public static final EntityCollectionAttributes EntityCollectionAttributes = new EntityCollectionAttributes(); 050 051 /** 052 * The class holding records for this type 053 */ 054 @Override 055 public Class<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes> getRecordType() { 056 return com.echothree.model.jooq.server.records.core.EntityCollectionAttributes.class; 057 } 058 059 /** 060 * The column 061 * <code>entitycollectionattributes.eca_entitycollectionattributeid</code>. 062 */ 063 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, EntityCollectionAttributePK> ENTITY_COLLECTION_ATTRIBUTE = createField(DSL.name("eca_entitycollectionattributeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityCollectionAttributePK.class, id -> new com.echothree.model.data.core.common.pk.EntityCollectionAttributePK(id), primaryKey -> primaryKey.getEntityId())); 064 065 /** 066 * The column 067 * <code>entitycollectionattributes.eca_ena_entityattributeid</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, EntityAttributePK> ENTITY_ATTRIBUTE = createField(DSL.name("eca_ena_entityattributeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityAttributePK.class, id -> new com.echothree.model.data.core.common.pk.EntityAttributePK(id), primaryKey -> primaryKey.getEntityId())); 070 071 /** 072 * The column 073 * <code>entitycollectionattributes.eca_eni_entityinstanceid</code>. 074 */ 075 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, EntityInstancePK> ENTITY_INSTANCE = createField(DSL.name("eca_eni_entityinstanceid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId())); 076 077 /** 078 * The column 079 * <code>entitycollectionattributes.eca_entityinstanceattributeid</code>. 080 */ 081 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, EntityInstancePK> ENTITY_INSTANCE_ATTRIBUTE = createField(DSL.name("eca_entityinstanceattributeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, EntityInstancePK.class, id -> new com.echothree.model.data.core.common.pk.EntityInstancePK(id), primaryKey -> primaryKey.getEntityId())); 082 083 /** 084 * The column <code>entitycollectionattributes.eca_fromtime</code>. 085 */ 086 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, Long> FROM_TIME = createField(DSL.name("eca_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 087 088 /** 089 * The column <code>entitycollectionattributes.eca_thrutime</code>. 090 */ 091 public final TableField<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, Long> THRU_TIME = createField(DSL.name("eca_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 092 093 private EntityCollectionAttributes(Name alias, Table<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes> aliased) { 094 this(alias, aliased, (Field<?>[]) null, null); 095 } 096 097 private EntityCollectionAttributes(Name alias, Table<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes> aliased, Field<?>[] parameters, Condition where) { 098 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 099 } 100 101 /** 102 * Create an aliased <code>entitycollectionattributes</code> table reference 103 */ 104 public EntityCollectionAttributes(String alias) { 105 this(DSL.name(alias), EntityCollectionAttributes); 106 } 107 108 /** 109 * Create an aliased <code>entitycollectionattributes</code> table reference 110 */ 111 public EntityCollectionAttributes(Name alias) { 112 this(alias, EntityCollectionAttributes); 113 } 114 115 /** 116 * Create a <code>entitycollectionattributes</code> table reference 117 */ 118 public EntityCollectionAttributes() { 119 this(DSL.name("entitycollectionattributes"), null); 120 } 121 122 @Override 123 public UniqueKey<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes> getPrimaryKey() { 124 return KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_PK; 125 } 126 127 @Override 128 public List<UniqueKey<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes>> getUniqueKeys() { 129 return Arrays.asList(KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_ATTRIBUTE_AND_ENTITY_INSTANCE_AND_ENTITY_INSTANCE_ATTRIBUTE_AND_THRU_TIME_UK); 130 } 131 132 @Override 133 public List<ForeignKey<com.echothree.model.jooq.server.records.core.EntityCollectionAttributes, ?>> getReferences() { 134 return Arrays.asList(KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_ATTRIBUTE_FK, KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_INSTANCE_FK, KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_INSTANCE_ATTRIBUTE_FK); 135 } 136 137 private transient EntityAttributesPath _eca_ena_entityattributeid_fk; 138 139 /** 140 * Get the implicit join path to the <code>entityattributes</code> table. 141 */ 142 public EntityAttributesPath eca_ena_entityattributeid_fk() { 143 if (_eca_ena_entityattributeid_fk == null) 144 _eca_ena_entityattributeid_fk = new EntityAttributesPath(this, KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_ATTRIBUTE_FK, null); 145 146 return _eca_ena_entityattributeid_fk; 147 } 148 149 private transient EntityInstancesPath _eca_eni_entityinstanceid_fk; 150 151 /** 152 * Get the implicit join path to the <code>entityinstances</code> table, via 153 * the <code>eca_eni_entityinstanceid_fk</code> key. 154 */ 155 public EntityInstancesPath eca_eni_entityinstanceid_fk() { 156 if (_eca_eni_entityinstanceid_fk == null) 157 _eca_eni_entityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_INSTANCE_FK, null); 158 159 return _eca_eni_entityinstanceid_fk; 160 } 161 162 private transient EntityInstancesPath _eca_entityinstanceattributeid_fk; 163 164 /** 165 * Get the implicit join path to the <code>entityinstances</code> table, via 166 * the <code>eca_entityinstanceattributeid_fk</code> key. 167 */ 168 public EntityInstancesPath eca_entityinstanceattributeid_fk() { 169 if (_eca_entityinstanceattributeid_fk == null) 170 _eca_entityinstanceattributeid_fk = new EntityInstancesPath(this, KeyRegistry.ENTITY_COLLECTION_ATTRIBUTES_ENTITY_INSTANCE_ATTRIBUTE_FK, null); 171 172 return _eca_entityinstanceattributeid_fk; 173 } 174 175 @Override 176 public EntityCollectionAttributes as(String alias) { 177 return new EntityCollectionAttributes(DSL.name(alias), this); 178 } 179 180 @Override 181 public EntityCollectionAttributes as(Name alias) { 182 return new EntityCollectionAttributes(alias, this); 183 } 184 185 @Override 186 public EntityCollectionAttributes as(Table<?> alias) { 187 return new EntityCollectionAttributes(alias.getQualifiedName(), this); 188 } 189 190 /** 191 * Rename this table 192 */ 193 @Override 194 public EntityCollectionAttributes rename(String name) { 195 return new EntityCollectionAttributes(DSL.name(name), null); 196 } 197 198 /** 199 * Rename this table 200 */ 201 @Override 202 public EntityCollectionAttributes rename(Name name) { 203 return new EntityCollectionAttributes(name, null); 204 } 205 206 /** 207 * Rename this table 208 */ 209 @Override 210 public EntityCollectionAttributes rename(Table<?> name) { 211 return new EntityCollectionAttributes(name.getQualifiedName(), null); 212 } 213 214 /** 215 * Create an inline derived table from this table 216 */ 217 @Override 218 public EntityCollectionAttributes where(Condition condition) { 219 return new EntityCollectionAttributes(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 220 } 221 222 /** 223 * Create an inline derived table from this table 224 */ 225 @Override 226 public EntityCollectionAttributes where(Collection<? extends Condition> conditions) { 227 return where(DSL.and(conditions)); 228 } 229 230 /** 231 * Create an inline derived table from this table 232 */ 233 @Override 234 public EntityCollectionAttributes where(Condition... conditions) { 235 return where(DSL.and(conditions)); 236 } 237 238 /** 239 * Create an inline derived table from this table 240 */ 241 @Override 242 public EntityCollectionAttributes where(Field<Boolean> 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 EntityCollectionAttributes where(SQL 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 EntityCollectionAttributes where(@Stringly.SQL String 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 EntityCollectionAttributes where(@Stringly.SQL String condition, Object... binds) { 270 return where(DSL.condition(condition, binds)); 271 } 272 273 /** 274 * Create an inline derived table from this table 275 */ 276 @Override 277 @PlainSQL 278 public EntityCollectionAttributes where(@Stringly.SQL String condition, QueryPart... parts) { 279 return where(DSL.condition(condition, parts)); 280 } 281 282 /** 283 * Create an inline derived table from this table 284 */ 285 @Override 286 public EntityCollectionAttributes whereExists(TableLike<?> select) { 287 return where(DSL.exists(select)); 288 } 289 290 /** 291 * Create an inline derived table from this table 292 */ 293 @Override 294 public EntityCollectionAttributes whereNotExists(TableLike<?> select) { 295 return where(DSL.notExists(select)); 296 } 297}