List of usage examples for org.springframework.data.mongodb.core CollectionOptions getMaxDocuments
public Optional<Long> getMaxDocuments()
From source file:org.springframework.data.mongodb.core.MongoTemplate.java
protected DBObject convertToDbObject(CollectionOptions collectionOptions) { DBObject dbo = new BasicDBObject(); if (collectionOptions != null) { if (collectionOptions.getCapped() != null) { dbo.put("capped", collectionOptions.getCapped().booleanValue()); }/*from w ww. jav a 2 s. c om*/ if (collectionOptions.getSize() != null) { dbo.put("size", collectionOptions.getSize().intValue()); } if (collectionOptions.getMaxDocuments() != null) { dbo.put("max", collectionOptions.getMaxDocuments().intValue()); } } return dbo; }