Implemented DomainQuery::getEntity method