Search in sources :

Example 6 with DataAccessException

use of org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException in project carbon-identity-framework by wso2.

the class UserSessionStore method getActiveSessionCount.

/**
 * Counts the number of active sessions of the given tenant domain. For a session to be active, the last access
 * time of the session should not be earlier than the session timeout time.
 *
 * @param tenantDomain tenant domain
 * @return number of active sessions of the given tenant domain
 * @throws UserSessionException if something goes wrong
 */
public int getActiveSessionCount(String tenantDomain) throws UserSessionException {
    int activeSessionCount = 0;
    int tenantId = IdentityTenantUtil.getTenantId(tenantDomain);
    long idleSessionTimeOut = TimeUnit.SECONDS.toMillis(IdPManagementUtil.getIdleSessionTimeOut(tenantDomain));
    long currentTime = System.currentTimeMillis();
    long minTimestamp = currentTime - idleSessionTimeOut;
    try (Connection connection = IdentityDatabaseUtil.getSessionDBConnection(false)) {
        String sqlStmt = isH2DB() ? SQLQueries.SQL_GET_ACTIVE_SESSION_COUNT_BY_TENANT_H2 : SQLQueries.SQL_GET_ACTIVE_SESSION_COUNT_BY_TENANT;
        try (PreparedStatement preparedStatement = connection.prepareStatement(sqlStmt)) {
            preparedStatement.setString(1, SessionMgtConstants.LAST_ACCESS_TIME);
            preparedStatement.setString(2, String.valueOf(minTimestamp));
            preparedStatement.setString(3, String.valueOf(currentTime));
            preparedStatement.setInt(4, tenantId);
            try (ResultSet resultSet = preparedStatement.executeQuery()) {
                if (resultSet.next()) {
                    activeSessionCount = resultSet.getInt(1);
                }
            }
            IdentityDatabaseUtil.commitTransaction(connection);
        }
    } catch (DataAccessException | SQLException e) {
        throw new UserSessionException("Error while retrieving active session count of the tenant domain, " + tenantDomain, e);
    }
    return activeSessionCount;
}
Also used : SQLException(java.sql.SQLException) Connection(java.sql.Connection) ResultSet(java.sql.ResultSet) PreparedStatement(java.sql.PreparedStatement) UserSessionException(org.wso2.carbon.identity.application.authentication.framework.exception.UserSessionException) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException)

Example 7 with DataAccessException

use of org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException in project carbon-identity-framework by wso2.

the class ConfigurationManagerTest method removeCreatedTimeColumn.

private void removeCreatedTimeColumn() throws DataAccessException {
    JdbcTemplate jdbcTemplate = JdbcUtils.getNewTemplate();
    jdbcTemplate.executeUpdate(REMOVE_CREATED_TIME_COLUMN_H2);
}
Also used : JdbcTemplate(org.wso2.carbon.database.utils.jdbc.JdbcTemplate)

Example 8 with DataAccessException

use of org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException in project carbon-identity-framework by wso2.

the class IdPManagementDAO method getIdPNameByMetadataProperty.

/**
 * Retrieves the first matching IDP for the given metadata property.
 * Intended to ony be used to retrieve IDP name based on a unique metadata property.
 *
 * @param dbConnection Optional. DB connection.
 * @param property IDP metadata property name.
 * @param value Value associated with given Property.
 * @param tenantId Tenant id whose information is requested.
 * @return Identity Provider name.
 * @throws IdentityProviderManagementException IdentityProviderManagementException.
 */
public String getIdPNameByMetadataProperty(Connection dbConnection, String property, String value, int tenantId) throws IdentityProviderManagementException {
    PreparedStatement prepStmt = null;
    ResultSet rs = null;
    boolean dbConnectionInitialized = true;
    if (dbConnection == null) {
        dbConnection = IdentityDatabaseUtil.getDBConnection(false);
    } else {
        dbConnectionInitialized = false;
    }
    try {
        String sqlStmt = isH2DB() ? IdPManagementConstants.SQLQueries.GET_IDP_NAME_BY_METADATA_H2 : IdPManagementConstants.SQLQueries.GET_IDP_NAME_BY_METADATA;
        prepStmt = dbConnection.prepareStatement(sqlStmt);
        prepStmt.setString(1, property);
        prepStmt.setString(2, value);
        prepStmt.setInt(3, tenantId);
        rs = prepStmt.executeQuery();
        String idPName = null;
        if (rs.next()) {
            idPName = rs.getString(1);
        }
        return idPName;
    } catch (DataAccessException | SQLException e) {
        throw new IdentityProviderManagementException("Error occurred while retrieving Identity Provider " + "information for IDP metadata property name: " + property + " value: " + value, e);
    } finally {
        if (dbConnectionInitialized) {
            IdentityDatabaseUtil.closeAllConnections(dbConnection, rs, prepStmt);
        } else {
            IdentityDatabaseUtil.closeAllConnections(null, rs, prepStmt);
        }
    }
}
Also used : SQLException(java.sql.SQLException) ResultSet(java.sql.ResultSet) PreparedStatement(java.sql.PreparedStatement) IdentityProviderManagementException(org.wso2.carbon.idp.mgt.IdentityProviderManagementException) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException)

Example 9 with DataAccessException

use of org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException in project carbon-identity-framework by wso2.

the class SecretDAOImpl method isExistingSecret.

@Override
public boolean isExistingSecret(String secretId, int tenantId) throws SecretManagementException {
    NamedJdbcTemplate jdbcTemplate = getNewTemplate();
    String secretName;
    try {
        secretName = jdbcTemplate.fetchSingleRecord(GET_SECRET_NAME_BY_ID, (resultSet, rowNumber) -> resultSet.getString(DB_SCHEMA_COLUMN_NAME_SECRET_NAME), preparedStatement -> {
            preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_ID, secretId);
            preparedStatement.setInt(DB_SCHEMA_COLUMN_NAME_TENANT_ID, tenantId);
        });
        return StringUtils.isNotEmpty(secretName);
    } catch (DataAccessException e) {
        throw handleServerException(ERROR_CODE_GET_SECRET, "id = " + secretId, e);
    }
}
Also used : DB_SCHEMA_COLUMN_NAME_CREATED_TIME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_CREATED_TIME) DB_SCHEMA_COLUMN_NAME_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_TYPE) StringUtils(org.apache.commons.lang.StringUtils) GET_SECRET_BY_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_BY_ID) IdentityDatabaseUtil(org.wso2.carbon.identity.core.util.IdentityDatabaseUtil) UPDATE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_TYPE) Date(java.util.Date) GET_SECRET_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_BY_NAME) DB_SCHEMA_COLUMN_NAME_SECRET_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_SECRET_NAME) SecretUtils.handleServerException(org.wso2.carbon.identity.secret.mgt.core.util.SecretUtils.handleServerException) ERROR_CODE_ADD_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_ADD_SECRET_TYPE) UPDATE_SECRET_DESCRIPTION(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_DESCRIPTION) ERROR_CODE_UPDATE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_UPDATE_SECRET_TYPE) ERROR_CODE_SECRETS_DOES_NOT_EXISTS(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_SECRETS_DOES_NOT_EXISTS) ERROR_CODE_DELETE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET) SecretType(org.wso2.carbon.identity.secret.mgt.core.model.SecretType) LambdaExceptionUtils(org.wso2.carbon.identity.core.util.LambdaExceptionUtils) TimeZone(java.util.TimeZone) Timestamp(java.sql.Timestamp) GET_SECRET_NAME_BY_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_NAME_BY_ID) UPDATE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET) Secret(org.wso2.carbon.identity.secret.mgt.core.model.Secret) DB_SCHEMA_COLUMN_NAME_LAST_MODIFIED(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_LAST_MODIFIED) List(java.util.List) ERROR_CODE_UPDATE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_UPDATE_SECRET) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException) UTC(java.time.ZoneOffset.UTC) LogFactory(org.apache.commons.logging.LogFactory) ERROR_CODE_GET_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_GET_SECRET) SecretManagementException(org.wso2.carbon.identity.secret.mgt.core.exception.SecretManagementException) INSERT_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.INSERT_SECRET) PrivilegedCarbonContext(org.wso2.carbon.context.PrivilegedCarbonContext) SQLIntegrityConstraintViolationException(java.sql.SQLIntegrityConstraintViolationException) NamedJdbcTemplate(org.wso2.carbon.database.utils.jdbc.NamedJdbcTemplate) DB_SCHEMA_COLUMN_NAME_SECRET_VALUE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_SECRET_VALUE) GET_SECRET_TYPE_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_TYPE_BY_NAME) Calendar(java.util.Calendar) DB_SCHEMA_COLUMN_NAME_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_NAME) SQLConstants(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants) SecretDAO(org.wso2.carbon.identity.secret.mgt.core.dao.SecretDAO) GET_SECRETS(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRETS) TransactionException(org.wso2.carbon.database.utils.jdbc.exceptions.TransactionException) IdentityTenantUtil(org.wso2.carbon.identity.core.util.IdentityTenantUtil) ERROR_CODE_ADD_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_ADD_SECRET) CryptoException(org.wso2.carbon.core.util.CryptoException) ERROR_CODE_SECRET_ALREADY_EXISTS(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_SECRET_ALREADY_EXISTS) ERROR_CODE_REPLACE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_REPLACE_SECRET) GET_SECRET_CREATED_TIME_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_CREATED_TIME_BY_NAME) NamedTemplate(org.wso2.carbon.database.utils.jdbc.NamedTemplate) UPDATE_SECRET_VALUE(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_VALUE) ERROR_CODE_DELETE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET_TYPE) SecretUtils.handleClientException(org.wso2.carbon.identity.secret.mgt.core.util.SecretUtils.handleClientException) DB_SCHEMA_COLUMN_NAME_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_ID) DB_SCHEMA_COLUMN_NAME_TENANT_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_TENANT_ID) Log(org.apache.commons.logging.Log) DB_SCHEMA_COLUMN_NAME_DESCRIPTION(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_DESCRIPTION) ERROR_CODE_RETRIEVE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_RETRIEVE_SECRET_TYPE) NamedJdbcTemplate(org.wso2.carbon.database.utils.jdbc.NamedJdbcTemplate) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException)

Example 10 with DataAccessException

use of org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException in project carbon-identity-framework by wso2.

the class SecretDAOImpl method getSecretTypeByName.

@Override
public SecretType getSecretTypeByName(String secretTypeName) throws SecretManagementException {
    NamedJdbcTemplate jdbcTemplate = getNewTemplate();
    SecretType secretTypeResponse;
    try {
        secretTypeResponse = jdbcTemplate.fetchSingleRecord(GET_SECRET_TYPE_BY_NAME, (resultSet, rowNumber) -> {
            SecretType secretType = new SecretType();
            secretType.setId(resultSet.getString(DB_SCHEMA_COLUMN_NAME_ID));
            secretType.setName(resultSet.getString(DB_SCHEMA_COLUMN_NAME_NAME));
            secretType.setDescription(resultSet.getString(DB_SCHEMA_COLUMN_NAME_DESCRIPTION));
            return secretType;
        }, preparedStatement -> preparedStatement.setString(DB_SCHEMA_COLUMN_NAME_NAME, secretTypeName));
        return secretTypeResponse;
    } catch (DataAccessException e) {
        throw handleServerException(ERROR_CODE_RETRIEVE_SECRET_TYPE, secretTypeName, e);
    }
}
Also used : DB_SCHEMA_COLUMN_NAME_CREATED_TIME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_CREATED_TIME) DB_SCHEMA_COLUMN_NAME_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_TYPE) StringUtils(org.apache.commons.lang.StringUtils) GET_SECRET_BY_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_BY_ID) IdentityDatabaseUtil(org.wso2.carbon.identity.core.util.IdentityDatabaseUtil) UPDATE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_TYPE) Date(java.util.Date) GET_SECRET_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_BY_NAME) DB_SCHEMA_COLUMN_NAME_SECRET_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_SECRET_NAME) SecretUtils.handleServerException(org.wso2.carbon.identity.secret.mgt.core.util.SecretUtils.handleServerException) ERROR_CODE_ADD_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_ADD_SECRET_TYPE) UPDATE_SECRET_DESCRIPTION(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_DESCRIPTION) ERROR_CODE_UPDATE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_UPDATE_SECRET_TYPE) ERROR_CODE_SECRETS_DOES_NOT_EXISTS(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_SECRETS_DOES_NOT_EXISTS) ERROR_CODE_DELETE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET) SecretType(org.wso2.carbon.identity.secret.mgt.core.model.SecretType) LambdaExceptionUtils(org.wso2.carbon.identity.core.util.LambdaExceptionUtils) TimeZone(java.util.TimeZone) Timestamp(java.sql.Timestamp) GET_SECRET_NAME_BY_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_NAME_BY_ID) UPDATE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET) Secret(org.wso2.carbon.identity.secret.mgt.core.model.Secret) DB_SCHEMA_COLUMN_NAME_LAST_MODIFIED(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_LAST_MODIFIED) List(java.util.List) ERROR_CODE_UPDATE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_UPDATE_SECRET) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException) UTC(java.time.ZoneOffset.UTC) LogFactory(org.apache.commons.logging.LogFactory) ERROR_CODE_GET_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_GET_SECRET) SecretManagementException(org.wso2.carbon.identity.secret.mgt.core.exception.SecretManagementException) INSERT_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.INSERT_SECRET) PrivilegedCarbonContext(org.wso2.carbon.context.PrivilegedCarbonContext) SQLIntegrityConstraintViolationException(java.sql.SQLIntegrityConstraintViolationException) NamedJdbcTemplate(org.wso2.carbon.database.utils.jdbc.NamedJdbcTemplate) DB_SCHEMA_COLUMN_NAME_SECRET_VALUE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_SECRET_VALUE) GET_SECRET_TYPE_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_TYPE_BY_NAME) Calendar(java.util.Calendar) DB_SCHEMA_COLUMN_NAME_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_NAME) SQLConstants(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants) SecretDAO(org.wso2.carbon.identity.secret.mgt.core.dao.SecretDAO) GET_SECRETS(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRETS) TransactionException(org.wso2.carbon.database.utils.jdbc.exceptions.TransactionException) IdentityTenantUtil(org.wso2.carbon.identity.core.util.IdentityTenantUtil) ERROR_CODE_ADD_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_ADD_SECRET) CryptoException(org.wso2.carbon.core.util.CryptoException) ERROR_CODE_SECRET_ALREADY_EXISTS(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_SECRET_ALREADY_EXISTS) ERROR_CODE_REPLACE_SECRET(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_REPLACE_SECRET) GET_SECRET_CREATED_TIME_BY_NAME(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.GET_SECRET_CREATED_TIME_BY_NAME) NamedTemplate(org.wso2.carbon.database.utils.jdbc.NamedTemplate) UPDATE_SECRET_VALUE(org.wso2.carbon.identity.secret.mgt.core.constant.SQLConstants.UPDATE_SECRET_VALUE) ERROR_CODE_DELETE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_DELETE_SECRET_TYPE) SecretUtils.handleClientException(org.wso2.carbon.identity.secret.mgt.core.util.SecretUtils.handleClientException) DB_SCHEMA_COLUMN_NAME_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_ID) DB_SCHEMA_COLUMN_NAME_TENANT_ID(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_TENANT_ID) Log(org.apache.commons.logging.Log) DB_SCHEMA_COLUMN_NAME_DESCRIPTION(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.DB_SCHEMA_COLUMN_NAME_DESCRIPTION) ERROR_CODE_RETRIEVE_SECRET_TYPE(org.wso2.carbon.identity.secret.mgt.core.constant.SecretConstants.ErrorMessages.ERROR_CODE_RETRIEVE_SECRET_TYPE) SecretType(org.wso2.carbon.identity.secret.mgt.core.model.SecretType) NamedJdbcTemplate(org.wso2.carbon.database.utils.jdbc.NamedJdbcTemplate) DataAccessException(org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException)

Aggregations

DataAccessException (org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException)79 JdbcTemplate (org.wso2.carbon.database.utils.jdbc.JdbcTemplate)58 PreparedStatement (java.sql.PreparedStatement)33 SQLException (java.sql.SQLException)33 List (java.util.List)31 Log (org.apache.commons.logging.Log)29 LogFactory (org.apache.commons.logging.LogFactory)29 TransactionException (org.wso2.carbon.database.utils.jdbc.exceptions.TransactionException)28 ArrayList (java.util.ArrayList)26 SQLIntegrityConstraintViolationException (java.sql.SQLIntegrityConstraintViolationException)25 Map (java.util.Map)25 HashMap (java.util.HashMap)24 HashSet (java.util.HashSet)22 Set (java.util.Set)22 StringUtils (org.apache.commons.lang.StringUtils)22 Timestamp (java.sql.Timestamp)21 IdentityTenantUtil (org.wso2.carbon.identity.core.util.IdentityTenantUtil)21 Date (java.util.Date)19 Calendar (java.util.Calendar)18 JdbcUtils.isH2DB (org.wso2.carbon.identity.core.util.JdbcUtils.isH2DB)18