Class FindAndDeleteOptions

  • java.lang.Object
    • com.mongodb.client.model.FindOneAndDeleteOptions
      • dev.morphia.query.FindAndDeleteOptions
  • All Implemented Interfaces:
    dev.morphia.internal.SessionConfigurable<FindAndDeleteOptions>, dev.morphia.internal.WriteConfigurable<FindAndDeleteOptions>

    public class FindAndDeleteOptions
    extends com.mongodb.client.model.FindOneAndDeleteOptions
    implements dev.morphia.internal.SessionConfigurable<FindAndDeleteOptions>, dev.morphia.internal.WriteConfigurable<FindAndDeleteOptions>
    Defines options to use for find and delete operations
    • Constructor Detail

      • FindAndDeleteOptions

        public FindAndDeleteOptions()
    • Method Detail

      • clientSession

        public FindAndDeleteOptions clientSession​(com.mongodb.client.ClientSession clientSession)
        Description copied from interface: dev.morphia.internal.SessionConfigurable
        Set the client session to use for the insert.
        Specified by:
        clientSession in interface dev.morphia.internal.SessionConfigurable<FindAndDeleteOptions>
        Parameters:
        clientSession - the client session
        Returns:
        this
      • clientSession

        public com.mongodb.client.ClientSession clientSession()
        Description copied from interface: dev.morphia.internal.SessionConfigurable
        The client session to use for the insertion.
        Specified by:
        clientSession in interface dev.morphia.internal.SessionConfigurable<FindAndDeleteOptions>
        Returns:
        the client session
      • projection

        public FindAndDeleteOptions projection​(org.bson.conversions.Bson projection)
        Overrides:
        projection in class com.mongodb.client.model.FindOneAndDeleteOptions
      • sort

        public FindAndDeleteOptions sort​(org.bson.conversions.Bson sort)
        Overrides:
        sort in class com.mongodb.client.model.FindOneAndDeleteOptions
      • maxTime

        public FindAndDeleteOptions maxTime​(long maxTime,
                                            TimeUnit timeUnit)
        Overrides:
        maxTime in class com.mongodb.client.model.FindOneAndDeleteOptions
      • collation

        public FindAndDeleteOptions collation​(com.mongodb.client.model.Collation collation)
        Overrides:
        collation in class com.mongodb.client.model.FindOneAndDeleteOptions
      • sort

        public FindAndDeleteOptions sort​(org.bson.Document sort)
        Parameters:
        sort - the sort to apply
        Returns:
        this
      • writeConcern

        public com.mongodb.WriteConcern writeConcern()
        Description copied from interface: dev.morphia.internal.WriteConfigurable
        The write concern to use. By default the write concern configured for the MongoCollection instance will be used.
        Specified by:
        writeConcern in interface dev.morphia.internal.WriteConfigurable<FindAndDeleteOptions>
        Returns:
        the write concern to use
      • writeConcern

        public FindAndDeleteOptions writeConcern​(com.mongodb.WriteConcern writeConcern)
        Sets the write concern
        Specified by:
        writeConcern in interface dev.morphia.internal.WriteConfigurable<FindAndDeleteOptions>
        Parameters:
        writeConcern - the write concern
        Returns:
        this