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