private void AddRestriction(ICriteria criteria, String type, Object value,Boolean exactMatch) { if (criteria != null && type != null && value != null){ if (exactMatch){ criteria.Add(Restrictions.Eq(type, value)); } else{ criteria.Add(Restrictions.Like(type, value)); } } }