org.springframework.data.document.mongodb
Class CollectionOptions

java.lang.Object
  extended by org.springframework.data.document.mongodb.CollectionOptions

public class CollectionOptions
extends java.lang.Object

Provides a simple wrapper to encapsulate the variety of settings you can use when creating a collection.

Author:
Thomas Risberg

Field Summary
private  java.lang.Boolean capped
           
private  java.lang.Integer maxDocuments
           
private  java.lang.Integer size
           
 
Constructor Summary
CollectionOptions(java.lang.Integer size, java.lang.Integer maxDocuments, java.lang.Boolean capped)
          Constructs a new CollectionOptions instance.
 
Method Summary
 java.lang.Boolean getCapped()
           
 java.lang.Integer getMaxDocuments()
           
 java.lang.Integer getSize()
           
 void setCapped(java.lang.Boolean capped)
           
 void setMaxDocuments(java.lang.Integer maxDocuments)
           
 void setSize(java.lang.Integer size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxDocuments

private java.lang.Integer maxDocuments

size

private java.lang.Integer size

capped

private java.lang.Boolean capped
Constructor Detail

CollectionOptions

public CollectionOptions(java.lang.Integer size,
                         java.lang.Integer maxDocuments,
                         java.lang.Boolean capped)
Constructs a new CollectionOptions instance.

Parameters:
size - the collection size in bytes, this data space is preallocated
maxDocuments - the maximum number of documents in the collection.
capped - true to created a "capped" collection (fixed size with auto-FIFO behavior based on insertion order), false otherwise.
Method Detail

getMaxDocuments

public java.lang.Integer getMaxDocuments()

setMaxDocuments

public void setMaxDocuments(java.lang.Integer maxDocuments)

getSize

public java.lang.Integer getSize()

setSize

public void setSize(java.lang.Integer size)

getCapped

public java.lang.Boolean getCapped()

setCapped

public void setCapped(java.lang.Boolean capped)