cgl.narada.wsinfra.wsr.storage.impl
Class WsrQueryHandler

java.lang.Object
  extended by cgl.narada.wsinfra.wsr.storage.impl.WsrQueryHandler

public class WsrQueryHandler
extends Object


Constructor Summary
WsrQueryHandler(Connection _connection)
           
 
Method Summary
 void closePreparedStatement(PreparedStatement preparedStatement)
          closes the result set objects
 void closeResultSet(ResultSet resultSet)
          closes the result set objects
 boolean getBooleanOfInt(int value)
          converts integers into boolean values
 int getIntOfBoolean(boolean value)
           
 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 sequence 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)
           
 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

WsrQueryHandler

public WsrQueryHandler(Connection _connection)
Method Detail

getPreparedStatement

public PreparedStatement getPreparedStatement(String sqlQuery)
                                       throws WsrStorageException
executes sql query and returns PreparedStatement

Throws:
WsrStorageException

closePreparedStatement

public void closePreparedStatement(PreparedStatement preparedStatement)
                            throws WsrStorageException
closes the result set objects

Throws:
WsrStorageException

getResultSet

public ResultSet getResultSet(PreparedStatement preparedStatement)
                       throws WsrStorageException
executes sql query and returns result set

Throws:
WsrStorageException

closeResultSet

public void closeResultSet(ResultSet resultSet)
                    throws WsrStorageException
closes the result set objects

Throws:
WsrStorageException

updateQuery

public int updateQuery(String sqlQuery)
                throws WsrStorageException
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement and returns number of rows that are effected

Throws:
WsrStorageException

isExistInTable

public boolean isExistInTable(String query)
                       throws WsrStorageException
checks whether the parameter exists in the table

Throws:
WsrStorageException

getLongNumber

public long getLongNumber(String query)
                   throws WsrStorageException
returs the value of count that is provided by query the count is maching row numbers query may be : "select count(*) from tablename "

Throws:
WsrStorageException

getLongNumbers

public long[] getLongNumbers(ResultSet resultSet)
                      throws WsrStorageException
returns the long values of maching results in an array such as sequence numbers

Throws:
WsrStorageException

getStringArray

public String[] getStringArray(ResultSet resultSet)
                        throws WsrStorageException
returns the strings of maching results in an array such as sequence numbers

Throws:
WsrStorageException

getIntOfBoolean

public int getIntOfBoolean(boolean value)

getBooleanOfInt

public boolean getBooleanOfInt(int value)
converts integers into boolean values


main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project