java.lang.Object
org.litebridge.db.spi.update.UpdateResult
org.litebridge.db.spi.update.InsertResult
The result of an insert operation performed on the database.
This class extends UpdateResult and adds the capability to hold
any generated keys resulting from the insert operation.
Instances of this class encapsulate both the number of rows affected by the insert operation and optionally a list of generated keys, if applicable.
-
Constructor Summary
ConstructorsConstructorDescriptionInsertResult(int rowsAffected) Constructs anInsertResultinstance representing the result of an insert operation performed on the database.InsertResult(int rowsAffected, Map<ColumnMetaData, Object> generatedKeys) Constructs anInsertResultinstance representing the result of an insert operation performed on the database. -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of generated keys resulting from the insert operation.toString()Methods inherited from class org.litebridge.db.spi.update.UpdateResult
rowsAffected
-
Constructor Details
-
InsertResult
public InsertResult(int rowsAffected) Constructs anInsertResultinstance representing the result of an insert operation performed on the database.- Parameters:
rowsAffected- The number of rows affected by the insert operation.
-
InsertResult
Constructs anInsertResultinstance representing the result of an insert operation performed on the database.- Parameters:
rowsAffected- The number of rows affected by the insert operation.generatedKeys- A map of generated keys resulting from the insert operation.
-
-
Method Details
-
generatedKeys
Returns a map of generated keys resulting from the insert operation.- Returns:
- A map of generated keys.
-
toString
- Overrides:
toStringin classUpdateResult
-