I'm creating a stateless session bean (the façade) which will be used for "managing" a particular entity, let's call it Product. There will be methods to add a new product, update an existing product, get products, etc (I'm using Hibernate for persistence, so I have a "ProductDbManager" bean that the façade will use for DB access).
This bean will be exposed as a web service so it can be called from a web interface and a simple desktop app.
My question is, would it be best practice for a method such as AddProduct to accept an instance of Product, or the individual parameters such as "Name", "Description", "Price", etc?
It's possible for a Product to be created with just a "Name" initially, or perhaps "Name" and "Description", or with all attributes set, and so on. From that point of view it would be simpler (in terms of creating the façade) just to accept the Product instance so that the client can simply create a new Product, set whichever attributes are available, then pass it in.
With the alternative option, I will need to create quite a few overloads of AddProduct in order to accept the varying parameters. However, would this be preferable in order to be as flexible as possible and make life easier for the users of the façade? Should both options be availble?