org.xwiki.query.Query.getLanguage()方法的使用及代码示例

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

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

Query.getLanguage介绍

暂无

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-platform-query-manager

@Override
public String getLanguage()
{
  return this.query.getLanguage();
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-query-manager

@Override
public String getLanguage()
{
  return getWrappedQuery().getLanguage();
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-query-manager

@Override
public <T> List<T> execute(Query query) throws QueryException
{
  if (query.isNamed()) {
    return this.namedQueryExecutorProvider.get().execute(query);
  } else {
    try {
      return this.componentManagerProvider.get()
        .<QueryExecutor>getInstance(QueryExecutor.class, query.getLanguage()).execute(query);
    } catch (ComponentLookupException e) {
      throw new QueryException("Fail to lookup query executor", query, e);
    }
  }
}

代码示例来源:origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-activitystream

/**
 * {@inheritDoc}
 * 
 * @see EventStream#searchEvents(Query)
 */
public List<Event> searchEvents(Query query) throws QueryException
{
  Query q = this.qm.createQuery("select event from ActivityEventImpl event "
    + query.getStatement(), query.getLanguage());
  for (Map.Entry<String, Object> entry : query.getNamedParameters().entrySet()) {
    q.bindValue(entry.getKey(), entry.getValue());
  }
  for (Map.Entry<Integer, Object> entry : query.getPositionalParameters().entrySet()) {
    q.bindValue(entry.getKey(), entry.getValue());
  }
  List<ActivityEvent> events = q.execute();
  return convertActivitiesToEvents(events);
}

相关文章