class HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel {

	@Override
	public Geometry getGeometry(Object feature) throws LayerException {
		Object obj = getAttributeRecursively(feature, getGeometryAttributeName());
		if (obj == null) {
			return null;
		} else if (Geometry.class.isAssignableFrom(obj.getClass())) {
			Geometry geom = (Geometry) obj;
			return (Geometry) geom.clone();
		} else {
			throw new LayerException(ExceptionCode.PROPERTY_IS_NOT_GEOMETRY, getGeometryAttributeName());
		}
	}

}