• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is Hashing In EJB PK Class

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all Plz make the Hashing Concept In EJB PK Class.. Why it is needed? And how it does its work?
Thanx In Advance
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you need to do (this is a MUST) is provide implementation to the hashCode() method in the Primary Key class. You would retrun an integer value for the hashCode of the primary-key.
The hashCode() method is one of two methods you MUST implement in the Primary Key cassl of an Entity Bean. The other method is the equals() method.
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The short answer is that it's a unique identifier for the instance. For more information on hashing and it's purpose, look at java.util.HashMap - or lookup HashMap in a good data structures book
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic