Class RenameCollectionOptions

java.lang.Object
com.mongodb.client.model.RenameCollectionOptions

public class RenameCollectionOptions extends Object
The options to apply when renaming a collection.
Since:
3.0
MongoDB documentation
renameCollection
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    dropTarget(boolean dropTarget)
    Sets if mongod should drop the target of renameCollection prior to renaming the collection.
    boolean
    Gets if mongod should drop the target of renameCollection prior to renaming the collection.
     

    Methods inherited from class java.lang.Object

    getClass, wait, wait
  • Constructor Details

    • RenameCollectionOptions

      public RenameCollectionOptions()
  • Method Details

    • isDropTarget

      public boolean isDropTarget()
      Gets if mongod should drop the target of renameCollection prior to renaming the collection.
      Returns:
      true if mongod should drop the target of renameCollection prior to renaming the collection.
    • dropTarget

      public RenameCollectionOptions dropTarget(boolean dropTarget)
      Sets if mongod should drop the target of renameCollection prior to renaming the collection.
      Parameters:
      dropTarget - true if mongod should drop the target of renameCollection prior to renaming the collection.
      Returns:
      this
    • toString

      public String toString()
      Overrides:
      Object