List of usage examples for com.mongodb QueryOperators NE
String NE
To view the source code for com.mongodb QueryOperators NE.
Click Source Link
From source file:org.tinygroup.mongodb.engine.comparemode.impl.NotContainsWithCompareMode.java
License:GNU General Public License
public BSONObject generateBSONObject(String propertyName, Object value, Context context) { Pattern pattern = Pattern.compile("^.*" + value + ".*$", Pattern.MULTILINE); BSONObject bsonObject = new BasicDBObject("$regex", pattern); return new BasicDBObject(propertyName, new BasicDBObject(QueryOperators.NE, bsonObject)); }
From source file:org.tinygroup.mongodb.engine.comparemode.impl.NotEqualsCompareMode.java
License:GNU General Public License
public BSONObject generateBSONObject(String propertyName, Object value, Context context) { return new BasicDBObject(propertyName, new BasicDBObject(QueryOperators.NE, value)); }