Class UpdateResult

java.lang.Object
org.litebridge.db.spi.update.UpdateResult
Direct Known Subclasses:
InsertResult

public sealed class UpdateResult extends Object permits InsertResult
Result of an update operation performed on the database.

It encapsulates the number of rows affected by the operation.

This class is a sealed type and only permits a specific subclass: InsertResult.

  • Constructor Summary

    Constructors
    Constructor
    Description
    UpdateResult(int rowsAffected)
    Constructs an UpdateResult instance representing the result of an update operation performed on the database.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the number of rows affected by the database update operation.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • UpdateResult

      public UpdateResult(int rowsAffected)
      Constructs an UpdateResult instance representing the result of an update operation performed on the database.
      Parameters:
      rowsAffected - The number of rows affected by the update operation.
  • Method Details

    • rowsAffected

      public int rowsAffected()
      Retrieves the number of rows affected by the database update operation.
      Returns:
      The number of rows that were modified or impacted as a result of the executed update operation.
    • toString

      public String toString()
      Overrides:
      toString in class Object