Discussions

EJB design: Not case-sensitive search through Entity Beans Finder methods

  1. Hi!
    We are using Entity beans and their finder methods for initiating different searches through the Database -- Oracle. The beans are in Web Logic 5.1. The users enter data in JSPs. The problem is the user is allowed to enter in upper and lowercase. The search should also respect the case and find the data accordingly; i.e. if user enters "usa", bean-finder method should search ONLY for "usa" and not for "usa" and "USA". How can I make the finder methods in Entity Beans to respect the case and search accordingly.
    Thanks for all help beforehand,
    Regards,
    Baivab
  2. SQL is not case sensitive and also Oracle. So even if you write a BMP and provide your own SQL query, when it is executed by the Oracle, it will do case-Insensitive search only. So you can't achieve Case-Sensitive searches in database. Correct me if I am wrong.
  3. you can write a helper class - i know it is not that great ,and but it in you session facade where it could varify the proper entity bean of you choice.

    i hope it is helpfull.

    regards;
    omar abu-jiab.