Class InsertOneModel<T>

  • Type Parameters:
    T - the type of document to insert. This can be of any type for which a Codec is registered

    public final class InsertOneModel<T>
    extends WriteModel<T>
    A model describing an insert of a single document.
    Since:
    3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      InsertOneModel​(T document)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getDocument()
      Gets the document to insert.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InsertOneModel

        public InsertOneModel​(T document)
        Construct a new instance.
        Parameters:
        document - the document to insert, which may not be null.
    • Method Detail

      • getDocument

        public T getDocument()
        Gets the document to insert.
        Returns:
        the document to insert
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object