org.jboss.soa.esb.addressing.eprs
Class JDBCEpr

java.lang.Object
  extended by org.jboss.soa.esb.addressing.EPR
      extended by org.jboss.soa.esb.addressing.eprs.JDBCEpr

public class JDBCEpr
extends EPR

A helper class for using database style EPRs. Simply create instances of this class instead of the base EPR.

Author:
marklittle

Field Summary
static java.lang.String DATA_COLUMN_TAG
           
static java.lang.String DATASOURCE_TAG
           
static java.lang.String DEFAULT_REPLY_TO_TABLE_SUFFIX
           
static java.lang.String DRIVER_TAG
           
static java.lang.String ERROR_DEL_TAG
           
static java.lang.String JDBC_PROTOCOL
           
static java.lang.String MESSAGE_ID_COLUMN_TAG
           
static java.lang.String ORDER_BY_TAG
           
static java.lang.String PASSWORD_TAG
           
static java.lang.String POST_DEL_TAG
           
static java.lang.String RETRY_COUNT_COLUMN_TAG
           
static java.lang.String SQL_TAG
           
static java.lang.String STATUS_COLUMN_TAG
           
static java.lang.String TABLE_NAME_TAG
           
static java.lang.String TIMESTAMP_COLUMN_TAG
           
static java.lang.String URL_TAG
           
static java.lang.String USERNAME_TAG
           
static java.lang.String WHERE_CONDITION_TAG
           
 
Fields inherited from class org.jboss.soa.esb.addressing.EPR
_logger, EPR_TYPE
 
Constructor Summary
  JDBCEpr(EPR epr)
           
  JDBCEpr(EPR epr, org.w3c.dom.Element header)
           
  JDBCEpr(java.lang.String url)
           
  JDBCEpr(java.lang.String url, boolean postDelete, boolean errorDelete)
           
  JDBCEpr(java.lang.String url, java.lang.String sql)
           
protected JDBCEpr(java.net.URI uri)
           
 
Method Summary
protected  void changeTableName(java.lang.String tableName)
           
 EPR copy()
          Return a copy of this EPR.
 java.lang.String getDataColumn()
           
 java.lang.String getDatasource()
          Get the JNDI datasource value that is used by this EPR.
 java.lang.String getDriver()
           
 java.lang.String getErrorDelete()
           
 java.lang.String getMessageIdColumn()
           
 java.lang.String getPassword()
           
 java.lang.String getPostDelete()
           
 java.lang.String getRetryCountColumn()
           
 java.lang.String getSQL()
           
 java.lang.String getStatusColumn()
           
 java.lang.String getTableName()
           
 java.lang.String getTimestampColumn()
           
 java.lang.String getURL()
          Get the URL address.
 java.lang.String getUserName()
           
 void setDataColumn(java.lang.String dataColumn)
          Set the column that is used by this EPR to store message data.
 void setDatasource(java.lang.String datasource)
          Set the JNDI datasource value that is used by this EPR.
 void setDriver(java.lang.String driver)
          Set the driver that is used by this EPR.
 void setMessageIdColumn(java.lang.String columnName)
          Set the message id column name that is used by this EPR.
 void setPassword(java.lang.String password)
          Set the password for this FTP EPR.
 void setRetryCountColumn(java.lang.String columnName)
          Set the retry count column name that is used by this EPR.
 void setSQL(java.lang.String sql)
          Set the SQL command that is used by this EPR.
 void setStatusColumn(java.lang.String statusColumn)
          Set the status column that is used by this EPR.
 void setTableName(java.lang.String tableName)
          Set the tablename that is used by this EPR.
 void setTimestampColumn(java.lang.String timeColumn)
          Set the column that is used by this EPR to store timestamp when the message was inserted.
 void setURL(java.lang.String url)
          Set the URL for this endpoint.
 void setUserName(java.lang.String username)
          Set the username for this FTP EPR.
 java.lang.String toString()
           
static java.net.URI type()
           
 
Methods inherited from class org.jboss.soa.esb.addressing.EPR
equals, getAddr, getURI, hashCode, setAddr, setType, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JDBC_PROTOCOL

public static final java.lang.String JDBC_PROTOCOL
See Also:
Constant Field Values

DATASOURCE_TAG

public static final java.lang.String DATASOURCE_TAG
See Also:
Constant Field Values

USERNAME_TAG

public static final java.lang.String USERNAME_TAG
See Also:
Constant Field Values

PASSWORD_TAG

public static final java.lang.String PASSWORD_TAG
See Also:
Constant Field Values

SQL_TAG

public static final java.lang.String SQL_TAG
See Also:
Constant Field Values

DRIVER_TAG

public static final java.lang.String DRIVER_TAG
See Also:
Constant Field Values

URL_TAG

public static final java.lang.String URL_TAG
See Also:
Constant Field Values

TABLE_NAME_TAG

public static final java.lang.String TABLE_NAME_TAG
See Also:
Constant Field Values

ORDER_BY_TAG

public static final java.lang.String ORDER_BY_TAG
See Also:
Constant Field Values

MESSAGE_ID_COLUMN_TAG

public static final java.lang.String MESSAGE_ID_COLUMN_TAG
See Also:
Constant Field Values

STATUS_COLUMN_TAG

public static final java.lang.String STATUS_COLUMN_TAG
See Also:
Constant Field Values

RETRY_COUNT_COLUMN_TAG

public static final java.lang.String RETRY_COUNT_COLUMN_TAG
See Also:
Constant Field Values

DATA_COLUMN_TAG

public static final java.lang.String DATA_COLUMN_TAG
See Also:
Constant Field Values

TIMESTAMP_COLUMN_TAG

public static final java.lang.String TIMESTAMP_COLUMN_TAG
See Also:
Constant Field Values

WHERE_CONDITION_TAG

public static final java.lang.String WHERE_CONDITION_TAG
See Also:
Constant Field Values

POST_DEL_TAG

public static final java.lang.String POST_DEL_TAG
See Also:
Constant Field Values

ERROR_DEL_TAG

public static final java.lang.String ERROR_DEL_TAG
See Also:
Constant Field Values

DEFAULT_REPLY_TO_TABLE_SUFFIX

public static final java.lang.String DEFAULT_REPLY_TO_TABLE_SUFFIX
See Also:
Constant Field Values
Constructor Detail

JDBCEpr

public JDBCEpr(EPR epr)

JDBCEpr

public JDBCEpr(EPR epr,
               org.w3c.dom.Element header)

JDBCEpr

public JDBCEpr(java.lang.String url,
               java.lang.String sql)
        throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

JDBCEpr

public JDBCEpr(java.lang.String url)
        throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

JDBCEpr

public JDBCEpr(java.lang.String url,
               boolean postDelete,
               boolean errorDelete)
        throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

JDBCEpr

protected JDBCEpr(java.net.URI uri)
Method Detail

copy

public EPR copy()
Description copied from class: EPR
Return a copy of this EPR.

Overrides:
copy in class EPR

setURL

public final void setURL(java.lang.String url)
Set the URL for this endpoint.

Parameters:
url - the address.

getURL

public final java.lang.String getURL()
Get the URL address.

Returns:
the address.

setUserName

public final void setUserName(java.lang.String username)
                       throws java.net.URISyntaxException
Set the username for this FTP EPR.

Parameters:
username - the user's name.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getUserName

public final java.lang.String getUserName()
Returns:
the user's name associated with this EPR.

setPassword

public final void setPassword(java.lang.String password)
                       throws java.net.URISyntaxException
Set the password for this FTP EPR.

Parameters:
password - the user's name.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getPassword

public final java.lang.String getPassword()
Returns:
the password associated with this EPR.

setDatasource

public final void setDatasource(java.lang.String datasource)
Set the JNDI datasource value that is used by this EPR.

Parameters:
datasource - JNDI datasource

getDatasource

public final java.lang.String getDatasource()
Get the JNDI datasource value that is used by this EPR.

Returns:
datasource

setSQL

public final void setSQL(java.lang.String sql)
                  throws java.net.URISyntaxException
Set the SQL command that is used by this EPR.

Parameters:
sql - the statement.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getSQL

public final java.lang.String getSQL()
Returns:
the SQL statement for this EPR.

setDriver

public final void setDriver(java.lang.String driver)
                     throws java.net.URISyntaxException
Set the driver that is used by this EPR.

Parameters:
driver - the driver.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getDriver

public final java.lang.String getDriver()
Returns:
the driver used by this EPR.

setTableName

public final void setTableName(java.lang.String tableName)
                        throws java.net.URISyntaxException
Set the tablename that is used by this EPR.

Parameters:
tableName - the table name.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getTableName

public final java.lang.String getTableName()
Returns:
the table name used by this EPR.

setMessageIdColumn

public final void setMessageIdColumn(java.lang.String columnName)
                              throws java.net.URISyntaxException
Set the message id column name that is used by this EPR.

Parameters:
columnName - the column name for the message ID.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getMessageIdColumn

public final java.lang.String getMessageIdColumn()
Returns:
the message id column used by this EPR.

setRetryCountColumn

public final void setRetryCountColumn(java.lang.String columnName)
                               throws java.net.URISyntaxException
Set the retry count column name that is used by this EPR.

Parameters:
columnName - the column name for the retry count.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getRetryCountColumn

public final java.lang.String getRetryCountColumn()
Returns:
the retry count column used by this EPR.

setStatusColumn

public final void setStatusColumn(java.lang.String statusColumn)
                           throws java.net.URISyntaxException
Set the status column that is used by this EPR.

Parameters:
statusColumn - the status column.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getStatusColumn

public final java.lang.String getStatusColumn()
Returns:
the status column name used by this EPR.

setDataColumn

public final void setDataColumn(java.lang.String dataColumn)
                         throws java.net.URISyntaxException
Set the column that is used by this EPR to store message data.

Parameters:
dataColumn - the column name.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getDataColumn

public final java.lang.String getDataColumn()
Returns:
the data column name used by this EPR.

setTimestampColumn

public final void setTimestampColumn(java.lang.String timeColumn)
                              throws java.net.URISyntaxException
Set the column that is used by this EPR to store timestamp when the message was inserted.

Parameters:
timeColumn - the column name.
Throws:
java.net.URISyntaxException - thrown if this EPR is malformed.

getTimestampColumn

public final java.lang.String getTimestampColumn()
Returns:
the timestamp column name used by this EPR.

getPostDelete

public final java.lang.String getPostDelete()

getErrorDelete

public final java.lang.String getErrorDelete()

toString

public java.lang.String toString()
Overrides:
toString in class EPR

type

public static final java.net.URI type()

changeTableName

protected final void changeTableName(java.lang.String tableName)
                              throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException