Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Improper implementation in GenericUserDAO.selectById ?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I have written a custom Authenticator class. In that class I want to know if a user with a specific id exists. I do this by calling UserDAO.selectById which is implemented in GenericUserDAO.selectById. However, this method always returns a user object even if no such user exists. The "problem" is this block:



I the GenericUserDAO.selectByName method, the behaviour is different:


Is this how it's supposed to be?
[originally posted on jforum.net by reikje]
reply
    Bookmark Topic Watch Topic
  • New Topic