本文整理汇总了Java中org.alfresco.service.cmr.search.ResultSet.getResultSetMetaData方法的典型用法代码示例。如果您正苦于以下问题:Java ResultSet.getResultSetMetaData方法的具体用法?Java ResultSet.getResultSetMetaData怎么用?Java ResultSet.getResultSetMetaData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.search.ResultSet
的用法示例。
在下文中一共展示了ResultSet.getResultSetMetaData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DetachedResultSet
import org.alfresco.service.cmr.search.ResultSet; //导入方法依赖的package包/类
/**
* Detached result set based on that provided
* @param resultSet ResultSet
*/
public DetachedResultSet(ResultSet resultSet)
{
super();
rsmd = resultSet.getResultSetMetaData();
rows = new ArrayList<ResultSetRow>(resultSet.length());
for (ResultSetRow row : resultSet)
{
rows.add(new DetachedResultSetRow(this, row));
}
numberFound = resultSet.getNumberFound();
}
示例2: queryWithCount
import org.alfresco.service.cmr.search.ResultSet; //导入方法依赖的package包/类
public void queryWithCount(String ql, String query, int count, QName property, Boolean ascending)
{
SearchParameters sp = new SearchParameters();
sp.setLanguage(ql);
sp.setQueryConsistency(QueryConsistency.TRANSACTIONAL);
sp.setQuery(query);
sp.addStore(rootNodeRef.getStoreRef());
ResultSet results = serviceRegistry.getSearchService().query(sp);
HashSet<NodeRef> found = new HashSet<NodeRef>();
Comparable last = null;
for(ResultSetRow row :results)
{
assertFalse(found.contains( row.getNodeRef()));
found.add(row.getNodeRef());
if(property != null)
{
Comparable current = (Comparable)nodeService.getProperty(row.getNodeRef(), property);
if(last != null)
{
if((ascending == null) || (ascending))
{
assert(last.compareTo(current) >= 0);
}
else
{
assert(last.compareTo(current) <= 0);
}
}
last = current;
}
}
assertEquals(count, results.length());
results.getResultSetMetaData();
results.close();
}