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.EntityInstancePK; 008import com.echothree.model.data.core.common.pk.LinkPK; 009import com.echothree.model.data.core.common.pk.LinkTypePK; 010import com.echothree.model.jooq.server.KeyRegistry; 011import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 012import com.echothree.model.jooq.server.tables.core.LinkTypes.LinkTypesPath; 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 Links extends TableImpl<com.echothree.model.jooq.server.records.core.Links> { 043 044 private static final long serialVersionUID = 1L; 045 046 /** 047 * The reference instance of <code>links</code> 048 */ 049 public static final Links Links = new Links(); 050 051 /** 052 * The class holding records for this type 053 */ 054 @Override 055 public Class<com.echothree.model.jooq.server.records.core.Links> getRecordType() { 056 return com.echothree.model.jooq.server.records.core.Links.class; 057 } 058 059 /** 060 * The column <code>links.lnk_linkid</code>. 061 */ 062 public final TableField<com.echothree.model.jooq.server.records.core.Links, LinkPK> LINK = createField(DSL.name("lnk_linkid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LinkPK.class, id -> new com.echothree.model.data.core.common.pk.LinkPK(id), primaryKey -> primaryKey.getEntityId())); 063 064 /** 065 * The column <code>links.lnk_lnktyp_linktypeid</code>. 066 */ 067 public final TableField<com.echothree.model.jooq.server.records.core.Links, LinkTypePK> LINK_TYPE = createField(DSL.name("lnk_lnktyp_linktypeid"), SQLDataType.BIGINT.nullable(false), this, "", Converter.ofNullable(Long.class, LinkTypePK.class, id -> new com.echothree.model.data.core.common.pk.LinkTypePK(id), primaryKey -> primaryKey.getEntityId())); 068 069 /** 070 * The column <code>links.lnk_sourceentityinstanceid</code>. 071 */ 072 public final TableField<com.echothree.model.jooq.server.records.core.Links, EntityInstancePK> SOURCE_ENTITY_INSTANCE = createField(DSL.name("lnk_sourceentityinstanceid"), 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())); 073 074 /** 075 * The column <code>links.lnk_targetentityinstanceid</code>. 076 */ 077 public final TableField<com.echothree.model.jooq.server.records.core.Links, EntityInstancePK> TARGET_ENTITY_INSTANCE = createField(DSL.name("lnk_targetentityinstanceid"), 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())); 078 079 /** 080 * The column <code>links.lnk_fromtime</code>. 081 */ 082 public final TableField<com.echothree.model.jooq.server.records.core.Links, Long> FROM_TIME = createField(DSL.name("lnk_fromtime"), SQLDataType.BIGINT.nullable(false), this, ""); 083 084 /** 085 * The column <code>links.lnk_thrutime</code>. 086 */ 087 public final TableField<com.echothree.model.jooq.server.records.core.Links, Long> THRU_TIME = createField(DSL.name("lnk_thrutime"), SQLDataType.BIGINT.nullable(false), this, ""); 088 089 private Links(Name alias, Table<com.echothree.model.jooq.server.records.core.Links> aliased) { 090 this(alias, aliased, (Field<?>[]) null, null); 091 } 092 093 private Links(Name alias, Table<com.echothree.model.jooq.server.records.core.Links> aliased, Field<?>[] parameters, Condition where) { 094 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 095 } 096 097 /** 098 * Create an aliased <code>links</code> table reference 099 */ 100 public Links(String alias) { 101 this(DSL.name(alias), Links); 102 } 103 104 /** 105 * Create an aliased <code>links</code> table reference 106 */ 107 public Links(Name alias) { 108 this(alias, Links); 109 } 110 111 /** 112 * Create a <code>links</code> table reference 113 */ 114 public Links() { 115 this(DSL.name("links"), null); 116 } 117 118 @Override 119 public UniqueKey<com.echothree.model.jooq.server.records.core.Links> getPrimaryKey() { 120 return KeyRegistry.LINKS_PK; 121 } 122 123 @Override 124 public List<UniqueKey<com.echothree.model.jooq.server.records.core.Links>> getUniqueKeys() { 125 return Arrays.asList(KeyRegistry.LINKS_LINK_TYPE_AND_SOURCE_ENTITY_INSTANCE_AND_TARGET_ENTITY_INSTANCE_AND_THRU_TIME_UK); 126 } 127 128 @Override 129 public List<ForeignKey<com.echothree.model.jooq.server.records.core.Links, ?>> getReferences() { 130 return Arrays.asList(KeyRegistry.LINKS_LINK_TYPE_FK, KeyRegistry.LINKS_SOURCE_ENTITY_INSTANCE_FK, KeyRegistry.LINKS_TARGET_ENTITY_INSTANCE_FK); 131 } 132 133 private transient LinkTypesPath _lnk_lnktyp_linktypeid_fk; 134 135 /** 136 * Get the implicit join path to the <code>linktypes</code> table. 137 */ 138 public LinkTypesPath lnk_lnktyp_linktypeid_fk() { 139 if (_lnk_lnktyp_linktypeid_fk == null) 140 _lnk_lnktyp_linktypeid_fk = new LinkTypesPath(this, KeyRegistry.LINKS_LINK_TYPE_FK, null); 141 142 return _lnk_lnktyp_linktypeid_fk; 143 } 144 145 private transient EntityInstancesPath _lnk_sourceentityinstanceid_fk; 146 147 /** 148 * Get the implicit join path to the <code>entityinstances</code> table, via 149 * the <code>lnk_sourceentityinstanceid_fk</code> key. 150 */ 151 public EntityInstancesPath lnk_sourceentityinstanceid_fk() { 152 if (_lnk_sourceentityinstanceid_fk == null) 153 _lnk_sourceentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.LINKS_SOURCE_ENTITY_INSTANCE_FK, null); 154 155 return _lnk_sourceentityinstanceid_fk; 156 } 157 158 private transient EntityInstancesPath _lnk_targetentityinstanceid_fk; 159 160 /** 161 * Get the implicit join path to the <code>entityinstances</code> table, via 162 * the <code>lnk_targetentityinstanceid_fk</code> key. 163 */ 164 public EntityInstancesPath lnk_targetentityinstanceid_fk() { 165 if (_lnk_targetentityinstanceid_fk == null) 166 _lnk_targetentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.LINKS_TARGET_ENTITY_INSTANCE_FK, null); 167 168 return _lnk_targetentityinstanceid_fk; 169 } 170 171 @Override 172 public Links as(String alias) { 173 return new Links(DSL.name(alias), this); 174 } 175 176 @Override 177 public Links as(Name alias) { 178 return new Links(alias, this); 179 } 180 181 @Override 182 public Links as(Table<?> alias) { 183 return new Links(alias.getQualifiedName(), this); 184 } 185 186 /** 187 * Rename this table 188 */ 189 @Override 190 public Links rename(String name) { 191 return new Links(DSL.name(name), null); 192 } 193 194 /** 195 * Rename this table 196 */ 197 @Override 198 public Links rename(Name name) { 199 return new Links(name, null); 200 } 201 202 /** 203 * Rename this table 204 */ 205 @Override 206 public Links rename(Table<?> name) { 207 return new Links(name.getQualifiedName(), null); 208 } 209 210 /** 211 * Create an inline derived table from this table 212 */ 213 @Override 214 public Links where(Condition condition) { 215 return new Links(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 Links 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 Links 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 Links 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 Links 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 Links 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 Links 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 Links 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 Links 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 Links whereNotExists(TableLike<?> select) { 291 return where(DSL.notExists(select)); 292 } 293}