Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Returning multilple objects using SDN cypher annotated queries
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Craig Giordano  
View profile  
 More options May 1 2012, 2:25 pm
From: Craig Giordano <craig.giord...@gmail.com>
Date: Tue, 1 May 2012 11:25:38 -0700 (PDT)
Local: Tues, May 1 2012 2:25 pm
Subject: Returning multilple objects using SDN cypher annotated queries

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.