public void validate(ParseTreeContext context) { left.validate(context); if (left.isVariableNode()){ setType(((VariableNode)left).getTypeForMapKey(context)); } else if (left.isDotNode()){ setType(((DotNode)left).getTypeForMapKey(context)); } }
public void validate(ParseTreeContext context) { left.validate(context); if (left.isVariableNode()){ setType(((VariableNode)left).getTypeForMapKey(context)); } else if (left.isDotNode()){ setType(((DotNode)left).getTypeForMapKey(context)); } }
public void validate(ParseTreeContext context) { TypeHelper typeHelper = context.getTypeHelper(); left.validate(context); if (left.isVariableNode()){ setType(((VariableNode)left).getTypeForMapKey(context)); } else if (left.isDotNode()){ setType(((DotNode)left).getTypeForMapKey(context)); } } }
public Object getTypeForMapKey(ParseTreeContext context){ String name = getCanonicalVariableName(); if (context.isRangeVariable(name)) { throw JPQLException.variableCannotHaveMapKey(context.getQueryInfo(), getLine(), getColumn(), name); } else { DotNode path = (DotNode)context.pathForVariable(name); if (path == null) { throw JPQLException.aliasResolutionException( context.getQueryInfo(), getLine(), getColumn(), name); } else { return path.getTypeForMapKey(context); } } }
public Object getTypeForMapKey(ParseTreeContext context){ String name = getCanonicalVariableName(); if (context.isRangeVariable(name)) { throw JPQLException.variableCannotHaveMapKey(context.getQueryInfo(), getLine(), getColumn(), name); } else { DotNode path = (DotNode)context.pathForVariable(name); if (path == null) { throw JPQLException.aliasResolutionException( context.getQueryInfo(), getLine(), getColumn(), name); } else { return path.getTypeForMapKey(context); } } }
public Object getTypeForMapKey(ParseTreeContext context){ String name = getCanonicalVariableName(); if (context.isRangeVariable(name)) { throw JPQLException.variableCannotHaveMapKey(context.getQueryInfo(), getLine(), getColumn(), name); } else { DotNode path = (DotNode)context.pathForVariable(name); if (path == null) { throw JPQLException.aliasResolutionException( context.getQueryInfo(), getLine(), getColumn(), name); } else { return path.getTypeForMapKey(context); } } }