Examples of AnnotationException


Examples of org.hibernate.AnnotationException

      return classes;
    }

    public void addAnyMetaDef(AnyMetaDef defAnn) throws AnnotationException {
      if ( anyMetaDefs.containsKey( defAnn.name() ) ) {
        throw new AnnotationException( "Two @AnyMetaDef with the same name defined: " + defAnn.name() );
      }
      anyMetaDefs.put( defAnn.name(), defAnn );
    }
View Full Code Here

Examples of org.hibernate.AnnotationException

      return classes;
    }

    public void addAnyMetaDef(AnyMetaDef defAnn) throws AnnotationException {
      if ( anyMetaDefs.containsKey( defAnn.name() ) ) {
        throw new AnnotationException( "Two @AnyMetaDef with the same name defined: " + defAnn.name() );
      }
      anyMetaDefs.put( defAnn.name(), defAnn );
    }
View Full Code Here

Examples of org.hibernate.AnnotationException

                  this.getClass()
              )
          );
        }
        catch ( ClassNotFoundException e ) {
          throw new AnnotationException(
              "Unable to find " + element.getPath() + ".class: " + className, e
          );
        }
      }
      AnnotationDescriptor ad = new AnnotationDescriptor( EntityListeners.class );
View Full Code Here

Examples of org.hibernate.AnnotationException

        clazz = ReflectHelper.classForName(
            XMLContext.buildSafeClassName( className, defaults ), this.getClass()
        );
      }
      catch ( ClassNotFoundException e ) {
        throw new AnnotationException(
            "Unable to find " + element.getPath() + " " + nodeName + ": " + className, e
        );
      }
      ad.setValue( getJavaAttributeNameFromXMLOne( nodeName ), clazz );
    }
View Full Code Here

Examples of org.hibernate.AnnotationException

              XMLContext.buildSafeClassName( mapKeyClassName, defaults ),
              this.getClass()
          );
        }
        catch ( ClassNotFoundException e ) {
          throw new AnnotationException(
              "Unable to find " + element.getPath() + " " + nodeName + ": " + mapKeyClassName, e
          );
        }
        ad.setValue( "value", clazz );
      }
View Full Code Here

Examples of org.hibernate.AnnotationException

      }
      else if ( "STRING".equalsIgnoreCase( enumerated ) ) {
        ad.setValue( "value", EnumType.STRING );
      }
      else if ( StringHelper.isNotEmpty( enumerated ) ) {
        throw new AnnotationException( "Unknown EnumType: " + enumerated + ". " + SCHEMA_VALIDATION );
      }
      annotationList.add( AnnotationFactory.create( ad ) );
    }
  }
View Full Code Here

Examples of org.hibernate.AnnotationException

      }
      else if ( "AUTO".equalsIgnoreCase( strategy ) ) {
        ad.setValue( "strategy", GenerationType.AUTO );
      }
      else if ( StringHelper.isNotEmpty( strategy ) ) {
        throw new AnnotationException( "Unknown GenerationType: " + strategy + ". " + SCHEMA_VALIDATION );
      }
      copyStringAttribute( ad, subElement, "generator", false );
      return AnnotationFactory.create( ad );
    }
    else {
View Full Code Here

Examples of org.hibernate.AnnotationException

      }
      else if ( "TIMESTAMP".equalsIgnoreCase( temporal ) ) {
        ad.setValue( "value", TemporalType.TIMESTAMP );
      }
      else if ( StringHelper.isNotEmpty( temporal ) ) {
        throw new AnnotationException( "Unknown TemporalType: " + temporal + ". " + SCHEMA_VALIDATION );
      }
      annotationList.add( AnnotationFactory.create( ad ) );
    }
  }
View Full Code Here

Examples of org.hibernate.AnnotationException

      AccessType type;
      try {
        type = AccessType.valueOf( access );
      }
      catch ( IllegalArgumentException e ) {
        throw new AnnotationException( access + " is not a valid access type. Check you xml confguration." );
      }

      if ( ( AccessType.PROPERTY.equals( type ) && this.element instanceof Method ) ||
          ( AccessType.FIELD.equals( type ) && this.element instanceof Field ) ) {
        return;
View Full Code Here

Examples of org.hibernate.AnnotationException

      copyIntegerAttribute( column, element, "scale" );
      return (Column) AnnotationFactory.create( column );
    }
    else {
      if ( isMandatory ) {
        throw new AnnotationException( current.getPath() + ".column is mandatory. " + SCHEMA_VALIDATION );
      }
      return null;
    }
  }
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.