refactored getDescriptors(Class<T> type)  method

refactored getDescriptors(Class<T> type)  method to make it more
consistent and clear. Nowall realizatrion in one method. Still have to
get rid of two requests to db