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
All Methods Instance Methods Concrete Methods 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 Detail
- 
ChartService
public ChartService(ChartRepository chartRepository)
 
 - 
 
- 
Method Detail
- 
save
public Chart save(Chart chart)
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
@Transactional(readOnly=true) public List<Chart> findByOwnerIsCurrentUserOrShared(String login)
Get all the charts owned by this user, plus all shared charts.- Returns:
 - the list of entities
 
 
- 
findOne
@Transactional(readOnly=true) public Optional<Chart> findOne(Long id)
Get one chart by id.- Parameters:
 id- the id of the entity- Returns:
 - the entity
 
 
- 
delete
public void delete(Chart chart)
Delete the chart.- Parameters:
 chart- the Chart to delete
 
 - 
 
 -