Class CallableStatementWrapperFactory
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.component.sql.stored.CallableStatementWrapperFactory
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class CallableStatementWrapperFactory extends org.apache.camel.support.service.ServiceSupportStateful class that cached template functions.
-
-
Field Summary
Fields Modifier and Type Field Description static intBATCH_TEMPLATE_CACHE_DEFAULT_SIZEstatic intTEMPLATE_CACHE_DEFAULT_SIZE
-
Constructor Summary
Constructors Constructor Description CallableStatementWrapperFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, TemplateParser templateParser, boolean function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatementWrappercreate(String sql)protected voiddoStart()protected voiddoStop()org.springframework.jdbc.core.JdbcTemplategetJdbcTemplate()BatchCallableStatementCreatorFactorygetTemplateForBatch(String sql)TemplateStoredProceduregetTemplateStoredProcedure(String sql)-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
TEMPLATE_CACHE_DEFAULT_SIZE
public static final int TEMPLATE_CACHE_DEFAULT_SIZE
- See Also:
- Constant Field Values
-
BATCH_TEMPLATE_CACHE_DEFAULT_SIZE
public static final int BATCH_TEMPLATE_CACHE_DEFAULT_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CallableStatementWrapperFactory
public CallableStatementWrapperFactory(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, TemplateParser templateParser, boolean function)
-
-
Method Detail
-
create
public StatementWrapper create(String sql) throws SQLException
- Throws:
SQLException
-
getTemplateForBatch
public BatchCallableStatementCreatorFactory getTemplateForBatch(String sql)
-
getTemplateStoredProcedure
public TemplateStoredProcedure getTemplateStoredProcedure(String sql)
-
getJdbcTemplate
public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
-
doStart
protected void doStart() throws Exception- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
-