net.java.ao.Query.setFields()方法的使用及代码示例

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

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

Query.setFields介绍

暂无

代码示例

代码示例来源:origin: net.java.dev.activeobjects/activeobjects-core

/**
 * <p>Optimised read for large datasets. This method will stream all rows for the given type to the given
 * callback.</p>
 *
 * <p>Please see {@link #stream(Class, Query, EntityStreamCallback)} for details / limitations.
 *
 * @param type           The type of the entities to retrieve.
 * @param streamCallback The receiver of the data, will be passed one entity per returned row
 */
public <T extends RawEntity<K>, K> void stream(Class<T> type, EntityStreamCallback<T, K> streamCallback) throws SQLException {
  final EntityInfo<T, K> entityInfo = resolveEntityInfo(type);
  final Set<String> valueFields = getValueFieldsNames(entityInfo, nameConverters.getFieldNameConverter());
  final Query query = Query.select();
  query.setFields(valueFields.toArray(new String[valueFields.size()]));
  stream(type, query, streamCallback);
}

代码示例来源:origin: net.java.dev.activeobjects/activeobjects

/**
 * <p>Optimised read for large datasets. This method will stream all rows for the given type to the given
 * callback.</p>
 *
 * <p>Please see {@link #stream(Class, Query, EntityStreamCallback)} for details / limitations.
 *
 * @param type           The type of the entities to retrieve.
 * @param streamCallback The receiver of the data, will be passed one entity per returned row
 */
public <T extends RawEntity<K>, K> void stream(Class<T> type, EntityStreamCallback<T, K> streamCallback) throws SQLException {
  final EntityInfo<T, K> entityInfo = resolveEntityInfo(type);
  final Set<String> valueFields = getValueFieldsNames(entityInfo, nameConverters.getFieldNameConverter());
  final Query query = Query.select();
  query.setFields(valueFields.toArray(new String[valueFields.size()]));
  stream(type, query, streamCallback);
}

代码示例来源:origin: net.java.dev.activeobjects/activeobjects

query.setFields(selectedFields.toArray(new String[selectedFields.size()]));

代码示例来源:origin: net.java.dev.activeobjects/activeobjects-core

query.setFields(selectedFields.toArray(new String[selectedFields.size()]));

相关文章