IPredicateRule rule = xmlPartitionType.createPartitioningRule();
if (rule != null) {
rules.add(rule);
}
}
RuleBasedTargetPartitionScanner result = new RuleBasedTargetPartitionScanner();
result.setDefaultReturnToken(new Token(XmlPartitionType.OTHER.name()));
result.setPredicateRules(rules.toArray(new IPredicateRule[rules.size()]));
return result;
}