Interface UpdateSpecification


public interface UpdateSpecification
The UpdateSpecification interface defines a contract for performing update operations on a database. It encapsulates the behavior of executing an update and retrieving metadata about the update specification, such as its name and associated transaction ID.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Executes the update or specified database operation associated with the current implementation of the UpdateSpecification interface.
    default String
    Retrieves the name associated with this update specification.
    default String
    Retrieves the transaction ID associated with this update specification.
  • Method Details

    • getName

      default String getName()
      Retrieves the name associated with this update specification. Defaults to the simple class name.
      Returns:
      the name of the update specification
    • getTxId

      default String getTxId()
      Retrieves the transaction ID associated with this update specification.
      Returns:
      the transaction ID
    • execute

      int execute(Connection conn) throws SQLException
      Executes the update or specified database operation associated with the current implementation of the UpdateSpecification interface.
      Parameters:
      conn - the database connection to be used for executing the operation
      Returns:
      the count of rows affected as an integer result
      Throws:
      SQLException - if a database access error occurs or the operation fails to execute