Class UserCustomStatusServiceImpl
java.lang.Object
com.espacogeek.geek.services.impl.UserCustomStatusServiceImpl
- All Implemented Interfaces:
UserCustomStatusService
An implementation class of UserCustomStatusService @see UserCustomStatusService
-
Constructor Summary
ConstructorsConstructorDescriptionUserCustomStatusServiceImpl(UserCustomStatusRepository userCustomStatusRepository, UserRepository userRepository) -
Method Summary
Modifier and TypeMethodDescriptionCreates a new custom status for the user.booleanDeletes a custom status owned by the user.findByUserId(Integer userId) Returns all custom statuses belonging to the given user.Updates the name of an existing custom status owned by the user.
-
Constructor Details
-
UserCustomStatusServiceImpl
public UserCustomStatusServiceImpl(UserCustomStatusRepository userCustomStatusRepository, UserRepository userRepository)
-
-
Method Details
-
findByUserId
Description copied from interface:UserCustomStatusServiceReturns all custom statuses belonging to the given user.- Specified by:
findByUserIdin interfaceUserCustomStatusService- Parameters:
userId- the authenticated user's ID- Returns:
- list of the user's custom status entries
- See Also:
-
create
Description copied from interface:UserCustomStatusServiceCreates a new custom status for the user.- Specified by:
createin interfaceUserCustomStatusService- Parameters:
userId- the authenticated user's IDname- the label for the custom status- Returns:
- the persisted
UserCustomStatusModel - See Also:
-
update
Description copied from interface:UserCustomStatusServiceUpdates the name of an existing custom status owned by the user.- Specified by:
updatein interfaceUserCustomStatusService- Parameters:
userId- the authenticated user's IDstatusId- the ID of the status to updatename- the new label- Returns:
- the updated
UserCustomStatusModel - See Also:
-
delete
Description copied from interface:UserCustomStatusServiceDeletes a custom status owned by the user.- Specified by:
deletein interfaceUserCustomStatusService- Parameters:
userId- the authenticated user's IDstatusId- the ID of the status to delete- Returns:
trueif deleted,falseif not found- See Also:
-