Exemplo n.º 1
0
  public boolean rename(final String oldLayerName, final String newLayerName)
      throws StorageException {
    Assert.notNull(oldLayerName, "old layer name");
    Assert.notNull(newLayerName, "new layer name");

    long layerId = idCache.getLayerId(oldLayerName);
    try {
      wrpr.renameLayer(layerId, newLayerName);
      idCache.clear();
      return true;
    } catch (SQLException se) {
      log.error("Failed to rename layer '" + oldLayerName + "' to '" + newLayerName + "'", se);
    }

    return false;
  }