|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.wsinfra.wsrm.storage.impl.WsrmQueryHandler
public class WsrmQueryHandler
Title: WsrmQueryHandler
Description: Helps to processes that needs to access and store data to the database
| Constructor Summary | |
|---|---|
WsrmQueryHandler(Connection _connection)
|
|
| Method Summary | |
|---|---|
void |
closePreparedStatement(PreparedStatement preparedStatement)
closes the result set objects |
void |
closeResultSet(ResultSet resultSet)
closes the result set objects |
long |
getAndIncrementExchangeNumber()
creates an exchange number by getting the previous one from database and increment it by 1. |
boolean |
getBooleanOfInt(int value)
converts integers into boolean values |
long |
getExchangeNumber()
returns exchange number that is a long number |
int |
getIntOfBoolean(boolean value)
to help database insertion of boolean values this method convert them into integer format |
long |
getLongNumber(String query)
returs the value of count that is provided by query the count is maching row numbers query may be : "select count(*) from tablename " |
long[] |
getLongNumbers(ResultSet resultSet)
returns the long values of maching results in an array such as message numbers |
PreparedStatement |
getPreparedStatement(String sqlQuery)
executes sql query and returns PreparedStatement |
ResultSet |
getResultSet(PreparedStatement preparedStatement)
executes sql query and returns result set |
String[] |
getStringArray(ResultSet resultSet)
returns the strings of maching results in an array such as sequence numbers |
boolean |
isExistInTable(String query)
checks whether the parameter exists in the table |
static void |
main(String[] args)
|
void |
setExchangeNumber(long exchangeNumber)
inserts the exchange number into database |
int |
updateQuery(String sqlQuery)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement and returns number of rows that are effected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WsrmQueryHandler(Connection _connection)
| Method Detail |
|---|
public PreparedStatement getPreparedStatement(String sqlQuery)
throws WsrmStorageException
WsrmStorageException
public void closePreparedStatement(PreparedStatement preparedStatement)
throws WsrmStorageException
WsrmStorageException
public ResultSet getResultSet(PreparedStatement preparedStatement)
throws WsrmStorageException
WsrmStorageException
public void closeResultSet(ResultSet resultSet)
throws WsrmStorageException
WsrmStorageException
public int updateQuery(String sqlQuery)
throws WsrmStorageException
WsrmStorageException
public long getLongNumber(String query)
throws WsrmStorageException
WsrmStorageException
public long[] getLongNumbers(ResultSet resultSet)
throws WsrmStorageException
WsrmStorageException
public String[] getStringArray(ResultSet resultSet)
throws WsrmStorageException
WsrmStorageException
public boolean isExistInTable(String query)
throws WsrmStorageException
WsrmStorageException
public long getExchangeNumber()
throws WsrmStorageException
WsrmStorageException
public void setExchangeNumber(long exchangeNumber)
throws WsrmStorageException
WsrmStorageException
public long getAndIncrementExchangeNumber()
throws WsrmStorageException
WsrmStorageExceptionpublic int getIntOfBoolean(boolean value)
public boolean getBooleanOfInt(int value)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||