EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
IntermittentResourceProfileRepository.java
1 package emlab.gen.repository;
2 
3 import org.springframework.data.neo4j.annotation.Query;
4 import org.springframework.data.neo4j.annotation.QueryType;
5 import org.springframework.data.neo4j.repository.GraphRepository;
6 import org.springframework.data.repository.query.Param;
7 
11 
12 public interface IntermittentResourceProfileRepository extends
13  GraphRepository<IntermittentResourceProfile> {
14 
15  @Query(value = "g.v(technology).in('INTERMITTENT_TECHNOLOGY').filter{it.__type__=='emlab.gen.domain.technology.IntermittentResourceProfile'}.as('irp').in('INTERMITTENT_PRODUCTION_NODE').filter{it==g.v(node)}.back('irp').next()", type = QueryType.Gremlin)
16  IntermittentResourceProfile findIntermittentResourceProfileByTechnologyAndNode(
17  @Param("technology") PowerGeneratingTechnology technology,
18  @Param("node") PowerGridNode node);
19 
20 }