I'm trying to implement the Persistence Facade presented in Craig Larman's book called "Applying UML and Patterns". But this book was written prior to the availability of generics. The Facade class is not type safe, as the persistence objects are passed in as type object, then the facade determines what mapper to call based on the object's type. The mapper then has to typecast the object to the right type. My question is: how can you use a persistence facade with generics?