本文整理汇总了Java中javax.jcr.query.qom.Column类的典型用法代码示例。如果您正苦于以下问题:Java Column类的具体用法?Java Column怎么用?Java Column使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Column类属于javax.jcr.query.qom包,在下文中一共展示了Column类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findByQOM
import javax.jcr.query.qom.Column; //导入依赖的package包/类
/**
* Find JCR nodes with one or more selectors, and map to objects.
*
* @param source the node-tuple source; non-null
* @param constraint the constraint, or null if none
* @param orderings zero or more orderings; null is equivalent to a zero-length array
* @param columns the columns; null is equivalent to a zero-length array
* @param nodeFilter the NodeFilter to apply when updating child nodes and references
* @return a list of objects mapped from the nodes
*/
protected List<T> findByQOM(Source source, Constraint constraint, Ordering orderings[], Column columns[], NodeFilter nodeFilter) {
try {
QueryObjectModelFactory factory = getSession().getWorkspace().getQueryManager().getQOMFactory();
Query query = factory.createQuery(source, constraint, orderings, columns);
QueryResult result = query.execute();
return toList(result.getNodes(), nodeFilter);
} catch (RepositoryException e) {
throw new JcrMappingException("Could not find nodes by QOM", e);
}
}