@Override
	@SuppressWarnings("unchecked")
	public List<E> find(Map<String, Object> properties) {
		Criteria criteria = getSession().createCriteria(getEntityClass());
		if (properties != null) {
			for (Entry<String, Object> entry : properties.entrySet()) {
				String propertyName = entry.getKey();
				Object value = entry.getValue();
				if (value == null) {
					criteria.add(Restrictions.isNull(propertyName));
				}
				else {
					criteria.add(Restrictions.eq(propertyName, value));
				}
			}			
		}
		return criteria.list();
	}