Im writing a web-service that has couple of APIs to get data from a data store. The high level view would look like this
getBlahForDate()
----> ---->
Client Service Data store ( Stores Blah )
<---- <----
List<Blah>
While thinking about how to design the code within the service, im stuck at choosing the right design pattern
I have the following layers
1. serviceLayer ( one class for each API, does validation on input )
2. daoLayer ( fetch data from dataStore )
3. modelLayer ( pojo defining domain objects like Blah )
The only "work" done by the service is validating the input and reading from data store and converting domain model to transport model before sending the response. I could have the service layer directly use the dao and send the response. But I would like to know which design pattern would fit the use case. Also this to me looks like an Anemic domain where the domain object is just a pojo with no business logic. But then there is no business logic other than validating if the data from the store is valid for the fields in the model. Appreciate if you can tell me what the accepted/common way to handle this case.