I'd go with saveXXX() instead of addXXX and storeXXX. In most cases, it'll be up to the persistence layer to determine insert/update. This is what I generally do in my apps - but Roller might be different. I don't know if we have any custom logic for add vs. update.
Matt On 4/17/06, Allen Gilliland <[EMAIL PROTECTED]> 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. > > and we would remove createXXX() methods from managers because they seem > pretty useless and it seems better if new object instances are just > created directly using the pojo constructors. > > so this won't be changing any functionality of the code it will > basically just be renaming a bunch of methods to make things more > consistent. the biggest changes will be moving a number of > retrieveXXX() methods to getXXX() methods, and removing the createXXX() > methods. > > anyone object or have some alternative ideas? > > -- Allen >
