java.lang.Object
io.ebeaninternal.server.querydefn.DefaultOrmUpdate<T>
- All Implemented Interfaces:
Update<T>,SpiUpdate<T>,Serializable
Default implementation of OrmUpdate.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.ebeaninternal.api.SpiUpdate
SpiUpdate.OrmUpdateType -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOrmUpdate(Class<?> beanType, Database server, String baseTable, String updateStatement) Create with a specific server. -
Method Summary
Modifier and TypeMethodDescriptionReturn the name of the table being modified.Class<?> beanType()Return the type of bean being updated.Return the bind parameters.intexecute()getName()booleanReturn true if the cache should be notified so that invalidates appropriate objects.label()Return the label (for metrics collection).Return the type of this - insert, update or delete.voidsetGeneratedSql(String generatedSql) Set the generated sql used.setNotifyCache(boolean notifyCache) Set this to false if you don't want eBean to automatically deduce the table modification information and process it.setNull(int position, int jdbcType) setNullParameter(int position, int jdbcType) setNullParameter(String name, int jdbcType) setParameter(int position, Object value) setParameter(String name, Object param) setTimeout(int secs) inttimeout()Return the timeout in seconds.Return the update statement.
-
Constructor Details
-
Method Details
-
setTimeout
- Specified by:
setTimeoutin interfaceUpdate<T>
-
beanType
Description copied from interface:SpiUpdateReturn the type of bean being updated. -
timeout
public int timeout()Return the timeout in seconds. -
execute
public int execute() -
setNotifyCache
Set this to false if you don't want eBean to automatically deduce the table modification information and process it.Set this to false if you don't want any cache invalidation or text index management to occur. You may do this when say you update only one column and you know that it is not important for cached objects or text indexes.
- Specified by:
setNotifyCachein interfaceUpdate<T>
-
isNotifyCache
public boolean isNotifyCache()Return true if the cache should be notified so that invalidates appropriate objects.- Specified by:
isNotifyCachein interfaceSpiUpdate<T>
-
getName
-
setLabel
-
label
Description copied from interface:SpiUpdateReturn the label (for metrics collection). -
updateStatement
Description copied from interface:SpiUpdateReturn the update statement. This could be either sql or an orm update with bean types and property names.- Specified by:
updateStatementin interfaceSpiUpdate<T>
-
set
-
setParameter
- Specified by:
setParameterin interfaceUpdate<T>
-
setNull
-
setNullParameter
- Specified by:
setNullParameterin interfaceUpdate<T>
-
set
-
setParameter
- Specified by:
setParameterin interfaceUpdate<T>
-
setNull
-
setNullParameter
- Specified by:
setNullParameterin interfaceUpdate<T>
-
bindParams
Return the bind parameters.- Specified by:
bindParamsin interfaceSpiUpdate<T>
-
getGeneratedSql
- Specified by:
getGeneratedSqlin interfaceUpdate<T>
-
setGeneratedSql
Description copied from interface:SpiUpdateSet the generated sql used.- Specified by:
setGeneratedSqlin interfaceSpiUpdate<T>
-
baseTable
Description copied from interface:SpiUpdateReturn the name of the table being modified. -
ormUpdateType
Description copied from interface:SpiUpdateReturn the type of this - insert, update or delete.- Specified by:
ormUpdateTypein interfaceSpiUpdate<T>
-