private Value getValue(JPQLNode node) { if (node.id == JJTQUALIFIEDIDENTIFIER) return getQualifiedIdentifier(onlyChild(node)); return getValue(node, VAR_PATH); }
private Value getValue(JPQLNode node) { if (node.id == JJTQUALIFIEDIDENTIFIER) return getQualifiedIdentifier(onlyChild(node)); return getValue(node, VAR_PATH); }
private Value getValue(JPQLNode node) { if (node.id == JJTQUALIFIEDIDENTIFIER) return getQualifiedIdentifier(onlyChild(node)); return getValue(node, VAR_PATH); }
private Value getValue(JPQLNode node) { if (node.id == JJTQUALIFIEDIDENTIFIER) return getQualifiedIdentifier(onlyChild(node)); return getValue(node, VAR_PATH); }
private void evalHavingClause(QueryExpressions exps) { // handle HAVING clauses JPQLNode havingNode = root().findChildByID(JJTHAVING, false); if (havingNode == null) return; exps.having = getExpression(onlyChild(havingNode)); }
private void evalHavingClause(QueryExpressions exps) { // handle HAVING clauses JPQLNode havingNode = root().findChildByID(JJTHAVING, false); if (havingNode == null) return; exps.having = getExpression(onlyChild(havingNode)); }
private void evalHavingClause(QueryExpressions exps) { // handle HAVING clauses JPQLNode havingNode = root().findChildByID(JJTHAVING, true); if (havingNode == null) return; exps.having = getExpression(onlyChild(havingNode)); }
private void evalHavingClause(QueryExpressions exps) { // handle HAVING clauses JPQLNode havingNode = root().findChildByID(JJTHAVING, false); if (havingNode == null) return; exps.having = getExpression(onlyChild(havingNode)); }
private void evalHavingClause(QueryExpressions exps) { // handle HAVING clauses JPQLNode havingNode = root().findChildByID(JJTHAVING, false); if (havingNode == null) return; exps.having = getExpression(onlyChild(havingNode)); }
private Value getQualifiedIdentifier(JPQLNode node) { JPQLNode id = onlyChild(node); Path path = validateMapPath(node, id); if (node.id == JJTVALUE) return path; Value value = getValue(id); if (node.id == JJTKEY) return factory.mapKey(path, value); else return factory.mapEntry(path, value); }
private Value getQualifiedIdentifier(JPQLNode node) { JPQLNode id = onlyChild(node); Path path = validateMapPath(node, id); if (node.id == JJTVALUE) return path; Value value = getValue(id); if (node.id == JJTKEY) return factory.mapKey(path, value); else return factory.mapEntry(path, value); }
private Value getQualifiedIdentifier(JPQLNode node) { JPQLNode id = onlyChild(node); Path path = validateMapPath(node, id); if (node.id == JJTVALUE) return path; Value value = getValue(id); if (node.id == JJTKEY) return factory.mapKey(path, value); else return factory.mapEntry(path, value); }
private Value getQualifiedIdentifier(JPQLNode node) { JPQLNode id = onlyChild(node); Path path = validateMapPath(node, id); if (node.id == JJTVALUE) return path; Value value = getValue(id); if (node.id == JJTKEY) return factory.mapKey(path, value); else return factory.mapEntry(path, value); }
protected void evalSetClause(QueryExpressions exps) { // handle SET field = value JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); for (int i = 0; nodes != null && i < nodes.length; i++) { Path path = getPath(firstChild(nodes[i])); Value val = getValue(onlyChild(lastChild(nodes[i]))); exps.putUpdate(path, val); } }
private Value getTypeLiteral(JPQLNode node) { JPQLNode type = onlyChild(node); final String name = type.text; final Value val = getVariable(name, false); if (val instanceof Value && val.isVariable()) { Class<?> c = resolver.classForName(name, null); if (c != null) { Value typeLit = factory.newTypeLiteral(c, Literal.TYPE_CLASS); typeLit.setMetaData(getClassMetaData(name, false)); return typeLit; } } throw parseException(EX_USER, "not-type-literal", new Object[]{ name }, null); }
private Value getTypeLiteral(JPQLNode node) { JPQLNode type = onlyChild(node); final String name = type.text; final Value val = getVariable(name, false); if (val instanceof Value && val.isVariable()) { Class<?> c = resolver.classForName(name, null); if (c != null) { Value typeLit = factory.newTypeLiteral(c, Literal.TYPE_CLASS); typeLit.setMetaData(getClassMetaData(name, false)); return typeLit; } } throw parseException(EX_USER, "not-type-literal", new Object[]{ name }, null); }
protected void evalSetClause(QueryExpressions exps) { // handle SET field = value JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); for (int i = 0; nodes != null && i < nodes.length; i++) { Path path = getPath(firstChild(nodes[i])); if (path.last().getValue().getEmbeddedMetaData() != null) throw parseException(EX_USER, "cant-bulk-update-embeddable", new Object[]{assemble(firstChild(nodes[i]))}, null); JPQLNode lastChild = lastChild(nodes[i]); Value val = (lastChild.children == null) ? null : getValue(onlyChild(lastChild)); exps.putUpdate(path, val); } }
protected void evalSetClause(QueryExpressions exps) { // handle SET field = value JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); for (int i = 0; nodes != null && i < nodes.length; i++) { Path path = getPath(firstChild(nodes[i])); if (path.last().getValue().getEmbeddedMetaData() != null) throw parseException(EX_USER, "cant-bulk-update-embeddable", new Object[]{assemble(firstChild(nodes[i]))}, null); JPQLNode lastChild = lastChild(nodes[i]); Value val = (lastChild.children == null) ? null : getValue(onlyChild(lastChild)); exps.putUpdate(path, val); } }
protected void evalSetClause(QueryExpressions exps) { // handle SET field = value JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); for (int i = 0; nodes != null && i < nodes.length; i++) { Path path = getPath(firstChild(nodes[i])); if (path.last().getValue().getEmbeddedMetaData() != null) throw parseException(EX_USER, "cant-bulk-update-embeddable", new Object[]{assemble(firstChild(nodes[i]))}, null); JPQLNode lastChild = lastChild(nodes[i]); Value val = (lastChild.children == null) ? null : getValue(onlyChild(lastChild)); exps.putUpdate(path, val); } }
protected void evalSetClause(QueryExpressions exps) { // handle SET field = value JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); for (int i = 0; nodes != null && i < nodes.length; i++) { Path path = getPath(firstChild(nodes[i])); if (path.last().getValue().getEmbeddedMetaData() != null) throw parseException(EX_USER, "cant-bulk-update-embeddable", new Object[]{assemble(firstChild(nodes[i]))}, null); JPQLNode lastChild = lastChild(nodes[i]); Value val = (lastChild.children == null) ? null : getValue(onlyChild(lastChild)); exps.putUpdate(path, val); } }