Imagine an interface with a method to create objects of type Address. The entities involved here are irrelevant.
/**
* @throws IllegalArgumentException if addy is null or invalid
* @throws PersistenceException if db layer encounters a problem
*/
Object addAddress( Address addy );
addAddress inserts the domain object into the database.
I've left the return value to be Object. My question is: what should the return type be ? Normally I've chosen a boolean return value (assuming no exceptions were thrown). Sometimes I've chosen to return the autogenerated PK key of the record for the Address. And more often than not, I just leave it as void. What do you normally do & why ?