Package cc.carm.lib.easysql.action
Class AbstractSQLAction<T>
- java.lang.Object
-
- cc.carm.lib.easysql.action.AbstractSQLAction<T>
-
- All Implemented Interfaces:
SQLAction<T>
- Direct Known Subclasses:
PreparedSQLBatchUpdateActionImpl,QueryActionImpl,SQLUpdateActionImpl,SQLUpdateBatchActionImpl
public abstract class AbstractSQLAction<T> extends java.lang.Object implements SQLAction<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.StringsqlContent
-
Constructor Summary
Constructors Constructor Description AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql)AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql, long createTime)AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql, @NotNull java.util.UUID uuid)AbstractSQLAction(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql, @NotNull java.util.UUID uuid, long createTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAsync(SQLHandler<T> success, SQLExceptionHandler failure)异步执行SQL语句@NotNull java.util.UUIDgetActionUUID()得到该Action的UUIDlonggetCreateTime()得到该Action的创建时间@NotNull SQLManagerImplgetManager()得到承载该Action的对应SQLManager@NotNull java.lang.StringgetShortID()得到短八位格式的UUID@NotNull java.lang.StringgetSQLContent()得到该Action所要执行的源SQL语句protected voidoutputDebugMessage()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cc.carm.lib.easysql.api.SQLAction
defaultExceptionHandler, execute, execute, execute, execute, executeAsync, executeAsync, executeFunction, executeFunction, handleException, setExceptionHandler
-
-
-
-
Constructor Detail
-
AbstractSQLAction
public AbstractSQLAction(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql)
-
AbstractSQLAction
public AbstractSQLAction(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql, @NotNull @NotNull java.util.UUID uuid)
-
AbstractSQLAction
public AbstractSQLAction(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql, long createTime)
-
AbstractSQLAction
public AbstractSQLAction(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql, @NotNull @NotNull java.util.UUID uuid, long createTime)
-
-
Method Detail
-
getActionUUID
@NotNull public @NotNull java.util.UUID getActionUUID()
Description copied from interface:SQLAction得到该Action的UUID- Specified by:
getActionUUIDin interfaceSQLAction<T>- Returns:
- UUID
-
getShortID
@NotNull public @NotNull java.lang.String getShortID()
Description copied from interface:SQLAction得到短八位格式的UUID- Specified by:
getShortIDin interfaceSQLAction<T>- Returns:
- UUID(8)
-
getCreateTime
public long getCreateTime()
Description copied from interface:SQLAction得到该Action的创建时间- Specified by:
getCreateTimein interfaceSQLAction<T>- Returns:
- 创建时间
-
getSQLContent
@NotNull public @NotNull java.lang.String getSQLContent()
Description copied from interface:SQLAction得到该Action所要执行的源SQL语句- Specified by:
getSQLContentin interfaceSQLAction<T>- Returns:
- 源SQL语句
-
getManager
@NotNull public @NotNull SQLManagerImpl getManager()
Description copied from interface:SQLAction得到承载该Action的对应SQLManager- Specified by:
getManagerin interfaceSQLAction<T>- Returns:
SQLManager
-
outputDebugMessage
protected void outputDebugMessage()
-
executeAsync
public void executeAsync(SQLHandler<T> success, SQLExceptionHandler failure)
Description copied from interface:SQLAction异步执行SQL语句- Specified by:
executeAsyncin interfaceSQLAction<T>- Parameters:
success- 成功时的操作failure- 异常处理器 默认为SQLAction.defaultExceptionHandler()
-
-