public class ReservedIdProvider extends java.lang.Object implements IdProvider
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
available |
protected Config |
config |
protected EntityType<?> |
entityType |
protected long[] |
identities |
protected int |
index |
protected int |
reservationSize |
| Constructor and Description |
|---|
ReservedIdProvider(Config config,
EntityType<?> entityType,
int reservationSize) |
| Modifier and Type | Method and Description |
|---|---|
protected Sql<?> |
createSql() |
long |
get()
Provides the identity value.
|
protected long[] |
getIdentities() |
boolean |
isAvailable()
Whether this provider can return the identity value.
|
protected void |
setupOptions(java.sql.PreparedStatement preparedStatement) |
protected final Config config
protected final EntityType<?> entityType
protected final int reservationSize
protected final boolean available
protected long[] identities
protected int index
public ReservedIdProvider(Config config, EntityType<?> entityType, int reservationSize)
public boolean isAvailable()
IdProviderisAvailable in interface IdProvidertrue if this provider can return the identity valuepublic long get()
IdProviderget in interface IdProviderprotected long[] getIdentities()
protected Sql<?> createSql()
protected void setupOptions(java.sql.PreparedStatement preparedStatement)
throws java.sql.SQLException
java.sql.SQLException