Class UserPreferenceServiceImpl
- java.lang.Object
-
- de.trustable.ca3s.core.service.impl.UserPreferenceServiceImpl
-
- All Implemented Interfaces:
UserPreferenceService
@Service @Transactional public class UserPreferenceServiceImpl extends Object implements UserPreferenceService
Service Implementation for managingUserPreference.
-
-
Constructor Summary
Constructors Constructor Description UserPreferenceServiceImpl(UserPreferenceRepository userPreferenceRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(Long id)Delete the userPreference by id.List<UserPreference>findAll()Get all the userPreferences.List<UserPreference>findAllForUserId(Long id)Get all the userPreferences.Optional<UserPreference>findOne(Long id)Get one userPreference by id.Optional<UserPreference>findPreferenceForUserId(String name, Long userId)Get a specific userPreferences for a user id.UserPreferencesave(UserPreference userPreference)Save a userPreference.
-
-
-
Constructor Detail
-
UserPreferenceServiceImpl
public UserPreferenceServiceImpl(UserPreferenceRepository userPreferenceRepository)
-
-
Method Detail
-
save
public UserPreference save(UserPreference userPreference)
Save a userPreference.- Specified by:
savein interfaceUserPreferenceService- Parameters:
userPreference- the entity to save.- Returns:
- the persisted entity.
-
findAll
@Transactional(readOnly=true) public List<UserPreference> findAll()
Get all the userPreferences.- Specified by:
findAllin interfaceUserPreferenceService- Returns:
- the list of entities.
-
findAllForUserId
@Transactional(readOnly=true) public List<UserPreference> findAllForUserId(Long id)
Get all the userPreferences.- Specified by:
findAllForUserIdin interfaceUserPreferenceService- Returns:
- the list of entities.
-
findPreferenceForUserId
public Optional<UserPreference> findPreferenceForUserId(String name, Long userId)
Get a specific userPreferences for a user id.- Specified by:
findPreferenceForUserIdin interfaceUserPreferenceService- Returns:
- the list of entities.
-
findOne
@Transactional(readOnly=true) public Optional<UserPreference> findOne(Long id)
Get one userPreference by id.- Specified by:
findOnein interfaceUserPreferenceService- Parameters:
id- the id of the entity.- Returns:
- the entity.
-
delete
public void delete(Long id)
Delete the userPreference by id.- Specified by:
deletein interfaceUserPreferenceService- Parameters:
id- the id of the entity.
-
-