Mov getEntityClass from repository to EntityMetaData
Implement 'search' query for jpa