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