Revision 47525
Added by Antonis Lempesis almost 7 years ago
OrganizationDAO.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import eu.dnetlib.goldoa.domain.*; |
5 | 5 |
import org.hibernate.Criteria; |
6 |
import org.hibernate.criterion.MatchMode; |
|
6 | 7 |
import org.hibernate.criterion.Restrictions; |
7 | 8 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 9 |
import org.springframework.jdbc.core.BatchPreparedStatementSetter; |
... | ... | |
52 | 53 |
@SuppressWarnings("unchecked") |
53 | 54 |
public List<Object> search(String term) { |
54 | 55 |
return createEntityCriteria().add(Restrictions. |
55 |
like("name","%" + term.toLowerCase() + "%").ignoreCase()).list();
|
|
56 |
ilike("name",term, MatchMode.ANYWHERE)).list();
|
|
56 | 57 |
} |
57 | 58 |
|
58 | 59 |
public Organization saveOrganization(Organization organization) { |
Also available in: Unified diff
fixed search queries