David M Johnson wrote:
On Apr 17, 2006, at 4:11 PM, Allen Gilliland wrote:
this isn't part of the backend refactoring proposal because it doesn't
serve any functional purpose, but would anyone be opposed to me
renaming some of the manager methods just to get them all conformed to
a standard convention?
i am thinking we would structure the methods like this ...
addXXX() - add new item. equivalent to hibernate save() or sql insert.
storeXXX() - update existing item. equivalent to hibernate
merge()/update() or sql update.
removeXXX() - remove existing item. equivalent to hibernate delete()
or sql delete.
getXXX() - for any queries.
Big +1 on conforming to standard convention.
I prefer the below names, but I don't feel strongly about it:
saveXXX()
updateXXX()
removeXXX()
getXXX()
retrieveXXX() - get by ID
it sounds like we need to make a decision on whether or not to offer
separate save and update methods, or if we want them combined. i think
the rest is pretty standard.
i actually prefer not to use the retrieveXXX() methods mainly because i
think it's confusing (at least for me). i think it's a little easier if
all the lookup methods start with the same prefix.
-- Allen
- Dave