java.lang.Object
org.litebridge.db.spi.update.UpdateResult
org.litebridge.db.spi.update.InsertResult
- All Implemented Interfaces:
Result,UpdateOpResult
The result of an insert operation performed on the database.
This class extends UpdateOpResult and adds the ability 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 map of generated keys, if applicable.
-
Constructor Summary
ConstructorsConstructorDescriptionInsertResult(int rowsInserted) Constructs anInsertOpResultinstance representing the result of an insert operation performed on the database.InsertResult(int rowsInserted, List<Map<ColumnMetaData, Object>> generatedKeys) Constructs anInsertOpResultinstance representing the result of a multi-row insert operation performed on the database.InsertResult(int rowsInserted, Map<ColumnMetaData, Object> generatedKeys) Constructs anInsertOpResultinstance representing the result of a single insert operation performed on the database. -
Method Summary
Modifier and TypeMethodDescriptionReturns a per-row list 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 rowsInserted) Constructs anInsertOpResultinstance representing the result of an insert operation performed on the database.- Parameters:
rowsInserted- The number of rows inserted by the operation.
-
InsertResult
Constructs anInsertOpResultinstance representing the result of a single insert operation performed on the database.- Parameters:
generatedKeys- A map of generated keys resulting from the insert operation.
-
InsertResult
Constructs anInsertOpResultinstance representing the result of a multi-row insert operation performed on the database.- Parameters:
rowsInserted- The number of rows inserted by the operation.generatedKeys- A map of generated keys resulting from the insert operation.
-
-
Method Details
-
generatedKeys
Returns a per-row list of generated keys resulting from the insert operation.- Returns:
- List for each affected row, containing a map of generated keys.
-
toString
- Overrides:
toStringin classUpdateResult
-