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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

Ansible warning on jinja2 braces on when -