class 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;
	}

}