|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.JdbcHelper
Field Summary | |
static java.lang.Boolean |
supportsLikeEscapeClause
Determine if the server configuration supports the LIKE ESCAPE clause. |
Constructor Summary | |
JdbcHelper()
Helper constructor comment. |
Method Summary | |
static java.lang.Object |
deserialize(java.sql.ResultSet rs,
int index)
Convenience method for de-serializing an object from a JDBC source. |
static double |
getDouble(java.sql.ResultSet rs,
int index)
Retrieve a double value from the ResultSet at the given index. |
static double |
getDouble(java.sql.ResultSet rs,
java.lang.String colName)
Retrieve a double value from the ResultSet at the given column. |
static float |
getFloat(java.sql.ResultSet rs,
int index)
Retrieve a float value from the ResultSet at the given index. |
static float |
getFloat(java.sql.ResultSet rs,
java.lang.String colName)
Retrieve a float value from the ResultSet at the given column. |
static int |
getInt(java.sql.ResultSet rs,
int index)
Retrieve an int value from the ResultSet at the given index. |
static int |
getInt(java.sql.ResultSet rs,
java.lang.String colName)
Retrieve an int value from the ResultSet at the given column. |
static long |
getLong(java.sql.ResultSet rs,
int index)
Retrieve a long value from the ResultSet at the given index. |
static long |
getLong(java.sql.ResultSet rs,
java.lang.String colName)
Retrieve a long value from the ResultSet at the given column. |
static void |
main(java.lang.String[] args)
|
static void |
serialize(java.sql.PreparedStatement ps,
int index,
java.io.Serializable obj)
Convenience method for serializing an object to a JDBC stream. |
static boolean |
supportsLikeEscapeClause(java.sql.Connection con)
Determine if the given connection supports the LIKE ESCAPE clause. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.Boolean supportsLikeEscapeClause
This variable will initialized from the "commerce.jdbc.supportsLikeEscapeClause" property in weblogiccommerce.properties.
If this is null, then no configuration was specified and the JDBC connection should be queries. Otherwise, this will be true or false.
Constructor Detail |
public JdbcHelper()
Method Detail |
public static void serialize(java.sql.PreparedStatement ps, int index, java.io.Serializable obj) throws java.sql.SQLException, java.io.IOException
ps
- PreparedStatement.index
- placeholder index of the serialized object.obj
- Object to be serialized.public static java.lang.Object deserialize(java.sql.ResultSet rs, int index) throws java.sql.SQLException, java.io.IOException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException
ps
- Result Set.index
- table column index.public static boolean supportsLikeEscapeClause(java.sql.Connection con)
This first checks the supportsLikeEscapeClause
varaible. It
then checks with the Connection DatabaseMetaData.
public static int getInt(java.sql.ResultSet rs, int index) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.index
- the column index.public static int getInt(java.sql.ResultSet rs, java.lang.String colName) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.colName
- the column name.public static long getLong(java.sql.ResultSet rs, int index) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.index
- the column index.public static long getLong(java.sql.ResultSet rs, java.lang.String colName) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.colName
- the column name.public static float getFloat(java.sql.ResultSet rs, int index) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.index
- the column index.public static float getFloat(java.sql.ResultSet rs, java.lang.String colName) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.colName
- the column name.public static double getDouble(java.sql.ResultSet rs, int index) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.index
- the column index.public static double getDouble(java.sql.ResultSet rs, java.lang.String colName) throws java.sql.SQLException
This will validate if the underlying column was null.
rs
- the result set.colName
- the column name.public static void main(java.lang.String[] args) throws java.lang.Exception
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |