public class BehaviorCommandInvoker extends Object
public interface methods are as follows: o clearExecutionCache(); o isExecutionCacheEmpty(); o getExecutionCacheSize(); o injectComponentProperty(BehaviorCommandComponentSetup behaviorCommand); o invoke(BehaviorCommand behaviorCommand); o createOutsideSqlBasicExecutor(String tableDbName); o createBehaviorExceptionThrower(); o getSequenceCacheHandler();
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected InvokerAssistant.DisposableProcess |
_disposableProcess |
protected Object |
_executionCacheLock
The lock object to synchronize the execution map for transaction.
|
protected Map<String,SqlExecution> |
_executionMap
The map of SQL execution.
|
protected InvokerAssistant |
_invokerAssistant |
| コンストラクタと説明 |
|---|
BehaviorCommandInvoker() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
assertCreatorReturnExecution(String key,
SqlExecutionCreator executionCreator,
SqlExecution execution) |
protected void |
assertInvokerAssistant() |
protected void |
assertRetType(Class<?> retType,
Object ret) |
protected String |
buildFitBorder(String prefix,
String element,
String lengthTargetString,
boolean space) |
protected <RESULT> BehaviorInvokePathResult |
buildInvokePath(BehaviorCommand<RESULT> behaviorCommand,
StackTraceElement[] stackTrace,
BehaviorInvokeNameResult behaviorInvokeNameResult) |
protected <RESULT> void |
callbackSqlResultHanler(BehaviorCommand<RESULT> behaviorCommand,
SqlResultHandler sqlResultHander,
Object ret,
Long commandBefore,
Long commandAfter,
RuntimeException cause) |
protected void |
clearAllCurrentContext() |
void |
clearExecutionCache() |
protected void |
closeContext() |
protected Object |
convertNumber(Object ret,
Class<?> retType) |
protected Object |
convertPrimitiveWrapper(Object ret,
Class<?> retType) |
protected Object |
convertReturnValueIfNeeds(Object ret,
Class<?> retType) |
BehaviorExceptionThrower |
createBehaviorExceptionThrower()
Get the thrower of behavior exception.
|
protected BehaviorInvokeNameExtractor |
createBehaviorInvokeNameExtractor(DBMeta dbmeta,
Class<?> outsideSqlResultType,
boolean outsideSqlAutoPaging) |
protected BehaviorResultBuilder |
createBehaviorResultBuilder() |
<BEHAVIOR> OutsideSqlAllFacadeExecutor<BEHAVIOR> |
createOutsideSqlAllFacadeExecutor(String tableDbName) |
protected BehaviorInvokeNameResult |
createUnknownInvokeNameResult() |
protected long |
deriveCommandBeforeAfterTimeIfNeeds(boolean logEnabled,
boolean hasSqlResultHandler) |
protected <RESULT> RESULT |
dispatchInvoking(BehaviorCommand<RESULT> behaviorCommand) |
protected Object |
executeSql(SqlExecution execution,
Object[] args) |
protected <RESULT> BehaviorInvokeNameResult |
extractBehaviorInvoke(BehaviorCommand<RESULT> behaviorCommand,
StackTraceElement[] stackTrace) |
protected <RESULT> SqlExecution |
findSqlExecution(BehaviorCommand<RESULT> behaviorCommand) |
int |
getExecutionCacheSize() |
protected SqlExecution |
getOrCreateSqlExecution(String key,
SqlExecutionCreator executionCreator)
Get SQL-execution that may be created if it does not exist.
|
protected OutsideSqlContext |
getOutsideSqlContext() |
protected ResourceContext |
getParentContext() |
RelationOptionalFactory |
getRelationOptionalFactory()
Get the factory of relation optional.
|
protected <RESULT> SqlLogInfo |
getResultSqlLogInfo(BehaviorCommand<RESULT> behaviorCommand) |
SequenceCacheHandler |
getSequenceCacheHandler()
Get the handler of sequence cache.
|
SQLExceptionDigger |
getSQLExceptionDigger()
Get the digger of SQLException.
|
protected SqlExecution |
getSqlExecution(String key)
Get SQL-execution if it exists.
|
protected String |
getSqlFileEncoding() |
protected SqlResultHandler |
getSqlResultHander() |
protected void |
handleExecutionException(RuntimeException cause) |
protected void |
handleSQLException(SQLException e) |
protected void |
initializeContext() |
protected <RESULT> void |
initializeSqlExecution(BehaviorCommand<RESULT> behaviorCommand) |
void |
injectComponentProperty(BehaviorCommandComponentSetup behaviorCommand)
Inject the properties of component to the command of behavior.
|
<RESULT> RESULT |
invoke(BehaviorCommand<RESULT> behaviorCommand)
Invoke the command of behavior.
|
boolean |
isExecutionCacheEmpty() |
protected boolean |
isLogEnabled() |
protected boolean |
isRecursiveInvoking() |
protected String |
ln() |
protected void |
log(String msg) |
protected <RESULT> void |
logInvocation(BehaviorCommand<RESULT> behaviorCommand,
boolean saveOnly) |
protected <RESULT> void |
logResult(BehaviorCommand<RESULT> behaviorCommand,
Class<?> retType,
Object ret,
long before,
long after) |
protected <RESULT> void |
logSqlExecution(BehaviorCommand<RESULT> behaviorCommand,
SqlExecution execution,
long beforeCmd,
long afterCmd) |
protected <KEY,VALUE> |
newConcurrentHashMap() |
protected <RESULT> void |
processBeforeHook(BehaviorCommand<RESULT> behaviorCommand) |
protected <RESULT> void |
processFinallyHook(BehaviorCommand<RESULT> behaviorCommand,
RuntimeException cause) |
protected <RESULT> void |
readyInvokePath(BehaviorCommand<RESULT> behaviorCommand) |
protected void |
restoreAllContextOnThreadIfExists() |
protected void |
saveAllContextOnThread() |
protected void |
saveBehaviorInvokeName(BehaviorInvokeNameResult behaviorInvokeNameResult) |
protected void |
saveByPassInvokeName(BehaviorInvokePathResult invokePathResult) |
protected void |
saveClientInvokeName(BehaviorInvokePathResult invokePathResult) |
protected void |
saveInvokePath(BehaviorInvokePathResult invokePathResult) |
void |
setInvokerAssistant(InvokerAssistant invokerAssistant) |
protected <RESULT> void |
setupResourceContext(BehaviorCommand<RESULT> behaviorCommand,
ResourceContext parentContext) |
protected long |
systemTime() |
protected void |
toBeDisposable() |
protected InvokerAssistant _invokerAssistant
protected final Map<String,SqlExecution> _executionMap
protected final Object _executionCacheLock
protected final InvokerAssistant.DisposableProcess _disposableProcess
public void clearExecutionCache()
public boolean isExecutionCacheEmpty()
public int getExecutionCacheSize()
public void injectComponentProperty(BehaviorCommandComponentSetup behaviorCommand)
behaviorCommand - The command of behavior. (NotNull)protected String getSqlFileEncoding()
public <RESULT> RESULT invoke(BehaviorCommand<RESULT> behaviorCommand)
RESULT - The type of result.behaviorCommand - The command of behavior. (NotNull)protected <RESULT> void setupResourceContext(BehaviorCommand<RESULT> behaviorCommand, ResourceContext parentContext)
protected <RESULT> void processBeforeHook(BehaviorCommand<RESULT> behaviorCommand)
protected <RESULT> void processFinallyHook(BehaviorCommand<RESULT> behaviorCommand, RuntimeException cause)
protected <RESULT> RESULT dispatchInvoking(BehaviorCommand<RESULT> behaviorCommand)
RESULT - The type of result.behaviorCommand - The command of behavior. (NotNull)protected long deriveCommandBeforeAfterTimeIfNeeds(boolean logEnabled,
boolean hasSqlResultHandler)
protected long systemTime()
protected void handleExecutionException(RuntimeException cause)
protected void handleSQLException(SQLException e)
protected <RESULT> void callbackSqlResultHanler(BehaviorCommand<RESULT> behaviorCommand, SqlResultHandler sqlResultHander, Object ret, Long commandBefore, Long commandAfter, RuntimeException cause)
protected <RESULT> SqlLogInfo getResultSqlLogInfo(BehaviorCommand<RESULT> behaviorCommand)
protected <RESULT> SqlExecution findSqlExecution(BehaviorCommand<RESULT> behaviorCommand)
protected <RESULT> void initializeSqlExecution(BehaviorCommand<RESULT> behaviorCommand)
protected SqlExecution getSqlExecution(String key)
key - The key of SQL execution. (NotNull)protected SqlExecution getOrCreateSqlExecution(String key, SqlExecutionCreator executionCreator)
key - The key of SQL-execution. (NotNull)executionCreator - The creator of SQL-execution. (NotNull)protected void assertCreatorReturnExecution(String key, SqlExecutionCreator executionCreator, SqlExecution execution)
protected Object executeSql(SqlExecution execution, Object[] args)
protected <RESULT> void logSqlExecution(BehaviorCommand<RESULT> behaviorCommand, SqlExecution execution, long beforeCmd, long afterCmd)
protected <RESULT> void logInvocation(BehaviorCommand<RESULT> behaviorCommand, boolean saveOnly)
protected <RESULT> BehaviorInvokeNameResult extractBehaviorInvoke(BehaviorCommand<RESULT> behaviorCommand, StackTraceElement[] stackTrace)
protected BehaviorInvokeNameResult createUnknownInvokeNameResult()
protected BehaviorInvokeNameExtractor createBehaviorInvokeNameExtractor(DBMeta dbmeta, Class<?> outsideSqlResultType, boolean outsideSqlAutoPaging)
protected String buildFitBorder(String prefix, String element, String lengthTargetString, boolean space)
protected <RESULT> BehaviorInvokePathResult buildInvokePath(BehaviorCommand<RESULT> behaviorCommand, StackTraceElement[] stackTrace, BehaviorInvokeNameResult behaviorInvokeNameResult)
protected void saveBehaviorInvokeName(BehaviorInvokeNameResult behaviorInvokeNameResult)
protected void saveClientInvokeName(BehaviorInvokePathResult invokePathResult)
protected void saveByPassInvokeName(BehaviorInvokePathResult invokePathResult)
protected void saveInvokePath(BehaviorInvokePathResult invokePathResult)
protected <RESULT> void logResult(BehaviorCommand<RESULT> behaviorCommand, Class<?> retType, Object ret, long before, long after)
protected BehaviorResultBuilder createBehaviorResultBuilder()
protected <RESULT> void readyInvokePath(BehaviorCommand<RESULT> behaviorCommand)
protected ResourceContext getParentContext()
protected void initializeContext()
protected boolean isRecursiveInvoking()
protected void closeContext()
protected void saveAllContextOnThread()
protected void restoreAllContextOnThreadIfExists()
protected void clearAllCurrentContext()
protected OutsideSqlContext getOutsideSqlContext()
protected SqlResultHandler getSqlResultHander()
protected void log(String msg)
protected boolean isLogEnabled()
protected void toBeDisposable()
public RelationOptionalFactory getRelationOptionalFactory()
public <BEHAVIOR> OutsideSqlAllFacadeExecutor<BEHAVIOR> createOutsideSqlAllFacadeExecutor(String tableDbName)
BEHAVIOR - The type of behavior.tableDbName - The DB name of table. (NotNull)public SQLExceptionDigger getSQLExceptionDigger()
public SequenceCacheHandler getSequenceCacheHandler()
public BehaviorExceptionThrower createBehaviorExceptionThrower()
protected void assertInvokerAssistant()
protected <KEY,VALUE> ConcurrentHashMap<KEY,VALUE> newConcurrentHashMap()
protected String ln()
public void setInvokerAssistant(InvokerAssistant invokerAssistant)
Copyright © 2014–2015 The DBFlute Project. All rights reserved.