![JAR search and dependency download from the Maven repository](/logo.png)
com.despegar.integration.mongo.query.Update Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongo-connector Show documentation
Show all versions of mongo-connector Show documentation
Helper component to connect to mongo fast and easy
package com.despegar.integration.mongo.query;
import java.util.HashMap;
import java.util.Map;
public class Update {
public static enum UpdateOperation {
SET, UNSET, INC, RENAME, ADD_TO_SET, POP, PULL_ALL, PULL, PUSH
}
private Map properties = new HashMap();
private UpdateOperation updateOperation = null;
public UpdateOperation getUpdateOperation() {
return this.updateOperation;
}
public Update put(String property, Object value) {
if (property != null) {
Object convertedValue = value instanceof Enum ? value.toString() : value;
this.getProperties().put(property, convertedValue);
}
return this;
}
public Map getProperties() {
return this.properties;
}
public void setUpdateOperation(UpdateOperation updateOperation) {
this.updateOperation = updateOperation;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy