public class DefaultSerialNumberDAO extends java.lang.Object implements SerialNumberDAO
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.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIG_PARAM_MAX_RETRIES |
static java.lang.String |
CONFIG_PARAM_SYNCHRONIZE_NUMBERGENERATION |
| Constructor and Description |
|---|
DefaultSerialNumberDAO(Tenant t,
HybrisDataSource initDataSource) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
alterSeriesTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl,
de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) |
protected java.lang.String |
calculateTableName(HybrisDataSource ds) |
void |
createSeries(java.lang.String key,
int type,
long startValue)
Deprecated.
since ages
|
void |
createSeries(java.lang.String key,
int type,
long startValue,
java.lang.String template) |
protected void |
createSeriesTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl) |
NumberSeries |
fetchUniqueRange(java.lang.String key,
int count) |
java.util.Collection<NumberSeries> |
getAllCurrent() |
protected java.sql.Connection |
getConnection(HybrisDataSource ds) |
NumberSeries |
getCurrent(java.lang.String key) |
protected HybrisDataSource |
getDataSource() |
protected de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo |
getTableInfo(java.sql.Connection conn,
java.lang.String expectedName) |
void |
initPersistence() |
protected void |
initTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl,
de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) |
protected boolean |
isOldNumerMigrationRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) |
protected boolean |
isSchemaInitOrUpdateRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info) |
void |
removeSeries(java.lang.String key) |
void |
resetSeries(java.lang.String key,
int type,
long startValue) |
protected void |
tryToClose(java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet) |
protected void |
tryToClose(java.sql.Statement statement,
java.sql.ResultSet resultSet) |
public static final java.lang.String CONFIG_PARAM_SYNCHRONIZE_NUMBERGENERATION
public static final java.lang.String CONFIG_PARAM_MAX_RETRIES
public DefaultSerialNumberDAO(Tenant t, HybrisDataSource initDataSource)
protected java.lang.String calculateTableName(HybrisDataSource ds)
protected HybrisDataSource getDataSource()
protected java.sql.Connection getConnection(HybrisDataSource ds) throws java.sql.SQLException
java.sql.SQLExceptionpublic void createSeries(java.lang.String key,
int type,
long startValue,
java.lang.String template)
createSeries in interface SerialNumberDAO@Deprecated
public void createSeries(java.lang.String key,
int type,
long startValue)
createSeries in interface SerialNumberDAOpublic NumberSeries fetchUniqueRange(java.lang.String key, int count)
fetchUniqueRange in interface SerialNumberDAOpublic void removeSeries(java.lang.String key)
removeSeries in interface SerialNumberDAOpublic void resetSeries(java.lang.String key,
int type,
long startValue)
resetSeries in interface SerialNumberDAOpublic NumberSeries getCurrent(java.lang.String key)
getCurrent in interface SerialNumberDAOpublic java.util.Collection<NumberSeries> getAllCurrent()
getAllCurrent in interface SerialNumberDAOpublic void initPersistence()
protected boolean isOldNumerMigrationRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info)
protected boolean isSchemaInitOrUpdateRequired(de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info)
protected void initTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl,
de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info)
protected void alterSeriesTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl,
de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo info)
protected void createSeriesTable(java.sql.Connection conn,
DeploymentImpl deployments,
ItemDeployment depl)
protected void tryToClose(java.sql.Statement statement,
java.sql.ResultSet resultSet)
protected void tryToClose(java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet)
protected de.hybris.platform.persistence.numberseries.DefaultSerialNumberDAO.TableInfo getTableInfo(java.sql.Connection conn,
java.lang.String expectedName)
Copyright © 2018 SAP SE. All Rights Reserved.