@Test public void getAttributeDate() throws Exception { DateFormat format = new SimpleDateFormat("dd/MM/yyyy"); Date date; date = format.parse("01/01/2009"); Assert.assertEquals(date, featureModel.getAttribute(feature1, PARAM_DATE_ATTR).getValue()); }
@Override public Attribute getAttribute(Object feature, String name) throws LayerException { try { return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name); } catch (GeomajasException e) { throw new LayerException(e); } }
HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { try { return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name); } catch (GeomajasException e) { throw new LayerException(e); } } }
HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { try { return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name); } catch (GeomajasException e) { throw new LayerException(e); } }  }
HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { try { return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name); } catch (GeomajasException e) { throw new LayerException(e); } }  @Override void setLayerInfo(VectorLayerInfo layerInfo); @Override Attribute getAttribute(Object feature, String name); @Override @SuppressWarnings("rawtypes") Map<String, Attribute> getAttributes(Object feature); @Override String getId(Object feature); @Override Geometry getGeometry(Object feature); @Override @SuppressWarnings("unchecked") void setAttributes(Object feature, Map<String, Attribute> attributes); @Override void setGeometry(Object feature, Geometry geometry); @Override Object newInstance(); @Override Object newInstance(String id); @Override int getSrid(); @Override String getGeometryAttributeName(); @Override boolean canHandle(Object feature); }
HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel { @Override public Attribute getAttribute(Object feature, String name) throws LayerException { try { return entityMappingService.getAttribute(feature, getFeatureInfo(), entityMapper, name); } catch (GeomajasException e) { throw new LayerException(e); } }  @Override void setLayerInfo(VectorLayerInfo layerInfo); @Override Attribute getAttribute(Object feature, String name); @Override @SuppressWarnings("rawtypes") Map<String, Attribute> getAttributes(Object feature); @Override String getId(Object feature); @Override Geometry getGeometry(Object feature); @Override @SuppressWarnings("unchecked") void setAttributes(Object feature, Map<String, Attribute> attributes); @Override void setGeometry(Object feature, Geometry geometry); @Override Object newInstance(); @Override Object newInstance(String id); @Override int getSrid(); @Override String getGeometryAttributeName(); @Override boolean canHandle(Object feature);  }