private static Expression getExpression(Tree t, Root entity, CriteriaBuilder cb)
    {
        if ( t != null )
        {
            String myval = t.getText();
            int type = t.getType();
            if ( type == eelLexer.STRING )
            {
                return cb.literal( (String) myval );
            }
            if ( type == eelLexer.INT )
            {
                return cb.literal( Integer.parseInt(myval));
            }
            if ( type == eelLexer.FLOAT )
            {
                return cb.literal( Double.parseDouble(myval));
            }
            return entity.get(myval);     
        } else
            throw new RuntimeException("Invalid Expression");
    }