Spring Data Document

org.springframework.data.mongodb.core
Class CollectionOptions

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

public class CollectionOptions
extends Object

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

Author:
Thomas Risberg

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

Constructor Detail

CollectionOptions

public CollectionOptions(Integer size,
                         Integer maxDocuments,
                         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 Integer getMaxDocuments()

setMaxDocuments

public void setMaxDocuments(Integer maxDocuments)

getSize

public Integer getSize()

setSize

public void setSize(Integer size)

getCapped

public Boolean getCapped()

setCapped

public void setCapped(Boolean capped)

Spring Data Document

Copyright © 2012. All Rights Reserved.