Extracted generic query methods to abstract dao