Class ChartService

java.lang.Object
org.powertac.visualizer.service.ChartService

@Service
@Transactional
public class ChartService
extends Object
Service Implementation for managing Chart.
  • Constructor Details

  • Method Details

    • 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