Tabnine Logo
JPQLException.aliasResolutionException
Code IndexAdd Tabnine to your IDE (free)

How to use
aliasResolutionException
method
in
org.eclipse.persistence.exceptions.JPQLException

Best Java code snippets using org.eclipse.persistence.exceptions.JPQLException.aliasResolutionException (Showing top 15 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

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);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

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);
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

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);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * resolveClass: Answer the class which corresponds to my variableName. This is the class for
 * an alias, where the variableName is registered to an alias.
 */
public Class resolveClass(GenerationContext generationContext) {
  Class clazz = null;
  String name = getCanonicalVariableName();
  ParseTreeContext context = generationContext.getParseTreeContext();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    clazz = context.classForSchemaName(schema, generationContext);
  } else {
    DotNode path = (DotNode)context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      clazz = path.resolveClass(generationContext);
    }
  }
  return clazz;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * resolveClass: Answer the class which corresponds to my variableName. This is the class for
 * an alias, where the variableName is registered to an alias.
 */
public Class resolveClass(GenerationContext generationContext) {
  Class clazz = null;
  String name = getCanonicalVariableName();
  ParseTreeContext context = generationContext.getParseTreeContext();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    clazz = context.classForSchemaName(schema, generationContext);
  } else {
    DotNode path = (DotNode)context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      clazz = path.resolveClass(generationContext);
    }
  }
  return clazz;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * resolveClass: Answer the class which corresponds to my variableName. This is the class for
 * an alias, where the variableName is registered to an alias.
 */
public Class resolveClass(GenerationContext generationContext) {
  Class clazz = null;
  String name = getCanonicalVariableName();
  ParseTreeContext context = generationContext.getParseTreeContext();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    clazz = context.classForSchemaName(schema, generationContext);
  } else {
    DotNode path = (DotNode)context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      clazz = path.resolveClass(generationContext);
    }
  }
  return clazz;
}
origin: com.haulmont.thirdparty/eclipselink

public Expression generateExpressionForAlias(GenerationContext context) {
  // BUG 3105651: Verify if we need to resolve this alias, or just use
  // an empty ExpressionBuilder. See OrderByItemNode.generateExpression()
  // for more details
  if (context.getParseTree().getQueryNode().isSelectNode() && context.shouldCheckSelectNodeBeforeResolving() && (((SelectNode)context.getParseTree().getQueryNode()).isSelected(this.getCanonicalVariableName()))) {
    return new ExpressionBuilder();
  }
  Node nodeForAlias = getNodeForAlias(context);
  //assume that if there is no node available for the given variable, then
  //there must be an alias mismatch. Assume they know their attribute names better
  //than their alias names. - JGL
  if (nodeForAlias == null) {
    throw JPQLException.aliasResolutionException(
      context.getParseTreeContext().getQueryInfo(), 
      getLine(), getColumn(), getVariableName());
  }
  //create builder, and answer it
  return nodeForAlias.generateExpression(context);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

public Expression generateExpressionForAlias(GenerationContext context) {
  // BUG 3105651: Verify if we need to resolve this alias, or just use
  // an empty ExpressionBuilder. See OrderByItemNode.generateExpression()
  // for more details
  if (context.getParseTree().getQueryNode().isSelectNode() && context.shouldCheckSelectNodeBeforeResolving() && (((SelectNode)context.getParseTree().getQueryNode()).isSelected(this.getCanonicalVariableName()))) {
    return new ExpressionBuilder();
  }
  Node nodeForAlias = getNodeForAlias(context);
  //assume that if there is no node available for the given variable, then
  //there must be an alias mismatch. Assume they know their attribute names better
  //than their alias names. - JGL
  if (nodeForAlias == null) {
    throw JPQLException.aliasResolutionException(
      context.getParseTreeContext().getQueryInfo(),
      getLine(), getColumn(), getVariableName());
  }
  //create builder, and answer it
  return nodeForAlias.generateExpression(context);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public Expression generateExpressionForAlias(GenerationContext context) {
  // BUG 3105651: Verify if we need to resolve this alias, or just use
  // an empty ExpressionBuilder. See OrderByItemNode.generateExpression()
  // for more details
  if (context.getParseTree().getQueryNode().isSelectNode() && context.shouldCheckSelectNodeBeforeResolving() && (((SelectNode)context.getParseTree().getQueryNode()).isSelected(this.getCanonicalVariableName()))) {
    return new ExpressionBuilder();
  }
  Node nodeForAlias = getNodeForAlias(context);
  //assume that if there is no node available for the given variable, then
  //there must be an alias mismatch. Assume they know their attribute names better
  //than their alias names. - JGL
  if (nodeForAlias == null) {
    throw JPQLException.aliasResolutionException(
      context.getParseTreeContext().getQueryInfo(), 
      getLine(), getColumn(), getVariableName());
  }
  //create builder, and answer it
  return nodeForAlias.generateExpression(context);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL
 * Validate node and calculate its type.
 */
public void validate(ParseTreeContext context) {
  TypeHelper typeHelper = context.getTypeHelper();
  classConstant = typeHelper.resolveSchema(variableName);
  if (classConstant != null){
    setType(Class.class);
    return;
  }
  String name = getCanonicalVariableName();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    setType(typeHelper.resolveSchema(schema));
  } else {
    Node path = context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      setType(path.getType());
    }
  }
  context.usedVariable(name);
  if (context.isDeclaredInOuterScope(name)) {
    context.registerOuterScopeVariable(name);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL
 * Validate node and calculate its type.
 */
public void validate(ParseTreeContext context) {
  TypeHelper typeHelper = context.getTypeHelper();
  classConstant = typeHelper.resolveSchema(variableName);
  if (classConstant != null){
    setType(Class.class);
    return;
  }
  String name = getCanonicalVariableName();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    setType(typeHelper.resolveSchema(schema));
  } else {
    Node path = context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      setType(path.getType());
    }
  }
  context.usedVariable(name);
  if (context.isDeclaredInOuterScope(name)) {
    context.registerOuterScopeVariable(name);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL
 * Validate node and calculate its type.
 */
public void validate(ParseTreeContext context) {
  TypeHelper typeHelper = context.getTypeHelper();
  classConstant = typeHelper.resolveSchema(variableName);
  if (classConstant != null){
    setType(Class.class);
    return;
  }
  String name = getCanonicalVariableName();
  if (context.isRangeVariable(name)) {
    String schema = context.schemaForVariable(name);
    setType(typeHelper.resolveSchema(schema));
  } else {
    Node path = context.pathForVariable(name);
    if (path == null) {
      throw JPQLException.aliasResolutionException(
        context.getQueryInfo(), getLine(), getColumn(), name);
    } else {
      setType(path.getType());
    }
  }
  context.usedVariable(name);
  if (context.isDeclaredInOuterScope(name)) {
    context.registerOuterScopeVariable(name);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

throw JPQLException.aliasResolutionException(
  context.getQueryInfo(), leftMost.getLine(), 
  leftMost.getColumn(), leftMost.getAsString());
origin: com.haulmont.thirdparty/eclipselink

throw JPQLException.aliasResolutionException(
  context.getQueryInfo(), leftMost.getLine(), 
  leftMost.getColumn(), leftMost.getAsString());
origin: org.eclipse.persistence/org.eclipse.persistence.core

throw JPQLException.aliasResolutionException(
  context.getQueryInfo(), leftMost.getLine(),
  leftMost.getColumn(), leftMost.getAsString());
org.eclipse.persistence.exceptionsJPQLExceptionaliasResolutionException

Popular methods of JPQLException

  • <init>
    INTERNAL Only TopLink can throw and create these excpetions
  • constructorClassNotFound
  • entityTypeNotFound
    JPQLException Entity Type Not Found Indicates that a type specified in a JPQL query string cannot b
  • entityTypeNotFound2
  • expectedOrderableOrderByItem
  • generalParsingException
    INTERNAL Create an exception to wrap a general parsing exception
  • getInternalExceptions
    INTERNAL Return the collection of internal Exceptions. Intialize if there are no exceptions
  • hasInternalExceptions
    INTERNAL Does this exception have any internal errors?
  • indexOnlyAllowedOnVariable
  • invalidCollectionMemberDecl
  • invalidCollectionNavigation
  • invalidEnumEqualExpression
  • invalidCollectionNavigation,
  • invalidEnumEqualExpression,
  • invalidEnumLiteral,
  • invalidExpressionArgument,
  • invalidFunctionArgument,
  • invalidMultipleUseOfSameParameter,
  • invalidNavigation,
  • invalidSetClauseNavigation,
  • invalidSetClauseTarget

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now