Package com.bytedesk.kbase.website
Class WebsiteRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<WebsiteEntity,WebsiteRequest,WebsiteResponse>
com.bytedesk.kbase.website.WebsiteRestService
@Service
public class WebsiteRestService
extends BaseRestService<WebsiteEntity,WebsiteRequest,WebsiteResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapper
private final UidUtils
private final WebsiteRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToExcel
(WebsiteEntity website) convertToResponse
(WebsiteEntity entity) create
(WebsiteRequest request) void
delete
(WebsiteRequest request) void
deleteByUid
(String uid) void
handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, WebsiteEntity entity) org.springframework.data.domain.Page<WebsiteResponse>
queryByOrg
(WebsiteRequest request) org.springframework.data.domain.Page<WebsiteEntity>
queryByOrgExcel
(WebsiteRequest request) org.springframework.data.domain.Page<WebsiteResponse>
queryByUser
(WebsiteRequest request) save
(WebsiteEntity entity) update
(WebsiteRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest, queryByUid
-
Field Details
-
websiteRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
-
Constructor Details
-
WebsiteRestService
public WebsiteRestService()
-
-
Method Details
-
queryByOrg
- Specified by:
queryByOrg
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
queryByUser
- Specified by:
queryByUser
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
findByUid
@Cacheable(value="website", key="#uid", unless="#result==null") public Optional<WebsiteEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
create
- Specified by:
create
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
update
- Specified by:
update
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
save
- Specified by:
save
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
delete
- Specified by:
delete
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
handleOptimisticLockingFailureException
public void handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WebsiteEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<WebsiteEntity,
WebsiteRequest, WebsiteResponse>
-
queryByOrgExcel
-
convertToExcel
-