Results 1 to 2 of 2

Thread: ItemKeyGenerator

  1. #1

    Default ItemKeyGenerator

    Can anybody kindly please tell me how to create ItemKeyGenerator.
    I have to manipulate with many objects (including wrappers).
    I am getting "Inconsistent state for failed item key: hashCode has changed. Consider whether equals() or hashCode() for the item might be inconsistent, or if you need to supply a better ItemKeyGenerator" for exceptions.
    I really stuck with this.


    It will be very helpful if anybody can help me on this?

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    An ItemKeyGenerator just has to produce a key for the item that is consistent and doesn't change during the processing of the item. A business key or message identifier works best. The most common mistake is to use a primary key which starts off as null (before item is inserted in database) and then is non-null by the end of the process.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •