code: protected Long extractLong(Object val) {
      try {
        return (Long) val;
      } catch (ClassCastException cce) {
        logException(cce);
        return null;
      }
    }
docs: Extracts a Long from a result that consists of an Long only.
  @param val
  @return the Integer