Package org.hibernate.annotations.common

Examples of org.hibernate.annotations.common.AssertionFailure


  }

  public PersistentClass getPersistentClassHostingProperties(MappedSuperclassTypeImpl<?> mappedSuperclassType) {
    final PersistentClass persistentClass = mappedSuperClassTypeToPersistentClass.get( mappedSuperclassType );
    if (persistentClass == null) {
      throw new AssertionFailure( "Could not find PersistentClass for MappedSuperclassType: "
          + mappedSuperclassType.getJavaType() );
    }
    return persistentClass;
  }
View Full Code Here


  private void addPropertyToPersistentClass(Property prop, XClass declaringClass) {
    if ( declaringClass != null ) {
      final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass );
      if ( inheritanceState == null ) {
        throw new AssertionFailure(
            "Declaring class is not found in the inheritance state hierarchy: " + declaringClass
        );
      }
      if ( inheritanceState.isEmbeddableSuperclass() ) {
        persistentClass.addMappedsuperclassProperty(prop);
View Full Code Here

  private void addPropertyToJoin(Property prop, XClass declaringClass, Join join) {
    if ( declaringClass != null ) {
      final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass );
      if ( inheritanceState == null ) {
        throw new AssertionFailure(
            "Declaring class is not found in the inheritance state hierarchy: " + declaringClass
        );
      }
      if ( inheritanceState.isEmbeddableSuperclass() ) {
        join.addMappedsuperclassProperty(prop);
View Full Code Here

      if (node.getName() != null) {
        path.append( node.getName() ).append( "." );
      }
    }
    if ( traversableProperty.getName() == null ) {
      throw new AssertionFailure(
          "TraversableResolver being passed a traversableProperty with null name. pathToTraversableObject: "
              + path.toString() );
    }
    path.append( traversableProperty.getName() );
View Full Code Here

          case PLURAL_ATTRIBUTE : {
            declaredPluralAttributes.put(attribute.getName(), (PluralAttribute<X,?,?>) attribute );
            break;
          }
          default : {
            throw new AssertionFailure( "unknown bindable type: " + bindableType );
          }
        }
      }
    };
  }
View Full Code Here

        finally {
                    LOG.trace("Completed mapped superclass [" + safeMapping.getMappedClass().getName() + "]");
        }
      }
      else {
        throw new AssertionFailure( "Unexpected mapping type: " + mapping.getClass() );
      }
    }

    for ( EmbeddableTypeImpl embeddable : embeddables.values() ) {
      populateStaticMetamodel( embeddable );
View Full Code Here

        }
        field.set( null, attribute );
      }
      catch ( IllegalAccessException e ) {
        // todo : exception type?
        throw new AssertionFailure(
            "Unable to inject static metamodel attribute : " + metamodelClass.getName() + '#' + name,
            e
        );
      }
      catch ( IllegalArgumentException e ) {
View Full Code Here

  public void popEntityWorkedOn(PersistentClass persistentClass) {
    final PersistentClass stackTop = stackOfPersistentClassesBeingProcessed.remove(
        stackOfPersistentClassesBeingProcessed.size() - 1
    );
    if (stackTop != persistentClass) {
      throw new AssertionFailure( "Inconsistent popping: "
        + persistentClass.getEntityName() + " instead of " + stackTop.getEntityName() );
    }
  }
View Full Code Here

  }

  public PersistentClass getPersistentClassHostingProperties(MappedSuperclassTypeImpl<?> mappedSuperclassType) {
    final PersistentClass persistentClass = mappedSuperClassTypeToPersistentClass.get( mappedSuperclassType );
    if (persistentClass == null) {
      throw new AssertionFailure( "Could not find PersistentClass for MappedSuperclassType: "
          + mappedSuperclassType.getJavaType() );
    }
    return persistentClass;
  }
View Full Code Here

        finally {
                    LOG.trace("Completed mapped superclass [" + safeMapping.getMappedClass().getName() + "]");
        }
      }
      else {
        throw new AssertionFailure( "Unexpected mapping type: " + mapping.getClass() );
      }
    }

    for ( EmbeddableTypeImpl embeddable : embeddables.values() ) {
      populateStaticMetamodel( embeddable );
View Full Code Here

TOP

Related Classes of org.hibernate.annotations.common.AssertionFailure

Copyright © 2018 www.massapicom. 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.