Package com.bytedesk.core.topic
Class TopicService
java.lang.Object
com.bytedesk.core.topic.TopicService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapper
private final OptimisticLockingHandler
private final TopicRepository
private final UidUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientId
(String clientId) void
create
(TopicRequest topicRequest) void
void
delete
(TopicEntity topic) private void
doRemoveClientId
(String clientId) findByClientId
(String clientId) findByTopic
(String topic) findByUserUid
(String uid) void
remove
(TopicRequest topicRequest) void
void
removeClientId
(String clientId) save
(TopicEntity topic) void
void
unsubscribe
(String topic, String clientId) void
-
Field Details
-
topicRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
optimisticLockingHandler
-
-
Constructor Details
-
TopicService
public TopicService()
-
-
Method Details
-
create
-
create
-
remove
-
remove
-
subscribe
-
unsubscribe
-
addClientId
-
doRemoveClientId
-
removeClientId
-
findByUid
-
findByClientId
@Cacheable(value="topic", key="#clientId", unless="#result == null") public Optional<TopicEntity> findByClientId(String clientId) -
findByUserUid
@Cacheable(value="topic", key="#uid", unless="#result == null") public Optional<TopicEntity> findByUserUid(String uid) -
findByTopic
@Cacheable(value="topic", key="#topic", unless="#result == null") public Set<TopicEntity> findByTopic(String topic) -
save
@Caching(put=@CachePut(value="topic",key="#topic.userUid")) public TopicEntity save(TopicEntity topic) -
update
-
delete
-
convertToTopicResponse
-