@SuppressWarnings("deprecation")
	public List<ComponentIn> search(Map<String, String> critieras) {
		Session session = HibernateUtil.sessionFactory.getCurrentSession();
		session.beginTransaction();
		Criteria hibernateCriteria = session.createCriteria(ComponentIn.class);
		Set<String> keySet = critieras.keySet();
		for (String key : keySet) {
			switch(key) {
			case "componentId":
				hibernateCriteria.add(Restrictions.like("component.id", critieras.get(key) + "%"));
				break;
			case "date":
				hibernateCriteria.add(Restrictions.eq("date", new Date(critieras.get(key))));
				break;
			case "countBegin":
				hibernateCriteria.add(Restrictions.ge("count", Integer.parseInt(critieras.get(key))));
				break;
			case "countEnd":
				hibernateCriteria.add(Restrictions.le("count", Integer.parseInt(critieras.get(key))));
				break;
			case "priceBegin":
				hibernateCriteria.add(Restrictions.ge("price", Double.parseDouble(critieras.get(key))));
				break;
			case "priceEnd":
				hibernateCriteria.add(Restrictions.le("price", Double.parseDouble(critieras.get(key))));
				break;
			case "company":
				hibernateCriteria.createCriteria("company").add(Restrictions.like("name", critieras.get(key) + "%"));
				break;
			case "actionId":
				hibernateCriteria.add(Restrictions.eq("actionId", critieras.get(key)));
				break;
			}
		}
		@SuppressWarnings("unchecked")
		List<ComponentIn> results = (List<ComponentIn>) hibernateCriteria.list();
		session.getTransaction().commit();
		return results;
	}