TRUNK-2999 Investigate replacing concept word with full text search

oh i see! :)


On Thu, Jul 17, 2014 at 4:07 PM, Rafal Korytkowski <notifications@github.com
> wrote:

> In api/src/main/java/org/openmrs/api/db/hibernate/HibernateConceptDAO.java:
>
> > +		if (Context.getConceptService().isConceptNameSearchCaseSensitive()) {
> > +			criteria.add(Restrictions.ilike("name", name.getName()));
> > +		} else {
> > +			criteria.add(Restrictions.eq("name", name.getName()));
> > +		}
> > +		
> > +		criteria.add(Restrictions.or(Restrictions.eq("conceptNameType", ConceptNameType.FULLY_SPECIFIED), Restrictions.eq(
> > +		    "localePreferred", true)));
> > +		
> > +		criteria.createAlias("concept", "concept");
> > +		criteria.add(Restrictions.eq("concept.retired", false));
> > +		if (name.getConcept() != null && name.getConcept().getConceptId() != null) {
> > +			criteria.add(Restrictions.ne("concept.conceptId", name.getConcept().getConceptId()));
> > +		}
> > +		
> > +		criteria.setProjection(Projections.rowCount());
>
> rowCount() returns at least Number, it can be Long or Integer... so we
> can't cast to Long if it's Integer and vice versa. Number.longValue is the
> safe option.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/openmrs/openmrs-core/pull/958/files#r15055499>.
>



-- 
If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.