Criteria crit = new CompareCriteria(a, CompareCriteria.EQ,
new Constant(new Integer(5)));
List critList = new ArrayList();
critList.add(crit);
CriteriaSelector critSelector2 = new CriteriaSelector();
//critSelector2.setSelectorType(CriteriaSelector.IS_NULL);
critSelector2.setElements(elements);
TranslateCriteria transCriteria = new TranslateCriteria(critSelector2, critList);
elseQuery.setCriteria(transCriteria);
AssignmentStatement elseQueryStmt = new AssignmentStatement(var2, elseQuery);
Block elseBlock = new Block();
List elseStmts = new ArrayList();
elseStmts.add(elseDeclStmt);
elseStmts.add(elseQueryStmt);
elseBlock.setStatements(elseStmts);
CriteriaSelector critSelector1 = new CriteriaSelector();
critSelector1.setSelectorType(CriteriaSelector.COMPARE_NE);
critSelector1.setElements(elements);
HasCriteria hasSelector1 = new HasCriteria();
hasSelector1.setSelector(critSelector1);
IfStatement stmt = new IfStatement(hasSelector1, ifBlock, elseBlock);