当前位置: 首页>>代码示例>>Java>>正文


Java SqlMapClient.queryForList方法代码示例

本文整理汇总了Java中com.ibatis.sqlmap.client.SqlMapClient.queryForList方法的典型用法代码示例。如果您正苦于以下问题:Java SqlMapClient.queryForList方法的具体用法?Java SqlMapClient.queryForList怎么用?Java SqlMapClient.queryForList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibatis.sqlmap.client.SqlMapClient的用法示例。


在下文中一共展示了SqlMapClient.queryForList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: nullParametersShouldNotBeTraced

import com.ibatis.sqlmap.client.SqlMapClient; //导入方法依赖的package包/类
@Test
public void nullParametersShouldNotBeTraced() throws Exception {
    // Given
    SqlMapClient sqlMapClient = new SqlMapClientImpl(this.mockSqlMapExecutorDelegate);
    // When
    sqlMapClient.insert(null);
    sqlMapClient.queryForList(null);
    // Then
    final List<SpanEventBo> spanEvents = getCurrentSpanEvents();
    assertThat(spanEvents.size(), is(2));

    // Check Method
    final SpanEventBo insertSpanEventBo = spanEvents.get(0);
    final SpanEventBo queryForListSpanEventBo = spanEvents.get(1);
    assertThat(insertSpanEventBo.getApiId(), not(0));
    assertThat(queryForListSpanEventBo.getApiId(), not(0));
    assertThat(insertSpanEventBo.getApiId(), not(queryForListSpanEventBo.getApiId()));

    // Check Parameter
    assertNull(insertSpanEventBo.getAnnotationBoList());
    assertNull(queryForListSpanEventBo.getAnnotationBoList());
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:23,代码来源:SqlMapClientImplModifierTest.java

示例2: queryForListShouldBeTraced

import com.ibatis.sqlmap.client.SqlMapClient; //导入方法依赖的package包/类
@Test
public void queryForListShouldBeTraced() throws Exception {
    // Given
    SqlMapClient sqlMapClient = new SqlMapClientImpl(this.mockSqlMapExecutorDelegate);
    // When
    sqlMapClient.queryForList("abc");
    // Then
    final List<SpanEventBo> spanEvents = getCurrentSpanEvents();
    assertThat(spanEvents.size(), is(1));

    // Check Method
    final SpanEventBo apiCallSpanEventBo = spanEvents.get(0);
    assertThat(apiCallSpanEventBo.getApiId(), not(0));

    // Check Parameter
    final List<AnnotationBo> annotationBoList = apiCallSpanEventBo.getAnnotationBoList();
    assertThat(annotationBoList.size(), is(1));

    final AnnotationBo parameterAnnotationBo = annotationBoList.get(0);
    assertThat(parameterAnnotationBo.getKey(), is(AnnotationKey.CACHE_ARGS0.getCode()));
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:22,代码来源:SqlMapClientImplModifierTest.java

示例3: retrieveFeed

import com.ibatis.sqlmap.client.SqlMapClient; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Feed retrieveFeed(RequestContext request) throws FeedServerAdapterException {
  SqlMapClient client = getSqlMapClient();
  String queryId = config.getFeedId() + "-get-feed";
  List<Map<String, Object>> rows;
  try {
    rows = client.queryForList(queryId, getRequestParams(request));
  } catch (SQLException e) {
    throw new FeedServerAdapterException(
        FeedServerAdapterException.Reason.ERROR_EXECUTING_ADAPTER_REQUEST, e.getMessage());
  }
  Feed feed = createFeed();
  ServerConfiguration serverConfig = config.getServerConfiguration();
  if (serverConfig.getFeedNamespacePrefix() != null
      && serverConfig.getFeedNamespacePrefix().length() > 0) {
    feed.declareNS(serverConfig.getFeedNamespace(), serverConfig.getFeedNamespacePrefix());
  }
  for (Map<String, Object> row : rows) {
    createEntryFromProperties(feed, row);
  }
  return feed;
}
 
开发者ID:jyang,项目名称:google-feedserver,代码行数:24,代码来源:IBatisCollectionAdapter.java

示例4: doQueryForList

import com.ibatis.sqlmap.client.SqlMapClient; //导入方法依赖的package包/类
private void doQueryForList(Exchange exchange) throws Exception {
    SqlMapClient client = endpoint.getSqlMapClient();

    Object result;
    Object in = exchange.getIn().getBody();
    if (in != null) {
        LOG.trace("QueryForList: {} using statement: {}", in, statement);
        result = client.queryForList(statement, in);
    } else {
        LOG.trace("QueryForList using statement: {}", statement);
        result = client.queryForList(statement);
    }

    doProcessResult(exchange, result);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:16,代码来源:IBatisProducer.java

示例5: poll

import com.ibatis.sqlmap.client.SqlMapClient; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<Object> poll(IBatisConsumer consumer, IBatisEndpoint endpoint) throws Exception {
    SqlMapClient client = endpoint.getSqlMapClient();
    return client.queryForList(endpoint.getStatement(), null);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:6,代码来源:DefaultIBatisProcessingStategy.java


注:本文中的com.ibatis.sqlmap.client.SqlMapClient.queryForList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。