Class CypherQueryBuilder
- java.lang.Object
-
- org.neotropic.kuwaiba.core.persistence.reference.neo4j.CypherQueryBuilder
-
public class CypherQueryBuilder extends Object
Creates cypher Query- Author:
- Adrian Martinez Molina <adrian.martinez@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,org.neo4j.graphdb.Node>
classNodes
nodes selected for querystatic String
INSTANCE
static String
LISTTYPE
static String
PARENT
List<ResultRecord>
resultList
result listMap<String,List<String>>
visibleAttributes
attributes selected
-
Constructor Summary
Constructors Constructor Description CypherQueryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createQuery(ExtendedQuery query)
Creates the queryvoid
executeQuery(org.neo4j.graphdb.Node classNode, String cypherQuery)
Executes the queryList<ResultRecord>
getResultList()
void
readJoinQuery(String listTypeName, String listTypeName2, ExtendedQuery query)
reads the sub sub queriesvoid
readJoins(String listTypeName, String listTypeName2, ExtendedQuery query)
read the sub queries (joins)void
readParent(String listTypeName, String listTypeName2, ExtendedQuery query)
read the parent and his joinsvoid
readQuery(ExtendedQuery query)
Reads the query main recursivelyvoid
readResult(org.neo4j.graphdb.Result queryResult)
Read the resultsvoid
readVissibleAttributeJoins(String listTypeName, ExtendedQuery query)
void
readVissibleAttributeParent(ExtendedQuery query)
Reads the visible attributes for the parent and its joinsvoid
readVissibleAttributes(ExtendedQuery query)
Reads the visible attributes for the main query and its joinsvoid
setClassNodes(Map<String,org.neo4j.graphdb.Node> classNodes)
-
-
-
Field Detail
-
INSTANCE
public static final String INSTANCE
- See Also:
- Constant Field Values
-
PARENT
public static final String PARENT
- See Also:
- Constant Field Values
-
LISTTYPE
public static final String LISTTYPE
- See Also:
- Constant Field Values
-
resultList
public List<ResultRecord> resultList
result list
-
-
Method Detail
-
readParent
public void readParent(String listTypeName, String listTypeName2, ExtendedQuery query)
read the parent and his joins- Parameters:
listTypeName
-listTypeName2
-query
-
-
readJoins
public void readJoins(String listTypeName, String listTypeName2, ExtendedQuery query)
read the sub queries (joins)- Parameters:
listTypeName
-listTypeName2
-query
-
-
readJoinQuery
public void readJoinQuery(String listTypeName, String listTypeName2, ExtendedQuery query)
reads the sub sub queries- Parameters:
listTypeName
-listTypeName2
-query
-
-
readQuery
public void readQuery(ExtendedQuery query)
Reads the query main recursively- Parameters:
query
-
-
readVissibleAttributes
public void readVissibleAttributes(ExtendedQuery query)
Reads the visible attributes for the main query and its joins- Parameters:
query
-
-
readVissibleAttributeParent
public void readVissibleAttributeParent(ExtendedQuery query)
Reads the visible attributes for the parent and its joins- Parameters:
query
-
-
readVissibleAttributeJoins
public void readVissibleAttributeJoins(String listTypeName, ExtendedQuery query)
- Parameters:
listTypeName
-query
-
-
createQuery
public void createQuery(ExtendedQuery query) throws InvalidArgumentException
Creates the query- Parameters:
query
-- Throws:
InvalidArgumentException
- If any object does not have uuid
-
executeQuery
public void executeQuery(org.neo4j.graphdb.Node classNode, String cypherQuery) throws InvalidArgumentException
Executes the query- Parameters:
classNode
-cypherQuery
-- Throws:
InvalidArgumentException
- If any object does not have uuid
-
readResult
public void readResult(org.neo4j.graphdb.Result queryResult) throws InvalidArgumentException
Read the results- Parameters:
queryResult
-- Throws:
InvalidArgumentException
- If any object does not have uuid
-
getResultList
public List<ResultRecord> getResultList()
-
-