Package org.powertac.visualizer.service
Class ViewService
java.lang.Object
org.powertac.visualizer.service.ViewService
@Service @Transactional public class ViewService extends Object
Service Implementation for managing View.
-
Constructor Summary
Constructors Constructor Description ViewService(ViewRepository viewRepository) -
Method Summary
Modifier and Type Method Description voiddelete(View view)Delete the view.org.springframework.data.domain.Page<View>findAll(org.springframework.data.domain.Pageable pageable)Get all the views.List<View>findByOwnerIsCurrentUserOrShared(String login)Get all the views owned by this user, plus all shared views.Optional<View>findOne(Long id)Get one view by id.Viewsave(View view)Save a view.
-
Constructor Details
-
Method Details
-
save
Save a view.- Parameters:
view- the entity to save- Returns:
- the persisted entity
-
findAll
@Transactional(readOnly=true) public org.springframework.data.domain.Page<View> findAll(org.springframework.data.domain.Pageable pageable)Get all the views.- Parameters:
pageable- the pagination information- Returns:
- the list of entities
-
findByOwnerIsCurrentUserOrShared
Get all the views owned by this user, plus all shared views.- Returns:
- the list of entities
-
findOne
Get one view by id.- Parameters:
id- the id of the entity- Returns:
- the entity
-
delete
Delete the view.- Parameters:
view- the View to delete
-