title: how to write criteria Query for Mongodb Group Aggregation
body: <p>Mongodb <code>$group</code> :</p>
  
  <pre><code>db.careLogBean.aggregate([{
      $unwind: "$comments"
  }, {
      $sort: {
          "comments.time": -1
      }
  }, {
      $group: {
          _id: "$_id",
          careGiverId: {
              $first: "$careGiverId"
          },
          careGiverName: {
              $first: "$careGiverName"
          },
          comments: {
              $push: "$comments"
          }
      }
  }])
  </code></pre>
  
  <p>In mongodb <code>$group</code> aggretion things... how to write in java criteria
                     query language...</p>