本文整理汇总了Java中org.identityconnectors.framework.common.objects.filter.OrFilter类的典型用法代码示例。如果您正苦于以下问题:Java OrFilter类的具体用法?Java OrFilter怎么用?Java OrFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OrFilter类属于org.identityconnectors.framework.common.objects.filter包,在下文中一共展示了OrFilter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isSecondaryIdentifierOrFilter
import org.identityconnectors.framework.common.objects.filter.OrFilter; //导入依赖的package包/类
private boolean isSecondaryIdentifierOrFilter(Filter icfFilter) {
if (icfFilter == null) {
return false;
}
if (!(icfFilter instanceof OrFilter)) {
return false;
}
Filter leftSubfilter = ((OrFilter)icfFilter).getLeft();
Filter rightSubfilter = ((OrFilter)icfFilter).getRight();
if (isEqualsFilter(leftSubfilter, Name.NAME) && ((rightSubfilter instanceof EqualsFilter) || (rightSubfilter instanceof ContainsAllValuesFilter))) {
return true;
}
if (isEqualsFilter(rightSubfilter, Name.NAME) && ((leftSubfilter instanceof EqualsFilter) || (leftSubfilter instanceof ContainsAllValuesFilter))) {
return true;
}
return false;
}
示例2: translate
import org.identityconnectors.framework.common.objects.filter.OrFilter; //导入依赖的package包/类
public ScopedFilter translate(OrFilter icfFilter) {
if (icfFilter == null) {
return null;
}
Collection<Filter> icfSubfilters = icfFilter.getFilters();
List<ExprNode> subNodes = new ArrayList<ExprNode>(icfSubfilters.size());
for (Filter icfSubFilter: icfSubfilters) {
ScopedFilter subNode = translate(icfSubFilter);
if (subNode.getBaseDn() != null) {
throw new InvalidAttributeValueException("Filter for __NAME__ cannot be used in OR clauses");
}
subNodes.add(subNode.getFilter());
}
return new ScopedFilter(new OrNode(subNodes));
}