Class UserMigrationService
java.lang.Object
org.eblocker.server.common.data.migrations.UserMigrationService
-
Constructor Summary
ConstructorsConstructorDescriptionUserMigrationService(redis.clients.jedis.JedisPool jedisPool, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(Class<UserModuleOld> entityClass, Integer id) get(Class<UserModuleOld> entityClass, Integer id) getAll()For new parental control we need to remove the dashboard cards from the user and replace them by dashboard card IDs.save(UserModuleOld oldUser, Integer id)
-
Constructor Details
-
UserMigrationService
@Inject public UserMigrationService(redis.clients.jedis.JedisPool jedisPool, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
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
-
delete
-
save
-