• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Websphere Custom Finder Methods

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.
I'd like to implement a finder method (on Websphere 4.0) that accepts primitive type object wrappers, example:
findByLongNum(java.lang.Long num)
This may then enable me to search the DB for NULL values.
However, it seems Websphere 4.0 will only accept finder methods with primitive signatures.
Am I correct? Does anyone know of a way round this limitation?
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the IBM/Websphere Forum...
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
That is not true. You can give any data type (like String, Date, Timestamp, etc). I had done it before with String and Date object types as input to finder methods.
If you can post the error message, I can tell you more. Make sure your data type mappings are correct. For long java type, the correct sql type is BIGINT (in DB2). Check it for your DB...
Thanks,
Malar.
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic