List<Object> paramValues = CollectUtils.newArrayList();
int index = 0;
for (final Restriction restriction : restrictions) {
// 处理限制对应的模式
RestrictPattern pattern = restriction.getPattern();
if (null == pattern || StringUtils.isEmpty(pattern.getContent())) {
continue;
}
// FIXME pattern.getObject().getType().equals(anObject))
// if(pattern.getObject().getType().equals(anObject))
String patternContent = pattern.getContent();
patternContent = StringUtils.replace(patternContent, "{alias}", query.getAlias());
String[] contents = StringUtils.split(
StringUtils.replace(patternContent, " and ", "$"), "$");
StringBuilder singleConBuf = new StringBuilder(prefix);
for (int i = 0; i < contents.length; i++) {
String content = contents[i];
Condition c = new Condition(content);
List<String> params = c.getParamNames();
for (final String paramName : params) {
RestrictField param = pattern.getObject().getField(paramName);
String value = restriction.getItem(param);
if (StringUtils.isNotEmpty(value)) {
if (value.equals(Restriction.ALL)) {
content = "";
} else {