Package com.bytedesk.core.translate
Class TranslateService
java.lang.Object
com.bytedesk.core.base.BaseRestService<TranslateEntity,TranslateRequest,TranslateResponse>
com.bytedesk.core.translate.TranslateService
@Service
public class TranslateService
extends BaseRestService<TranslateEntity,TranslateRequest,TranslateResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AuthService
private final org.modelmapper.ModelMapper
private final TranslateRepository
private final UidUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse
(TranslateEntity entity) create
(TranslateRequest request) void
delete
(TranslateRequest entity) void
deleteByUid
(String uid) findByContent
(String content) void
handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, TranslateEntity entity) org.springframework.data.domain.Page<TranslateResponse>
queryByOrg
(TranslateRequest request) org.springframework.data.domain.Page<TranslateResponse>
queryByUser
(TranslateRequest request) save
(TranslateEntity entity) update
(TranslateRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest, queryByUid
-
Field Details
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
translateRepository
-
-
Constructor Details
-
TranslateService
public TranslateService()
-
-
Method Details
-
queryByOrg
- Specified by:
queryByOrg
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
queryByUser
public org.springframework.data.domain.Page<TranslateResponse> queryByUser(TranslateRequest request) - Specified by:
queryByUser
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
findByUid
- Specified by:
findByUid
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
findByContent
-
create
- Specified by:
create
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
update
- Specified by:
update
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
save
- Specified by:
save
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
delete
- Specified by:
delete
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
handleOptimisticLockingFailureException
public void handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, TranslateEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<TranslateEntity,
TranslateRequest, TranslateResponse>
-