Persisitent object
Hard requirenment:1. No-argument construct , package visiblity, usde instantiate object by Constructor.newInstance().
Option requirement:
1. Pojo.
2. Implement hashCode and equals for two resons :
1) Object will be store in a set property.
2) Instance span to sesssion scope, make a detached object persistent again, will call equals, for java indentify(==) and db indentify(pk) is not available for the condition(object doest not have identify before persistent),
Note: hashCode generation should not use indentify proeprty of object.
posted on 2007-05-17 08:51 Sheldon Sun 閱讀(242) 評論(0) 編輯 收藏