Interface IdGeneration
public interface IdGeneration
Describes how obtaining generated ids after an insert works for a given JDBC driver.
- Since:
- 2.1
- Author:
- Jens Schauder, Chirag Tailor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IdGeneration
A default instance working for many databases and equivalent to Spring Data JDBCs behavior before version 2.1. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Does the driver require the specification of those columns for which a generated id shall be returned.default boolean
Does the driver support id generation for batch operations.
-
Field Details
-
DEFAULT
A default instance working for many databases and equivalent to Spring Data JDBCs behavior before version 2.1.
-
-
Method Details
-
driverRequiresKeyColumnNames
default boolean driverRequiresKeyColumnNames()Does the driver require the specification of those columns for which a generated id shall be returned.This should be false for most dialects. One notable exception is Oracle.
- Returns:
- true if the a list of column names should get passed to the JDBC driver for which ids shall be generated.
- See Also:
-
supportedForBatchOperations
default boolean supportedForBatchOperations()Does the driver support id generation for batch operations.This should be true for most dialects, except DB2 and SqlServer.
- Returns:
- true if the JDBC driver supports generated keys for batch operations.
- Since:
- 2.4
- See Also:
-