MIFOSX-2043 Adding new Database column 'key' to password preferences to support localization of description values.
This commit is contained in:
+3
-1
@@ -18,11 +18,13 @@ public class PasswordValidationPolicyData implements Serializable {
|
||||
private final String description;
|
||||
@SuppressWarnings("unused")
|
||||
private final boolean active;
|
||||
private final String key;
|
||||
|
||||
public PasswordValidationPolicyData(final Long id, final Boolean active, final String description) {
|
||||
public PasswordValidationPolicyData(final Long id, final Boolean active, final String description, final String key) {
|
||||
this.id = id;
|
||||
this.active = active;
|
||||
this.description = description;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
}
|
||||
+4
-2
@@ -56,12 +56,14 @@ public class PasswordValidationPolicyReadPlatformServiceImpl implements Password
|
||||
final Long id = JdbcSupport.getLong(rs, "id");
|
||||
final Boolean active = rs.getBoolean("active");
|
||||
final String description = rs.getString("description");
|
||||
final String key = rs.getString("key");
|
||||
|
||||
return new PasswordValidationPolicyData(id, active, description);
|
||||
return new PasswordValidationPolicyData(id, active, description, key);
|
||||
}
|
||||
|
||||
public String schema() {
|
||||
return " pvp.id as id, pvp.active as active, pvp.description as description from m_password_validation_policy pvp";
|
||||
return " pvp.id as id, pvp.active as active, pvp.description as description, pvp.`key` as `key`"
|
||||
+ " from m_password_validation_policy pvp";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE `m_password_validation_policy` ADD COLUMN `key` VARCHAR(255) NOT NULL;
|
||||
|
||||
UPDATE `m_password_validation_policy` pvp SET pvp.`key`='simple' where pvp.id='1' ;
|
||||
UPDATE `m_password_validation_policy` pvp SET pvp.`key`='secure' where pvp.id='2' ;
|
||||
Reference in New Issue
Block a user