public boolean delete(TileObject stObj) throws StorageException { stObj.setLayerId(idCache.getLayerId(stObj.getLayerName())); stObj.setFormatId(idCache.getFormatId(stObj.getBlobFormat())); long parametersId = idCache.getParametersId(stObj.getParameters()); stObj.setParamtersId(parametersId); try { wrpr.deleteTile(stObj); return true; } catch (SQLException se) { log.error("Failed to get tile: " + se.getMessage()); } return false; }
public void put(TileObject stObj) throws StorageException { stObj.setLayerId(idCache.getLayerId(stObj.getLayerName())); stObj.setFormatId(idCache.getFormatId(stObj.getBlobFormat())); stObj.setGridSetIdId(idCache.getGridSetsId(stObj.getGridSetId())); stObj.setParamtersId(idCache.getParametersId(stObj.getParameters())); try { wrpr.deleteTile(stObj); } catch (SQLException se) { log.error("Failed to delete tile: " + se.getMessage()); } try { wrpr.putTile(stObj); } catch (SQLException se) { log.error("Failed to put tile: " + se.getMessage()); } }