@ComponentProfile(summary="Create a sequence number using a database, the sequence number is associated with a static value", tag="service,metadata,jdbc,sequence") public class StaticIdentitySequenceNumberService extends AbstractJdbcSequenceNumberService
The default database schema is assumed to be
CREATE TABLE SEQUENCES (ID VARCHAR(255) NOT NULL, SEQ_NUMBER INT)
The default SQL statements reflect this; and provided that a table called 'SEQUENCES' contains at least those two columns
then it should work without any changes to the SQL statements. Be aware that all statements default to upper-case which will have
an impact if your database is case-sensitive (such as MySQL on Linux).
In the adapter configuration file this class is aliased as jdbc-sequence-number-service which is the preferred alternative to the fully qualified classname when building your configuration.
AbstractJdbcSequenceNumberService.OverflowBehaviour
DEFAULT_INSERT_STATEMENT, DEFAULT_RESET_STATEMENT, DEFAULT_SELECT_STATEMENT, DEFAULT_UPDATE_STATEMENT
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
StaticIdentitySequenceNumberService() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIdentity() |
protected java.lang.String |
getIdentity(AdaptrisMessage msg)
Get the appropriate identity from the msg.
|
void |
setIdentity(java.lang.String id)
Set the identity that will be used as part of the standard SQL statements.
|
closeJdbcService, doService, exceedsMaxSequence, getAlwaysReplaceMetadata, getCreateDatabase, getInsertStatement, getMaximumSequenceNumber, getMetadataKey, getNumberFormat, getOverflowBehaviour, getResetStatement, getSelectStatement, getUpdateStatement, hasOverflowed, initJdbcService, prepareService, setAlwaysReplaceMetadata, setCreateDatabase, setInsertStatement, setMaximumSequenceNumber, setMetadataKey, setNumberFormat, setOverflowBehaviour, setResetStatement, setSelectStatement, setUpdateStatement, startService, stopService
applyTimeout, closeService, commit, createStatement, getConnection, getConnection, getStatementTimeout, initService, prepare, prepareStatement, prepareStatement, rollback, setConnection, setStatementTimeout, start, stop
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, isBranching, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init
getLookupName
public java.lang.String getIdentity()
public void setIdentity(java.lang.String id)
id
- the identiy, the default is null which means that SQL statements are assumed to not require parameters.protected java.lang.String getIdentity(AdaptrisMessage msg)
AbstractJdbcSequenceNumberService
For sequence numbers, the identity returned here will be used as a substitution for an SQL statement.
getIdentity
in class AbstractJdbcSequenceNumberService
msg
- the message currently being processed