I'm working on a small webservices project (java, axis2..). There is a lot of existing code, the code is divided into many layers, from the first layer where the request in interpreted to a few layers down to the dao layer. In the dao layer I'm seeing some validation code interspersed in a few places. The project contains tables which have multiple unique columns, so the user may input a single column or a combination of columns. The validation in dao layer is to check if such a combination exists, if not throw an exception.
I was told these kind of checks are more related to the schema and hence need to be in the dao layer. The dao interface has methods like 'checkIfThisExists/checkComboExists', Would this be a 'proper' design? I always thought the dao's job should only be to send and receive data, more like get and set.