Package com.saperion.settings
Class Setting
java.lang.Object
com.saperion.settings.Setting
- All Implemented Interfaces:
Serializable
A setting that is stored in the database. Just like in an ini-file, a setting is
identified by it's name and section, which together must be unique. Both name and
section are not case-sensitive.
The length of the value of a regular setting is limited to 2KB. A setting with
a long value is limited by the maximum size of a CLOB field in the database.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new setting.Creates a new setting with a value that can be longer than 2KB if needed.Creates a new setting with a value that can be longer than 2KB if needed and a timestamp. -
Method Summary
-
Constructor Details
-
Setting
Creates a new setting.- Parameters:
value
- the setting's value as a string limited to 2KBname
- the setting's name as a string limited to 512Bsection
- the setting's section as a string limited to 512B
-
Setting
Creates a new setting with a value that can be longer than 2KB if needed.- Parameters:
value
- the setting's value. If longValue is set to true this can be longer than 2KB. Note that due to performance reasons, long values cannot hold unicode characters. You should encode the value to base64 if needed.longValue
- if true, the length of the value-string can exceed 2KBname
- the setting's name as a string limited to 512Bsection
- the setting's section as a string limited to 512B
-
Setting
Creates a new setting with a value that can be longer than 2KB if needed and a timestamp. To be used internally. Note that the last-modified date is set by the server automatically.- Parameters:
value
- the setting's value. If longValue is set to true this can be longer than 2KB. Note that due to performance reasons, long values cannot hold unicode characters. You should encode the value to base64 if needed.longValue
- if true, the length of the value-string can exceed 2KBname
- the setting's name as a string limited to 512Bsection
- the setting's section as a string limited to 512BlastModified
- the date at which this setting was last modified
-
-
Method Details
-
getValue
- Returns:
- the setting's value
-
getName
- Returns:
- the setting's name
-
getSection
- Returns:
- the setting's section
-
setValue
- Parameters:
value
- the new value (limited to 2KB)
-
setLongValue
- Parameters:
value
- the new value. Can be longer than 2KB.
-
isLongSetting
public boolean isLongSetting()- Returns:
- whether the value of the setting can be long (>2KB) or not
-
getLastModified
- Returns:
- the date at which this setting was modified last
-
toString
-
hashCode
public int hashCode() -
equals
-