org.apache.camel.processor.idempotent.jdbc
Class JdbcMessageIdRepository

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository<String>
          extended by org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository
All Implemented Interfaces:
org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.IdempotentRepository<String>, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class JdbcMessageIdRepository
extends AbstractJdbcMessageIdRepository<String>

Default implementation of AbstractJdbcMessageIdRepository


Field Summary
static String DELETE_STRING
           
static String INSERT_STRING
           
static String QUERY_STRING
           
 
Fields inherited from class org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository
dataSource, jdbcTemplate, processorName, transactionTemplate
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
JdbcMessageIdRepository()
           
JdbcMessageIdRepository(DataSource dataSource, String processorName)
           
JdbcMessageIdRepository(DataSource dataSource, org.springframework.transaction.support.TransactionTemplate transactionTemplate, String processorName)
           
JdbcMessageIdRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.transaction.support.TransactionTemplate transactionTemplate)
           
 
Method Summary
protected  int delete(String key)
          Operations that deletes the key if it exists
protected  int insert(String key)
          Operation that inserts the key if it does not already exist
protected  int queryForInt(String key)
          Operation that returns the number of rows, if any, for the specified key
 
Methods inherited from class org.apache.camel.processor.idempotent.jdbc.AbstractJdbcMessageIdRepository
add, confirm, contains, createTransactionTemplate, doStart, doStop, getDataSource, getJdbcTemplate, getProcessorName, getTransactionTemplate, remove, setDataSource, setJdbcTemplate, setProcessorName, setTransactionTemplate
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

QUERY_STRING

public static final String QUERY_STRING
See Also:
Constant Field Values

INSERT_STRING

public static final String INSERT_STRING
See Also:
Constant Field Values

DELETE_STRING

public static final String DELETE_STRING
See Also:
Constant Field Values
Constructor Detail

JdbcMessageIdRepository

public JdbcMessageIdRepository()

JdbcMessageIdRepository

public JdbcMessageIdRepository(DataSource dataSource,
                               String processorName)

JdbcMessageIdRepository

public JdbcMessageIdRepository(DataSource dataSource,
                               org.springframework.transaction.support.TransactionTemplate transactionTemplate,
                               String processorName)

JdbcMessageIdRepository

public JdbcMessageIdRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                               org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Method Detail

queryForInt

protected int queryForInt(String key)
Description copied from class: AbstractJdbcMessageIdRepository
Operation that returns the number of rows, if any, for the specified key

Specified by:
queryForInt in class AbstractJdbcMessageIdRepository<String>
Parameters:
key - the key
Returns:
int number of rows

insert

protected int insert(String key)
Description copied from class: AbstractJdbcMessageIdRepository
Operation that inserts the key if it does not already exist

Specified by:
insert in class AbstractJdbcMessageIdRepository<String>
Parameters:
key - the key
Returns:
int number of rows inserted

delete

protected int delete(String key)
Description copied from class: AbstractJdbcMessageIdRepository
Operations that deletes the key if it exists

Specified by:
delete in class AbstractJdbcMessageIdRepository<String>
Parameters:
key - the key
Returns:
int number of rows deleted


Apache CAMEL