Example #1
0
  // @TriggersRemove(cacheName="layerFBNCache", removeAll=true)
  public Layer updateLayer(Layer layer, Set<LayerField> layerFieldSet) {
    layer.getLayerFields().clear();
    layerFieldDao.delete(layer.getAlias());

    // Iterate and set the layer bean
    for (Iterator<LayerField> itrLayerField = layerFieldSet.iterator(); itrLayerField.hasNext(); ) {

      LayerField layerField = itrLayerField.next();
      layerField.setLayerBean(layer);
    }
    layer.setLayerFields(layerFieldSet);

    return layerDao.makePersistent(layer);
  }
Example #2
0
 // @Cacheable(cacheName="layerFBNCache")
 public Set<LayerField> getLayerFieldsByLayerName(String alias) {
   Layer layer = layerDao.findByAliasName(alias);
   return layer.getLayerFields();
 }