本文整理了Java中net.java.ao.Query.setFields
方法的一些代码示例,展示了Query.setFields
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setFields
方法的具体详情如下:
包路径:net.java.ao.Query
类名称: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()]));
内容来源于网络,如有侵权,请联系作者删除!