Package org.mongojack
Class DBProjection.ProjectionBuilder
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- org.bson.BasicBSONObject
-
- com.mongodb.BasicDBObject
-
- org.mongojack.DBProjection.ProjectionBuilder
-
- All Implemented Interfaces:
com.mongodb.DBObject
,Serializable
,Cloneable
,Map<String,Object>
,org.bson.BSONObject
,org.bson.conversions.Bson
- Enclosing class:
- DBProjection
public static class DBProjection.ProjectionBuilder extends com.mongodb.BasicDBObject
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBProjection.ProjectionBuilder
exclude(String... fields)
Exclude the given fields from the results.DBProjection.ProjectionBuilder
include(String... fields)
Include the given fields in the results.-
Methods inherited from class com.mongodb.BasicDBObject
append, copy, equals, hashCode, isPartialObject, markAsPartialObject, parse, parse, toBsonDocument, toJson, toJson, toJson, toJson, toString
-
Methods inherited from class org.bson.BasicBSONObject
containsField, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getObjectId, getObjectId, getString, getString, putAll, putAll, removeField, toMap
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.bson.BSONObject
containsField, get, keySet, put, putAll, putAll, removeField, toMap
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
include
public DBProjection.ProjectionBuilder include(String... fields)
Include the given fields in the results.- Parameters:
fields
- The fields to include.- Returns:
- The projection.
-
exclude
public DBProjection.ProjectionBuilder exclude(String... fields)
Exclude the given fields from the results.- Parameters:
fields
- The fields to exclude.- Returns:
- The projection.
-
-