Package com.helixframework.db.repository
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 TypeMethodDescriptionintexecute(Connection conn) Executes the update or specified database operation associated with the current implementation of the UpdateSpecification interface.default StringgetName()Retrieves the name associated with this update specification.default StringgetTxId()Retrieves the transaction ID associated with this update specification.
-
Method Details
-
getName
Retrieves the name associated with this update specification. Defaults to the simple class name.- Returns:
- the name of the update specification
-
getTxId
Retrieves the transaction ID associated with this update specification.- Returns:
- the transaction ID
-
execute
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
-