org.apache.openjpa.kernel.exps.Value.getPath()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.apache.openjpa.kernel.exps.Value.getPath()方法的一些代码示例,展示了Value.getPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.getPath()方法的具体详情如下:
包路径:org.apache.openjpa.kernel.exps.Value
类名称:Value
方法名:getPath

Value.getPath介绍

暂无

代码示例

代码示例来源:origin: org.apache.openejb.patch/openjpa

if (var.getPath() != path)
  throw new RuntimeException(var + " does not match given " + path + " Variable path is " + var.getPath());
String alias = getAlias(node);

代码示例来源:origin: org.apache.openjpa/openjpa-all

if (var.getPath() != path)
  throw new RuntimeException(var + " does not match given " + path + " Variable path is " + var.getPath());
String alias = getAlias(node);

代码示例来源:origin: org.apache.openejb.patch/openjpa-persistence

if (var.getPath() != path)
  throw new RuntimeException(var + " does not match given " + path + " Variable path is " + var.getPath());
String alias = getAlias(node);

代码示例来源:origin: org.apache.openjpa/openjpa-persistence

if (var.getPath() != path)
  throw new RuntimeException(var + " does not match given " + path + " Variable path is " + var.getPath());
String alias = getAlias(node);

代码示例来源:origin: org.apache.openjpa/openjpa-all

private void verifyTypeOperation(Value val, Value param, boolean isNotEqual) {
  if (val.getPath() == null)
    return;
  PCPath path = (PCPath) val.getPath();
  Discriminator disc = ((Type) val).getDiscriminator();
  if (disc == null || !(val.getMetaData().getPCSuperclass() != null ||
    val.getMetaData().getPCSubclasses().length > 0))
    throw new UserException(_loc.
      get("invalid-type-argument", path.last() != null ? path.getPCPathString() : path.getSchemaAlias()));
  
  if (disc.getColumns().length == 0) {
    if (disc.getStrategy() instanceof NoneDiscriminatorStrategy) {
      // limited support for table per class inheritance hierarchy
      if (path.last() != null)
        throw new UserException(_loc.
          get("type-argument-unsupported", path.last().getName())); 
      if (isNotEqual) {
        if (param != null && param instanceof Null)
          throw new UserException(_loc.
            get("type-in-expression-unsupported", path.getSchemaAlias()));
        else
          throw new UserException(_loc.
            get("type-not-equal-unsupported", path.getSchemaAlias()));
      }
    }
    if (param != null && param instanceof CollectionParam)
      throw new UserException(_loc.
        get("collection-param-unsupported")); 
  }
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

private void verifyTypeOperation(Value val, Value param, boolean isNotEqual) {
  if (val.getPath() == null)
    return;
  PCPath path = (PCPath) val.getPath();
  Discriminator disc = ((Type) val).getDiscriminator();
  if (disc == null || !(val.getMetaData().getPCSuperclass() != null ||
    val.getMetaData().getPCSubclasses().length > 0))
    throw new UserException(_loc.
      get("invalid-type-argument", path.last() != null ? path.getPCPathString() : path.getSchemaAlias()));
  
  if (disc.getColumns().length == 0) {
    if (disc.getStrategy() instanceof NoneDiscriminatorStrategy) {
      // limited support for table per class inheritance hierarchy
      if (path.last() != null)
        throw new UserException(_loc.
          get("type-argument-unsupported", path.last().getName())); 
      if (isNotEqual) {
        if (param != null && param instanceof Null)
          throw new UserException(_loc.
            get("type-in-expression-unsupported", path.getSchemaAlias()));
        else
          throw new UserException(_loc.
            get("type-not-equal-unsupported", path.getSchemaAlias()));
      }
    }
    if (param != null && param instanceof CollectionParam)
      throw new UserException(_loc.
        get("collection-param-unsupported")); 
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-jdbc

private void verifyTypeOperation(Value val, Value param, boolean isNotEqual) {
  if (val.getPath() == null)
    return;
  PCPath path = (PCPath) val.getPath();
  Discriminator disc = ((Type) val).getDiscriminator();
  if (disc == null || !(val.getMetaData().getPCSuperclass() != null ||
    val.getMetaData().getPCSubclasses().length > 0))
    throw new UserException(_loc.
      get("invalid-type-argument", path.last() != null ? path.getPCPathString() : path.getSchemaAlias()));
  
  if (disc.getColumns().length == 0) {
    if (disc.getStrategy() instanceof NoneDiscriminatorStrategy) {
      // limited support for table per class inheritance hierarchy
      if (path.last() != null)
        throw new UserException(_loc.
          get("type-argument-unsupported", path.last().getName())); 
      if (isNotEqual) {
        if (param != null && param instanceof Null)
          throw new UserException(_loc.
            get("type-in-expression-unsupported", path.getSchemaAlias()));
        else
          throw new UserException(_loc.
            get("type-not-equal-unsupported", path.getSchemaAlias()));
      }
    }
    if (param != null && param instanceof CollectionParam)
      throw new UserException(_loc.
        get("collection-param-unsupported")); 
  }
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc

private void verifyTypeOperation(Value val, Value param, boolean isNotEqual) {
  if (val.getPath() == null)
    return;
  PCPath path = (PCPath) val.getPath();
  Discriminator disc = ((Type) val).getDiscriminator();
  if (disc == null || !(val.getMetaData().getPCSuperclass() != null ||
    val.getMetaData().getPCSubclasses().length > 0))
    throw new UserException(_loc.
      get("invalid-type-argument", path.last() != null ? path.getPCPathString() : path.getSchemaAlias()));
  
  if (disc.getColumns().length == 0) {
    if (disc.getStrategy() instanceof NoneDiscriminatorStrategy) {
      // limited support for table per class inheritance hierarchy
      if (path.last() != null)
        throw new UserException(_loc.
          get("type-argument-unsupported", path.last().getName())); 
      if (isNotEqual) {
        if (param != null && param instanceof Null)
          throw new UserException(_loc.
            get("type-in-expression-unsupported", path.getSchemaAlias()));
        else
          throw new UserException(_loc.
            get("type-not-equal-unsupported", path.getSchemaAlias()));
      }
    }
    if (param != null && param instanceof CollectionParam)
      throw new UserException(_loc.
        get("collection-param-unsupported")); 
  }
}

相关文章