title: Querying MongoDB in Java with AND,OR condition
body: <p>I am newbie to <code>MongoDB</code> and need to query <code>MongoDB</code> in Java. For simple queries, I can write the equivalent Java code but the below query is a little complex and not getting how to write equivalent Java code.</p>
  
  <p>Below is the equivalent MongoDB query</p>
  
  <pre><code>db.FILE_JOURNEY.find(  {$and :[ {
                                      $or: [ { SUBSCRIBERID: "225136298" }, { SUBSCRIBERID : null} ]
                                  },      
                                  {   
                                      $or: [ { BATCHID : "615060299" }, { FILENAME : "TR.NYHBE.834Q.D.212311980342.QHP.dat" } ]  
                                  }
                                ] 
                          } 
                      )
  </code></pre>
  
  <p>Here, <code>FILE_JOURNEY</code> is the collection.</p>