16 package emlab.gen.repository;
18 import org.springframework.data.neo4j.annotation.Query;
19 import org.springframework.data.neo4j.annotation.QueryType;
20 import org.springframework.data.neo4j.repository.GraphRepository;
21 import org.springframework.data.repository.query.Param;
32 GraphRepository<PowerGeneratingTechnologyTarget> {
34 @Query(value=
"result = g.v(market).in('INVESTOR_MARKET').out('INVESTOR_TARGET').as('x').out('TARGET_TECHNOLOGY').idFilter(tech, FilterPipe.Filter.EQUAL).back('x'); ; if(!result.hasNext()){return null;} else{return result.next();}", type=QueryType.Gremlin)
37 @Query(value=
"result = g.v(market).in('INVESTOR_MARKET').out('INVESTOR_TARGET')", type=QueryType.Gremlin)
38 Iterable<PowerGeneratingTechnologyTarget> findAllByMarket(@Param(
"market")
ElectricitySpotMarket market);