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.jooq.server.KeyRegistry; 009import com.echothree.model.jooq.server.tables.core.EntityInstances.EntityInstancesPath; 010 011import java.util.Arrays; 012import java.util.Collection; 013import java.util.List; 014 015import org.jooq.Condition; 016import org.jooq.Converter; 017import org.jooq.Field; 018import org.jooq.ForeignKey; 019import org.jooq.Name; 020import org.jooq.PlainSQL; 021import org.jooq.QueryPart; 022import org.jooq.SQL; 023import org.jooq.Stringly; 024import org.jooq.Table; 025import org.jooq.TableField; 026import org.jooq.TableLike; 027import org.jooq.TableOptions; 028import org.jooq.UniqueKey; 029import org.jooq.impl.DSL; 030import org.jooq.impl.Internal; 031import org.jooq.impl.SQLDataType; 032import org.jooq.impl.TableImpl; 033 034 035/** 036 * This class is generated by jOOQ. 037 */ 038@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) 039public class EntityLocks extends TableImpl<com.echothree.model.jooq.server.records.core.EntityLocks> { 040 041 private static final long serialVersionUID = 1L; 042 043 /** 044 * The reference instance of <code>entitylocks</code> 045 */ 046 public static final EntityLocks EntityLocks = new EntityLocks(); 047 048 /** 049 * The class holding records for this type 050 */ 051 @Override 052 public Class<com.echothree.model.jooq.server.records.core.EntityLocks> getRecordType() { 053 return com.echothree.model.jooq.server.records.core.EntityLocks.class; 054 } 055 056 /** 057 * The column <code>entitylocks.lcks_locktargetentityinstanceid</code>. 058 */ 059 public final TableField<com.echothree.model.jooq.server.records.core.EntityLocks, EntityInstancePK> LOCK_TARGET_ENTITY_INSTANCE = createField(DSL.name("lcks_locktargetentityinstanceid"), 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())); 060 061 /** 062 * The column <code>entitylocks.lcks_lockedbyentityinstanceid</code>. 063 */ 064 public final TableField<com.echothree.model.jooq.server.records.core.EntityLocks, EntityInstancePK> LOCKED_BY_ENTITY_INSTANCE = createField(DSL.name("lcks_lockedbyentityinstanceid"), 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())); 065 066 /** 067 * The column <code>entitylocks.lcks_lockedtime</code>. 068 */ 069 public final TableField<com.echothree.model.jooq.server.records.core.EntityLocks, Long> LOCKED_TIME = createField(DSL.name("lcks_lockedtime"), SQLDataType.BIGINT.nullable(false), this, ""); 070 071 /** 072 * The column <code>entitylocks.lcks_lockexpirationtime</code>. 073 */ 074 public final TableField<com.echothree.model.jooq.server.records.core.EntityLocks, Long> LOCK_EXPIRATION_TIME = createField(DSL.name("lcks_lockexpirationtime"), SQLDataType.BIGINT.nullable(false), this, ""); 075 076 private EntityLocks(Name alias, Table<com.echothree.model.jooq.server.records.core.EntityLocks> aliased) { 077 this(alias, aliased, (Field<?>[]) null, null); 078 } 079 080 private EntityLocks(Name alias, Table<com.echothree.model.jooq.server.records.core.EntityLocks> aliased, Field<?>[] parameters, Condition where) { 081 super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); 082 } 083 084 /** 085 * Create an aliased <code>entitylocks</code> table reference 086 */ 087 public EntityLocks(String alias) { 088 this(DSL.name(alias), EntityLocks); 089 } 090 091 /** 092 * Create an aliased <code>entitylocks</code> table reference 093 */ 094 public EntityLocks(Name alias) { 095 this(alias, EntityLocks); 096 } 097 098 /** 099 * Create a <code>entitylocks</code> table reference 100 */ 101 public EntityLocks() { 102 this(DSL.name("entitylocks"), null); 103 } 104 105 @Override 106 public UniqueKey<com.echothree.model.jooq.server.records.core.EntityLocks> getPrimaryKey() { 107 return KeyRegistry.ENTITY_LOCKS_PK; 108 } 109 110 @Override 111 public List<ForeignKey<com.echothree.model.jooq.server.records.core.EntityLocks, ?>> getReferences() { 112 return Arrays.asList(KeyRegistry.ENTITY_LOCKS_LOCKED_BY_ENTITY_INSTANCE_FK, KeyRegistry.ENTITY_LOCKS_LOCK_TARGET_ENTITY_INSTANCE_FK); 113 } 114 115 private transient EntityInstancesPath _lcks_lockedbyentityinstanceid_fk; 116 117 /** 118 * Get the implicit join path to the <code>entityinstances</code> table, via 119 * the <code>lcks_lockedbyentityinstanceid_fk</code> key. 120 */ 121 public EntityInstancesPath lcks_lockedbyentityinstanceid_fk() { 122 if (_lcks_lockedbyentityinstanceid_fk == null) 123 _lcks_lockedbyentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.ENTITY_LOCKS_LOCKED_BY_ENTITY_INSTANCE_FK, null); 124 125 return _lcks_lockedbyentityinstanceid_fk; 126 } 127 128 private transient EntityInstancesPath _lcks_locktargetentityinstanceid_fk; 129 130 /** 131 * Get the implicit join path to the <code>entityinstances</code> table, via 132 * the <code>lcks_locktargetentityinstanceid_fk</code> key. 133 */ 134 public EntityInstancesPath lcks_locktargetentityinstanceid_fk() { 135 if (_lcks_locktargetentityinstanceid_fk == null) 136 _lcks_locktargetentityinstanceid_fk = new EntityInstancesPath(this, KeyRegistry.ENTITY_LOCKS_LOCK_TARGET_ENTITY_INSTANCE_FK, null); 137 138 return _lcks_locktargetentityinstanceid_fk; 139 } 140 141 @Override 142 public EntityLocks as(String alias) { 143 return new EntityLocks(DSL.name(alias), this); 144 } 145 146 @Override 147 public EntityLocks as(Name alias) { 148 return new EntityLocks(alias, this); 149 } 150 151 @Override 152 public EntityLocks as(Table<?> alias) { 153 return new EntityLocks(alias.getQualifiedName(), this); 154 } 155 156 /** 157 * Rename this table 158 */ 159 @Override 160 public EntityLocks rename(String name) { 161 return new EntityLocks(DSL.name(name), null); 162 } 163 164 /** 165 * Rename this table 166 */ 167 @Override 168 public EntityLocks rename(Name name) { 169 return new EntityLocks(name, null); 170 } 171 172 /** 173 * Rename this table 174 */ 175 @Override 176 public EntityLocks rename(Table<?> name) { 177 return new EntityLocks(name.getQualifiedName(), null); 178 } 179 180 /** 181 * Create an inline derived table from this table 182 */ 183 @Override 184 public EntityLocks where(Condition condition) { 185 return new EntityLocks(getQualifiedName(), aliased() ? this : null, null, Internal.condition(this, condition)); 186 } 187 188 /** 189 * Create an inline derived table from this table 190 */ 191 @Override 192 public EntityLocks where(Collection<? extends Condition> conditions) { 193 return where(DSL.and(conditions)); 194 } 195 196 /** 197 * Create an inline derived table from this table 198 */ 199 @Override 200 public EntityLocks where(Condition... conditions) { 201 return where(DSL.and(conditions)); 202 } 203 204 /** 205 * Create an inline derived table from this table 206 */ 207 @Override 208 public EntityLocks where(Field<Boolean> condition) { 209 return where(DSL.condition(condition)); 210 } 211 212 /** 213 * Create an inline derived table from this table 214 */ 215 @Override 216 @PlainSQL 217 public EntityLocks where(SQL condition) { 218 return where(DSL.condition(condition)); 219 } 220 221 /** 222 * Create an inline derived table from this table 223 */ 224 @Override 225 @PlainSQL 226 public EntityLocks where(@Stringly.SQL String condition) { 227 return where(DSL.condition(condition)); 228 } 229 230 /** 231 * Create an inline derived table from this table 232 */ 233 @Override 234 @PlainSQL 235 public EntityLocks where(@Stringly.SQL String condition, Object... binds) { 236 return where(DSL.condition(condition, binds)); 237 } 238 239 /** 240 * Create an inline derived table from this table 241 */ 242 @Override 243 @PlainSQL 244 public EntityLocks where(@Stringly.SQL String condition, QueryPart... parts) { 245 return where(DSL.condition(condition, parts)); 246 } 247 248 /** 249 * Create an inline derived table from this table 250 */ 251 @Override 252 public EntityLocks whereExists(TableLike<?> select) { 253 return where(DSL.exists(select)); 254 } 255 256 /** 257 * Create an inline derived table from this table 258 */ 259 @Override 260 public EntityLocks whereNotExists(TableLike<?> select) { 261 return where(DSL.notExists(select)); 262 } 263}