def build_handle(id_or_hash)
      if id_or_hash.respond_to?(:to_i)
        Entity::Handle.new(:id => id_or_hash)
      else
        Entity::Handle.new(id_or_hash)
      end
    end
def build_handle(id_or_hash)
      if id_or_hash.respond_to?(:to_i)
        Entity::Handle.new(:id => id_or_hash)
      else
        Entity::Handle.new(id_or_hash)
      end
    end
Wraps an Entity::Handle around a potential id_or_hash object as received
 from the backend.

 If id_or_hash is a numeric value it'll be assumed to be an id and used as
 such in the returned Entity::Handle.

 If id_or_hash is a Hash, it's values will be used as the keys and values
 of the built Entity::Handle.