code: @SuppressWarnings(UNCHECKED)
      protected Set<E> set(Query query)
      {
          return new HashSet<E>(query.list());
      }
docs: Returns a set of entities based on the provided query.
  
  @param query the query
  @return a set of entities based on the provided query