@SuppressWarnings("unchecked")
private static void decodeFilter(Filter filter)
throws UnsupportedEncodingException {
if (filter instanceof OrImpl) {
OrImpl impl = (OrImpl) filter;
for (Iterator<Filter> itr = impl.getFilterIterator(); itr.hasNext();) {
Filter f = itr.next();
decodeFilter(f);
}
} else if (filter instanceof AndImpl) {
AndImpl impl = (AndImpl) filter;
for (Iterator<Filter> itr = impl.getFilterIterator(); itr.hasNext();) {
Filter f = itr.next();
decodeFilter(f);
}
} else if (filter instanceof NotImpl) {
NotImpl impl = (NotImpl) filter;
Filter f = impl.getFilter();
decodeFilter(f);
} else if (filter instanceof LikeFilterImpl) {
LikeFilterImpl impl = (LikeFilterImpl) filter;
String encode = impl.getLiteral();
impl.setLiteral(decodeString(encode));
} else if (filter instanceof IsEqualsToImpl) {
IsEqualsToImpl impl = (IsEqualsToImpl) filter;
decodeExpression(impl.getExpression1());
decodeExpression(impl.getExpression2());
} else if (filter instanceof IsNotEqualToImpl) {
IsNotEqualToImpl impl = (IsNotEqualToImpl) filter;
decodeExpression(impl.getExpression1());
decodeExpression(impl.getExpression2());
}
}