mongodb/morphia — pull request #667 by kothar (2014-11-01 18:16:52+00:00)
Title: Support for aggregation pipeline projection expressions

This is a patch to the `Projections` class which provides the option to build projection expressions which take lists of arguments, such as `$add` and `$multiply`.

```
Projection.projection("hour", Projection.subtract(
Projection.projection("$hour", dateField),
Projection.mod(Projection.projection("$hour", dateField), 6)))
```

I've tried to follow the style of the `Group` support for expressions, although I haven't implemented the analogue of the `Accumulator` class, as I wasn't sure how to approach nested projection expressions.

The type of the arguments to the expressions are not defined: just an `Object` list. This may need some improvement, but again, I'm not sure how to approach interchangeable field references, number literals and nested expressions.

A new test is included, which verifies that the `$divide` expression works as expected. Other expressions follow the same structure, and should be equivalent.

I've run `gradlew check`, which passes the style checks and the new unit test - let me know if you need anything else, or more tests.

Regards,
Mike.