jdbc refactoring