Examples of AnnotationException


Examples of org.hibernate.AnnotationException

      String dependentTable = sp.getValue().getTable().getQuotedName();
      if ( dependentTable.compareTo( startTable ) == 0 ) {
        StringBuilder sb = new StringBuilder(
            "Foreign key circularity dependency involving the following tables: "
        );
        throw new AnnotationException( sb.toString() );
      }
      buildRecursiveOrderedFkSecondPasses( orderedFkSecondPasses, isADependencyOf, startTable, dependentTable );
      if ( !orderedFkSecondPasses.contains( sp ) ) {
        orderedFkSecondPasses.add( 0, sp );
      }
View Full Code Here

Examples of org.hibernate.AnnotationException

      for ( Column column : unboundNoLogical ) {
        sb.append( column.getName() ).append( ", " );
      }
      sb.setLength( sb.length() - 2 );
      sb.append( " not found" );
      throw new AnnotationException( sb.toString() );
    }
  }
View Full Code Here

Examples of org.hibernate.AnnotationException

        log.info( "Hibernate Validator not found: ignoring" );
      }
      isValidatorNotPresentLogged = true;
    }
    catch ( NoSuchMethodException e ) {
      throw new AnnotationException( e );
    }
    if ( applyMethod != null ) {
      for ( PersistentClass persistentClazz : classes.values() ) {
        //integrate the validate framework
        String className = persistentClazz.getClassName();
View Full Code Here

Examples of org.hibernate.AnnotationException

      Object validateEventListener;
      try {
        validateEventListener = validateEventListenerClass.newInstance();
      }
      catch ( Exception e ) {
        throw new AnnotationException( "Unable to load Validator event listener", e );
      }
      {
        boolean present = false;
        PreInsertEventListener[] listeners = getEventListeners().getPreInsertEventListeners();
        if ( listeners != null ) {
View Full Code Here

Examples of org.hibernate.AnnotationException

  private static Object instantiateEventListener(Class<?> clazz) {
    Object searchEventListener;
    try {
      searchEventListener = clazz.newInstance();
    } catch (Exception e) {
      throw new AnnotationException(
          "Unable to load Search event listener", e);
    }
    return searchEventListener;
  }
View Full Code Here

Examples of org.hibernate.AnnotationException

      String propertyName,
      String suffixForDefaultColumnName,
      Mappings mappings) {
    if ( ann != null ) {
      if ( BinderHelper.isEmptyAnnotationValue( mappedBy ) ) {
        throw new AnnotationException(
            "Illegal attempt to define a @JoinColumn with a mappedBy association: "
                + BinderHelper.getRelativePath( propertyHolder, propertyName )
        );
      }
      Ejb3JoinColumn joinColumn = new Ejb3JoinColumn();
View Full Code Here

Examples of org.hibernate.AnnotationException

    this.propertyHolder = PropertyHolderBuilder.buildPropertyHolder( persistentClass, joins, getMappings(), inheritanceStatePerClass );
  }

  public static void checkIfJoinColumn(Object columns, PropertyHolder holder, PropertyData property) {
    if ( !( columns instanceof Ejb3JoinColumn[] ) ) {
      throw new AnnotationException(
          "@Column cannot be used on an association property: "
              + holder.getEntityName()
              + "."
              + property.getPropertyName()
      );
View Full Code Here

Examples of org.hibernate.AnnotationException

    for ( XProperty property : xprops.values() ) {
      if ( !property.isTypeResolved() && !discoverTypeWithoutReflection( property ) ) {
        String msg = "Property " + StringHelper.qualify( xClass.getName(), property.getName() ) +
            " has an unbound type and no explicit target entity. Resolve this Generic usage issue" +
            " or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type";
        throw new AnnotationException( msg );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.AnnotationException

    else if ( p.isAnnotationPresent( org.hibernate.annotations.Any.class ) ) {
      return true;
    }
    else if ( p.isAnnotationPresent( ManyToAny.class ) ) {
      if ( !p.isCollection() && !p.isArray() ) {
        throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
      }
      return true;
    }
    else if ( p.isAnnotationPresent( Type.class ) ) {
      return true;
View Full Code Here

Examples of org.hibernate.AnnotationException

        );
        idPropertyCount += currentIdPropertyCount;
      }

      if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) {
        throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() );
      }
      elementsToProcess = new ElementsToProcess( elements, idPropertyCount );
    }
    return elementsToProcess;
  }
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.