vendredi 3 avril 2015

What is 'where()' in SimpleMongoRepository?

I'm implementing a custom MongoRepository starting from sources of SimpleMongoRepository included in Spring Data MongoDB classes.


Analysing the code I found this method:



private Criteria getIdCriteria(Object id) {
return where(entityInformation.getIdAttribute()).is(id);
}


that uses a syntax I can't understand: what is where(...)? Is it a method? Where is defined?


I noticed that it seems to be a Criteria.where() method, but SimpleMongoRepository just implements MongoRepository interface, so where this method is defined?


Note this code can't even be compiled because Eclipse doesn't find a definition for where().


Aucun commentaire:

Enregistrer un commentaire