enlarged config value size
This commit is contained in:
@ -27,7 +27,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
|
||||
<type name="varchar" length="200"/>
|
||||
</column>
|
||||
<column name="config_value">
|
||||
<type name="varchar" length="200"/>
|
||||
<type name="varchar" length="2000"/>
|
||||
</column>
|
||||
<constraint name="config_pk" type="pk-constr" table="public.config">
|
||||
<columns names="application,config_key,config_key_account" ref-type="src-columns"/>
|
||||
|
||||
@ -8,3 +8,4 @@ DROP TABLE IF EXISTS application_permission CASCADE;
|
||||
DROP TABLE IF EXISTS application CASCADE;
|
||||
DROP TABLE IF EXISTS account_history CASCADE;
|
||||
DROP TABLE IF EXISTS mail_template CASCADE;
|
||||
DROP TABLE IF EXISTS api_key CASCADE;
|
||||
@ -135,6 +135,21 @@ public class ConfigService implements Serializable {
|
||||
return configValue;
|
||||
}
|
||||
|
||||
@Lock(LockType.READ)
|
||||
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
|
||||
public String getConfigValue(String configKey, String defaultValue, String accountName, boolean fallbackToSystem) throws ConfigException {
|
||||
Account account = getAccount(accountName);
|
||||
if (account == null) {
|
||||
if (fallbackToSystem) {
|
||||
return getConfigValue (configKey);
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
} else {
|
||||
return getConfigValue (configKey, account, fallbackToSystem);
|
||||
}
|
||||
}
|
||||
|
||||
@Lock(LockType.READ)
|
||||
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
|
||||
public String getConfigValue(String configKey, Account account, boolean fallbackToSystem) throws ConfigException {
|
||||
|
||||
@ -71,7 +71,7 @@ public class ConfigEntity implements Serializable {
|
||||
|
||||
@EmbeddedId
|
||||
protected ConfigEntityPK configPK;
|
||||
@Size(max = 200)
|
||||
@Size(max = 2000)
|
||||
@Column(name = "config_value")
|
||||
private String configValue;
|
||||
@Size(max = 200)
|
||||
|
||||
Reference in New Issue
Block a user