org.molgenis.data.Query.like()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.molgenis.data.Query.like方法的一些代码示例,展示了Query.like的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.like方法的具体详情如下:
包路径:org.molgenis.data.Query
类名称:Query
方法名:like

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=":

相关文章