本文整理了Java中org.molgenis.data.Query.like
方法的一些代码示例,展示了Query.like
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.like
方法的具体详情如下:
包路径:org.molgenis.data.Query
类名称:Query
方法名:like
暂无
代码示例来源:origin: org.molgenis/molgenis-omx-biobankconnect
@RequestMapping(method = RequestMethod.POST, value = "/allattributes", consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE)
@ResponseBody
public SearchResult getAllAttributes(@RequestBody
Map<String, Object> request)
{
if (request.get("dataSetId") == null) return new SearchResult("dataSetId cannot be null!");
Object dataSetId = request.get("dataSetId");
Object queryString = request.get("queryString");
Object approximate = (request.get("approximate") == null) ? false : request.get("approximate");
DataSet dataSet = dataService.findOne(DataSet.ENTITY_NAME, dataSetId, DataSet.class);
Query query = new QueryImpl();
if (request.get("query") != null)
{
query = new Gson().fromJson(request.get("query").toString(), QueryImpl.class);
}
query.eq("type", "observablefeature");
if (queryString != null && !queryString.toString().isEmpty())
{
if ((boolean) approximate)
{
query.and().like(ObservableFeature.NAME.toLowerCase(), queryString.toString());
}
else query.and().search(queryString.toString());
}
return searchService
.search(new SearchRequest("protocolTree-" + dataSet.getProtocolUsed().getId(), query, null));
}
代码示例来源:origin: org.molgenis/molgenis-web
case "=notlike=":
String notLikeValue = values.get(0);
q.not().like(attrName, notLikeValue);
break;
case "=q=":
内容来源于网络,如有侵权,请联系作者删除!