@Service
public class PropertyService
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private static org.apache.log4j.Logger |
logger |
|
(package private) PropertyRepository |
propertyRepository |
Constructor | Description |
---|---|
PropertyService() |
Modifier and Type | Method | Description |
---|---|---|
void |
deleteProperty(java.lang.String propertyName) |
Delete the property by the input propertyName.
|
java.lang.String |
getProperty(java.lang.String propertyName) |
Get property value by the input property name.
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertyMap() |
Get all property from database, return a map view of properties.
|
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue) |
Save or update property by the input name and value.
|
@Autowired PropertyRepository propertyRepository
private static final org.apache.log4j.Logger logger
@Transactional public java.lang.String getProperty(java.lang.String propertyName)
null
;@Transactional public void deleteProperty(java.lang.String propertyName)
@Transactional public void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
java.lang.NullPointerException
- if the input property name is null.@Transactional public java.util.Map<java.lang.String,java.lang.String> getPropertyMap()
Map
of property name and value pair.