Examples of InvalidPathException


Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
View Full Code Here

Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
View Full Code Here

Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
View Full Code Here

Examples of org.hibernate.hql.internal.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals( discrim ) || InFragment.NOT_NULL.equals( discrim ) ) {
        throw new InvalidPathException(
            "subclass test not allowed for null or not null discriminator: '" + text + "'"
        );
      }
      // the class discriminator value
      setSQLValue( node, text, discrim );
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      setConstantValue( node, text, value );
    }
  }
View Full Code Here

Examples of org.hibernate.hql.internal.ast.InvalidPathException

    Queryable persister = walker.getSessionFactoryHelper().findQueryableUsingImports( text );
    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
            if (InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim)) throw new InvalidPathException(
                                                                                                                       "subclass test not allowed for null or not null discriminator: '"
                                                                                                                       + text + "'");
            setSQLValue(node, text, discrim); // the class discriminator value
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
            if (value == null) throw new InvalidPathException("Invalid path: '" + text + "'");
            setConstantValue(node, text, value);
    }
  }
View Full Code Here

Examples of org.hibernate.hql.internal.ast.InvalidPathException

    Queryable persister = walker.getSessionFactoryHelper().findQueryableUsingImports( text );
    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
            if (InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim)) throw new InvalidPathException(
                                                                                                                       "subclass test not allowed for null or not null discriminator: '"
                                                                                                                       + text + "'");
            setSQLValue(node, text, discrim); // the class discriminator value
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
            if (value == null) throw new InvalidPathException("Invalid path: '" + text + "'");
            setConstantValue(node, text, value);
    }
  }
View Full Code Here

Examples of org.jboss.dna.graph.property.InvalidPathException

        if (degree == 0) return this;
        int endIndex = this.segments.size() - degree;
        if (endIndex == 0) return this.isAbsolute() ? RootPath.INSTANCE : null;
        if (endIndex < 0) {
            String msg = GraphI18n.pathAncestorDegreeIsInvalid.text(this.getString(), Inflector.getInstance().ordinalize(degree));
            throw new InvalidPathException(msg);
        }
        return subpath(0, endIndex);
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.InvalidPathException

        CheckArg.isNonNegative(degree, "degree");
        if (degree == 0) {
            return this;
        }
        String msg = GraphI18n.pathAncestorDegreeIsInvalid.text(this.getString(), Inflector.getInstance().ordinalize(degree));
        throw new InvalidPathException(msg);
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.InvalidPathException

    @Override
    public Path resolve( Path relativePath ) {
        CheckArg.isNotNull(relativePath, "relative path");
        if (relativePath.isAbsolute()) {
            String msg = GraphI18n.pathIsNotRelative.text(relativePath);
            throw new InvalidPathException(msg);
        }
        // Make an absolute path out of the supplied relative path ...
        return new BasicPath(relativePath.getSegmentsList(), true).getNormalizedPath();
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.InvalidPathException

     * @see org.jboss.dna.graph.property.Path#getCanonicalPath()
     */
    public Path getCanonicalPath() {
        if (!this.isAbsolute()) {
            String msg = GraphI18n.pathIsNotAbsolute.text(this);
            throw new InvalidPathException(msg);
        }
        if (this.isNormalized()) return this;
        return this.getNormalizedPath();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.