java - Spring mongo adding criteria to and operator dynamicaly -


I am trying to create dynamic queries with user input and with operation, my code is created. : list & lt; Criteria & gt; Criterias = new ArrayList & lt; Criteria & gt; ();

And add criteria to this list. And successfully adding it successfully now I want to create and operator between each criterion.

  Criteria = new criteria (). And operators (criterias.get (0), criterias.get (1));   

This works fine but my input is not correct so I should add it dynamically, I tried

  for (int I = 0; i & lt; Criterias.size (); i ++) Criteria Criteria = new criteria (). And operator (criterias.get (i));   

Where am I missing?

A list of benchmarks by "$ and" operator to unite all the standards:

  Criteria = new criteria (). And Operator (Criterion Toura (New Criterion [Criterion (. ())));   

here

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -