I had to retrofit a class with all static methods for
polymorphism and wound up with an interface with non-static methods that match the static methods plus a number of implementations of the interface. Then you might have:
So each static method just passes the call through to the current implementation.
BTW: Those static variables will make you crazy when it comes time to multi-thread. Think of ways to avoid them. For example, just
For grins, look into the Spring
JDBC framework. It does some cool stuff and might save you a lot of work writing your own.
[ August 14, 2006: Message edited by: Stan James ]