Interface PersistenceService
- All Known Implementing Classes:
PersistenceServiceImpl
public interface PersistenceService
This service wraps the JIRA PropertySetManager as well as provides automatic xstream serialization for a map of data
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove a property given the entity name, entity id and property key.void
Delete all properties for a given an entity name and entity idboolean
Exists a property for a given entity name and idgetBoolean
(String entityName, Long entityId, String key) Get a property value of type Boolean.Get a map data property for a given entity name, entity id and property keyGet a property value of type Double.getListData
(String entityName, Long entityId, String key) Get a list data property for a given entity name, entity id and property keyGet a property value of type Long.getPropertyAsType
(String entityName, Long entityId, String key) Return the property as whatever type it may be.Get a property value of type String.void
setBoolean
(String entityName, Long entityId, String key, Boolean value) Set a property value of type Boolean.void
Set a map data property.void
Set a property value of type Doublevoid
Set a list data property.void
Set a property value of type Longvoid
Set a property value of type String.
-
Field Details
-
SERVICE
Service identifier to be used for dependency injection.- See Also:
-
-
Method Details
-
delete
Remove a property given the entity name, entity id and property key. -
deleteAll
Delete all properties for a given an entity name and entity id -
setLong
Set a property value of type Long -
getLong
Get a property value of type Long. If there is no data, null is returned. -
setDouble
Set a property value of type Double -
getDouble
Get a property value of type Double. If there is no data, null is returned. -
setBoolean
Set a property value of type Boolean. -
getBoolean
Get a property value of type Boolean. If there is no data, null is returned. -
setString
void setString(@Nonnull String entityName, @Nonnull Long entityId, @Nonnull String key, @Nonnull String value) Set a property value of type String. -
getString
Get a property value of type String. If there is no data, null is returned. -
getData
Get a map data property for a given entity name, entity id and property key- Returns:
- deserialised data or null if no record exists
-
setData
Set a map data property. The map is serialized using xstream and stored in JIRA as a text property. -
getListData
Get a list data property for a given entity name, entity id and property key- Returns:
- deserialised data or null if no record exists
-
setListData
Set a list data property. The list is serialised using xstream and stored in JIRA as a text property. -
getKeys
- Returns:
- all keys for a given entity name and entity id, or an empty set if there are none
-
exists
Exists a property for a given entity name and id- Returns:
- true if the property exists, false otherwise
-
getPropertyAsType
Return the property as whatever type it may be.- Returns:
- object with the actual type
-