Class DefaultSerialNumberDAO
java.lang.Object
de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO
- All Implemented Interfaces:
SerialNumberDAO
Default persistence implementation of
SerialNumberDAO. Use existing number series tables. Please make sure to
call initPersistence() once at each tenant start. This will initialize database tables and patch old number
series data if necessary.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidalterSeriesTable(Connection conn, DeploymentImpl deployments, ItemDeployment depl, de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) protected StringvoidcreateSeries(String key, int type, long startValue) Deprecated, for removal: This API element is subject to removal in a future version.since agesvoidcreateSeries(String key, int type, long startValue, String template) protected voidcreateSeriesTable(Connection conn, DeploymentImpl deployments, ItemDeployment depl) fetchUniqueRange(String key, int count) protected ConnectiongetCurrent(String key) protected HybrisDataSourceprotected de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfogetTableInfo(Connection conn, String expectedName) voidprotected voidinitTable(Connection conn, DeploymentImpl deployments, ItemDeployment depl, de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) protected booleanisOldNumerMigrationRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) protected booleanisSchemaInitOrUpdateRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) voidremoveSeries(String key) voidresetSeries(String key, int type, long startValue) protected voidtryToClose(Connection connection, Statement statement, ResultSet resultSet) protected voidtryToClose(Statement statement, ResultSet resultSet)
-
Field Details
-
CONFIG_PARAM_SYNCHRONIZE_NUMBERGENERATION
- See Also:
-
CONFIG_PARAM_MAX_RETRIES
- See Also:
-
-
Constructor Details
-
DefaultSerialNumberDAO
-
-
Method Details
-
calculateTableName
-
getDataSource
-
getConnection
- Throws:
SQLException
-
createSeries
- Specified by:
createSeriesin interfaceSerialNumberDAO
-
createSeries
@Deprecated(since="ages", forRemoval=true) public void createSeries(String key, int type, long startValue) Deprecated, for removal: This API element is subject to removal in a future version.since ages- Specified by:
createSeriesin interfaceSerialNumberDAO
-
fetchUniqueRange
- Specified by:
fetchUniqueRangein interfaceSerialNumberDAO
-
removeSeries
- Specified by:
removeSeriesin interfaceSerialNumberDAO
-
resetSeries
- Specified by:
resetSeriesin interfaceSerialNumberDAO
-
getCurrent
- Specified by:
getCurrentin interfaceSerialNumberDAO
-
getAllCurrent
- Specified by:
getAllCurrentin interfaceSerialNumberDAO
-
initPersistence
public void initPersistence() -
isOldNumerMigrationRequired
protected boolean isOldNumerMigrationRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) -
isSchemaInitOrUpdateRequired
protected boolean isSchemaInitOrUpdateRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) -
initTable
protected void initTable(Connection conn, DeploymentImpl deployments, ItemDeployment depl, de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) -
alterSeriesTable
protected void alterSeriesTable(Connection conn, DeploymentImpl deployments, ItemDeployment depl, de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) -
createSeriesTable
-
tryToClose
-
tryToClose
-
getTableInfo
protected de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo getTableInfo(Connection conn, String expectedName)
-