Class ArticleArchiveRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<ArticleArchiveEntity,ArticleArchiveRequest,ArticleArchiveResponse>
com.bytedesk.kbase.article_archive.ArticleArchiveRestService
@Service
public class ArticleArchiveRestService
extends BaseRestService<ArticleArchiveEntity,ArticleArchiveRequest,ArticleArchiveResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArticleArchiveRepository
private final AuthService
private final org.modelmapper.ModelMapper
private final UidUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ArticleArchiveRequest request) void
delete
(ArticleArchiveRequest entity) void
deleteByUid
(String uid) void
handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, ArticleArchiveEntity entity) org.springframework.data.domain.Page<ArticleArchiveResponse>
queryByOrg
(ArticleArchiveRequest request) queryByUid
(ArticleArchiveRequest request) org.springframework.data.domain.Page<ArticleArchiveResponse>
queryByUser
(ArticleArchiveRequest request) queryDetail
(ArticleArchiveRequest request) save
(ArticleArchiveEntity entity) update
(ArticleArchiveRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest
-
Field Details
-
article_archiveRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
ArticleArchiveRestService
public ArticleArchiveRestService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<ArticleArchiveResponse> queryByOrg(ArticleArchiveRequest request) - Specified by:
queryByOrg
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
queryByUser
public org.springframework.data.domain.Page<ArticleArchiveResponse> queryByUser(ArticleArchiveRequest request) - Specified by:
queryByUser
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
queryDetail
-
findByUid
@Cacheable(value="article_archive", key="#uid", unless="#result == null") public Optional<ArticleArchiveEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
create
- Specified by:
create
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
update
- Specified by:
update
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
save
- Specified by:
save
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
delete
- Specified by:
delete
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
handleOptimisticLockingFailureException
public void handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, ArticleArchiveEntity entity) -
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-
queryByUid
- Overrides:
queryByUid
in classBaseRestService<ArticleArchiveEntity,
ArticleArchiveRequest, ArticleArchiveResponse>
-