springframework data mongodb core query Criteria -


want activity if activity.getusername() == null appropriate activity.getdatetime()

public list<activity> find(activity activity) {     query query = new query(             criteria                     .where("datetime").is(activity.getdatetime())                     .and("username").is(activity.getusername())     );     return mongotemplate.find(query, activity.class); } 

how can this?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -