Re: statement's hashCode()

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: statement's hashCode()
Дата
Msg-id 1040922439.17499.17.camel@inspiron.cramers
обсуждение исходный текст
Ответ на statement's hashCode()  (Felipe Schnack <felipes@ritterdosreis.br>)
Ответы Re: statement's hashCode()
Список pgsql-jdbc
Felipe,


What you could do is return hashCode() on the stringbuffer.toString() of
the query. This would be highly dependant on when it was called however.

assuming you wanted to know if they were equal after all of the setXXX
methods were called than this would work.


Dave
On Thu, 2002-12-26 at 11:52, Felipe Schnack wrote:
>   I'm writing some routines that could be improved vastly if I had a
> hash to identify an AbstractJdbc1Statement. What I need is a method that
> returns me an equal value when two instances of the Statement class have
> the same SQL query and parameters.
>   I just took a look at the sources and noted that right now this class
> (AbstractJdbc1Statement) does not implement a custom hashCode()
> function... Maybe some of you experts in its implementation could give
> me some tips about how I could implement this?
--
Dave Cramer <Dave@micro-automation.net>


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Felipe Schnack
Дата:
Сообщение: statement's hashCode()
Следующее
От: Felipe Schnack
Дата:
Сообщение: Re: statement's hashCode()