Class UserMigrationService

java.lang.Object
org.eblocker.server.common.data.migrations.UserMigrationService

public class UserMigrationService extends Object
  • Constructor Details

    • UserMigrationService

      @Inject public UserMigrationService(redis.clients.jedis.JedisPool jedisPool, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • getAll

      public List<UserModuleOld> getAll()
      For new parental control we need to remove the dashboard cards from the user and replace them by dashboard card IDs. Since the getter for the dashboard cards is used in the SchemaMigrations, we cannot remove it w/o breaking the migration. So we deprecate the old user module and introduce a new one in the latest SchemaMigration (version 38), in which we migrate UserModuleOld to UserModule.

      To load the old UserModule into the deprecated type (UserModuleOld), we have to access the datastore directly. Hence the Jedis operations.

    • get

      public UserModuleOld get(Class<UserModuleOld> entityClass, Integer id)
    • delete

      public void delete(Class<UserModuleOld> entityClass, Integer id)
    • save

      public UserModuleOld save(UserModuleOld oldUser, Integer id)