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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -