refactoring - dry up active_record adapter methods by introducing class.