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

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

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

Query.getStatement介绍

暂无

代码示例

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

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

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

@Override
  public String getMessage()
  {
    if (query == null) {
      return super.getMessage();
    } else {
      if (query.isNamed()) {
        return super.getMessage() + ". Named query = [" + query.getStatement() + "]";
      } else {
        return super.getMessage() + ". Query statement = [" + query.getStatement() + "]";
      }
    }
  }
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

/**
 * @param session hibernate session
 * @param query Query object
 * @return hibernate query
 */
protected org.hibernate.Query createHibernateQuery(Session session, Query query)
{
  return query.isNamed()
    ? session.getNamedQuery(query.getStatement())
    : session.createQuery(query.getStatement());
}

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

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

代码示例来源: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);
}

相关文章