![JAR search and dependency download from the Maven repository](/logo.png)
com.despegar.integration.mongo.query.GroupQuery Maven / Gradle / Ivy
package com.despegar.integration.mongo.query;
import java.util.HashMap;
import java.util.Map;
public class GroupQuery {
private Map operators = new HashMap();
private Object id;
public GroupQuery id(Expression expression) {
this.id = expression;
return this;
}
public GroupQuery id(String property) {
this.id = property;
return this;
}
@SuppressWarnings("unchecked")
public GroupQuery addToId(String name, Expression expression) {
if (this.id == null || !(this.id instanceof Map)) {
this.id = new HashMap();
}
Map map = (HashMap) this.id;
map.put(name, expression);
return this;
}
@SuppressWarnings("unchecked")
public GroupQuery addToId(String name, String property) {
if (this.id == null || !(this.id instanceof Map)) {
this.id = new HashMap();
}
Map map = (HashMap) this.id;
map.put(name, property);
return this;
}
public GroupQuery put(String key, Expression expression) {
this.operators.put(key, expression);
return this;
}
public Map getProperties() {
return this.operators;
}
public Object getId() {
return this.id;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy