In the Java code I'm working with, we have an interface for defining our data access objects (DAOs). Most methods accept a Data Transfer Object (DTO) parameter. The problem arises when a DAO implementation must reference a specific type of DTO. Then this method should execute (for me, completely unnecessary DTO selection for SpecificDTO. Not only that, but the compiler cannot apply any type of type checking for specific DAO implementations, which should only accept their specific DTOS types as parameters. My question : How do I fix this as little as possible?
Bill lyons
source
share