code: public long getLocator(Lob lob) {
          if (lob == null) {
              return 0;
          }
          Long locator = (Long) lob.getLocator();
          return locator == null ? 0 : locator;
      }
docs: Returns the locator for the given Lob, or zero if null.
  
  @throws ClassCastException if Lob is unrecognized