{
Expression exp = null;
for (Iterator it = query.getCriterions(); it.hasNext();)
{
PersistenceCriterion criterion = (PersistenceCriterion) it.next();
String property = criterion.getProperty();
String operator = criterion.getOperator();
Object value = criterion.getOperand();
if (PersistenceCriterion.OPERATOR_EQ.equals(operator))
{
Expression newExp1 = ExpressionFactory.matchExp(property, value);
Expression newExp2 = ExpressionFactory.matchExp(property, null);
Expression newExp = newExp1.orExp(newExp2);