HibernateLayer extends HibernateLayerUtil implements VectorLayer, VectorLayerAssociationSupport,
		VectorLayerLazyFeatureConversionSupport { @Override public List<Attribute<?>> getAttributes(String attributeName, Filter filter) throws LayerException { if (attributeName == null) { throw new HibernateLayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, (Object) null); } AssociationAttributeInfo attributeInfo = getRecursiveAttributeInfo(attributeName, getFeatureInfo() .getAttributes()); Session session = getSessionFactory().getCurrentSession(); Criteria criteria = session.createCriteria(attributeInfo.getFeature().getDataSourceName()); CriteriaVisitor visitor = new CriteriaVisitor((HibernateFeatureModel) getFeatureModel(), dateFormat); if (filter != null) { Criterion c = (Criterion) filter.accept(visitor, null); if (c != null) { criteria.add(c); } } List<Attribute<?>> attributes = new ArrayList<Attribute<?>>(); for (Object object : criteria.list()) { try { attributes.add(converterService.toDto(object, attributeInfo)); } catch (GeomajasException e) { throw new HibernateLayerException(e, ExceptionCode.HIBERNATE_ATTRIBUTE_TYPE_PROBLEM, attributeName); } } return attributes; }  @Override String getId(); @Api void setId(String id); @Override CoordinateReferenceSystem getCrs(); @Override FeatureModel getFeatureModel(); @Override boolean useLazyFeatureConversion(); @Api void setUseLazyFeatureConversion(boolean useLazyFeatureConversion); @Api @Override void setLayerInfo(VectorLayerInfo layerInfo); @Override boolean isCreateCapable(); @Override boolean isUpdateCapable(); @Override boolean isDeleteCapable(); @Api void setFeatureModel(FeatureModel featureModel); @Api void setSessionFactory(SessionFactory sessionFactory); Iterator<?> getElements(Filter filter, int offset, int maxResultSize); @Override Object create(Object feature); @Override Object saveOrUpdate(Object feature); @Override void delete(String featureId); @Override Object read(String featureId); void update(Object feature); @Override Envelope getBounds(); Envelope getBounds(Filter filter); @Override List<Attribute<?>> getAttributes(String attributeName, Filter filter); DateFormat getDateFormat(); void setDateFormat(DateFormat dateFormat); boolean isScrollableResultSet(); @Api void setScrollableResultSet(boolean scrollableResultSet);  }
@Test public void testGetAttributes() throws Exception { List<Attribute<?>> attributes = associationLayer.getAttributes(PARAM_MANY_TO_ONE, Filter.INCLUDE); Assert.assertNotNull(attributes); }