Package systems.dmx.core.impl
Class StorageDecorator
- java.lang.Object
-
- systems.dmx.core.impl.StorageDecorator
-
public class StorageDecorator extends Object
A utility layer above storage implementation. - Adds fetch-single calls on top of fetch-multiple calls and performs sanity checks.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssocModelImpl
fetchAssoc(String key, Object value)
Retrieves a single assoc by exact value.TopicModelImpl
fetchTopic(String key, Object value)
Retrieves a single topic by exact value (case-sensitive).TopicModelImpl
queryTopicFulltext(String key, Object value)
Retrieves a single topic by fulltext search (case-insensitive).
-
-
-
Method Detail
-
fetchTopic
public TopicModelImpl fetchTopic(String key, Object value)
Retrieves a single topic by exact value (case-sensitive).- Returns:
- The fetched topic, or
null
if no such topic exists. - Throws:
RuntimeException
- if more than one topic exists.
-
queryTopicFulltext
public TopicModelImpl queryTopicFulltext(String key, Object value)
Retrieves a single topic by fulltext search (case-insensitive).- Returns:
- The fetched topic, or
null
if no such topic exists. - Throws:
RuntimeException
- if more than one topic exists.
-
fetchAssoc
public AssocModelImpl fetchAssoc(String key, Object value)
Retrieves a single assoc by exact value.- Returns:
- The fetched assoc, or
null
if no such assoc exists. - Throws:
RuntimeException
- if more than one assoc exists.
-
-