I find myself in the situation where I would like a cypher query to return
a List of one of my domain objects and also a date. I don't know if this
is possible with the @Query annotation in SDN. Originally my query looked
like this:
@Query("start pvac=node:__types__(className =
\"com.ierin.paragon2.domain.variable.plant.PlantVariableActivityCode\") " +
"match PV<-[:plantVariable]-pvac,
activity-[:MODEL_SCHEDULE_ACTIVITY]->PV, activity-[:timeRange]->t " +
"where PV.dataSetId = {modelDataSetId} " +
"and activity.dataSetId={scheduleDataSetId} " +
"and t.begin < {end} " +
"and t.end > {begin} " +
"return distinct pvac") // TODO need t.begin in the results
List<PlantVariableActivityCode>
findAllPlantVariableActivityCodeByTimeRange(
@Param("modelDataSetId") String modelDataSetId,
@Param("scheduleDataSetId") String scheduleDataSetId,
@Param("begin") Long begin,
@Param("end") Long end);
But now I would like to change the return clause to the following:
@Query("start pvac=node:__types__(className =
\"com.ierin.paragon2.domain.variable.plant.PlantVariableActivityCode\") " +
"match PV<-[:plantVariable]-pvac,
activity-[:MODEL_SCHEDULE_ACTIVITY]->PV, activity-[:timeRange]->t " +
"where PV.dataSetId = {modelDataSetId} " +
"and activity.dataSetId={scheduleDataSetId} " +
"and t.begin < {end} " +
"and t.end > {begin} " +
"return distinct pvac,* MAX(t.begin)*") // TODO need
t.begin in the results
List<PlantVariableActivityCode>
findAllPlantVariableActivityCodeByTimeRange(
@Param("modelDataSetId") String modelDataSetId,
@Param("scheduleDataSetId") String scheduleDataSetId,
@Param("begin") Long begin,
@Param("end") Long end);
What would the return type look like if this is possible? If this is not
possible, what are my other options?
Thanks,
Craig