use of org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_TYPE in project carbon-identity-framework by wso2.
the class SecretDAOImpl method replaceSecretType.
@Override
public void replaceSecretType(SecretType secretType) throws SecretManagementException {
NamedJdbcTemplate jdbcTemplate = getNewTemplate();
try {
jdbcTemplate.executeInsert(UPDATE_SECRET_TYPE, preparedStatement -> {
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_NAME, secretType.getName());
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_DESCRIPTION, secretType.getDescription());
preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_ID, secretType.getId());
}, secretType, false);
} catch (DataAccessException e) {
throw handleServerException(ERROR_CODE_UPDATE_SECRET_TYPE, secretType.getName(), e);
}
}
Aggregations