Package org.hibernate.cfg.annotations.reflection

Examples of org.hibernate.cfg.annotations.reflection.JPAMetadataProvider


    if ( inSecondPass || !isOrmXml( metadataXml ) ) {
      metadataSourceQueue.add( metadataXml );
    }
    else {
      final MetadataProvider metadataProvider = ( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
      JPAMetadataProvider jpaMetadataProvider = ( JPAMetadataProvider ) metadataProvider;
      List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( metadataXml.getDocumentTree() );
      for ( String className : classNames ) {
        try {
          metadataSourceQueue.add( reflectionManager.classForName( className, this.getClass() ) );
        }
        catch ( ClassNotFoundException e ) {
          throw new AnnotationException( "Unable to load class defined in XML: " + className, e );
        }
      }
      jpaMetadataProvider.getXMLContext().applyDiscoveredAttributeConverters( this );
    }
  }
View Full Code Here


    out.writeObject( metadataProvider );
    out.defaultWriteObject();
  }

  private void createReflectionManager() {
    createReflectionManager( new JPAMetadataProvider() );
  }
View Full Code Here

    setEntityResolver( new EJB3DTDEntityResolver() );
    anyMetaDefs = new HashMap<String, AnyMetaDef>();
    propertiesAnnotatedWithMapsId = new HashMap<XClass, Map<String, PropertyData>>();
    propertiesAnnotatedWithIdAndToOne = new HashMap<XClass, Map<String, PropertyData>>();
    reflectionManager = new JavaReflectionManager();
    ( ( MetadataProviderInjector ) reflectionManager ).setMetadataProvider( new JPAMetadataProvider() );
    configurationArtefactPrecedence = Collections.emptyList();
  }
View Full Code Here

        }
        hbmDocuments.add( doc );
      }
      else {
        final MetadataProvider metadataProvider = ( ( MetadataProviderInjector ) reflectionManager ).getMetadataProvider();
        JPAMetadataProvider jpaMetadataProvider = ( JPAMetadataProvider ) metadataProvider;
        List<String> classnames = jpaMetadataProvider.getXMLContext().addDocument( doc );
        for ( String classname : classnames ) {
          try {
            annotatedClasses.add( reflectionManager.classForName( classname, this.getClass() ) );
          }
          catch ( ClassNotFoundException e ) {
View Full Code Here

    if ( inSecondPass || !isOrmXml( metadataXml ) ) {
      metadataSourceQueue.add( metadataXml );
    }
    else {
      final MetadataProvider metadataProvider = ( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
      JPAMetadataProvider jpaMetadataProvider = ( JPAMetadataProvider ) metadataProvider;
      List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( metadataXml.getDocumentTree() );
      for ( String className : classNames ) {
        try {
          metadataSourceQueue.add( reflectionManager.classForName( className, this.getClass() ) );
        }
        catch ( ClassNotFoundException e ) {
View Full Code Here

    if ( inSecondPass || !isOrmXml( metadataXml ) ) {
      metadataSourceQueue.add( metadataXml );
    }
    else {
      final MetadataProvider metadataProvider = ( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
      JPAMetadataProvider jpaMetadataProvider = ( JPAMetadataProvider ) metadataProvider;
      List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( metadataXml.getDocumentTree() );
      for ( String className : classNames ) {
        try {
          metadataSourceQueue.add( reflectionManager.classForName( className, this.getClass() ) );
        }
        catch ( ClassNotFoundException e ) {
View Full Code Here

    out.writeObject( metadataProvider );
    out.defaultWriteObject();
  }

  private void createReflectionManager() {
    createReflectionManager( new JPAMetadataProvider() );
  }
View Full Code Here

    if ( inSecondPass || !isOrmXml( metadataXml ) ) {
      metadataSourceQueue.add( metadataXml );
    }
    else {
      final MetadataProvider metadataProvider = ( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
      JPAMetadataProvider jpaMetadataProvider = ( JPAMetadataProvider ) metadataProvider;
      List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( metadataXml.getDocumentTree() );
      for ( String className : classNames ) {
        try {
          metadataSourceQueue.add( reflectionManager.classForName( className, this.getClass() ) );
        }
        catch ( ClassNotFoundException e ) {
View Full Code Here

    out.writeObject( metadataProvider );
    out.defaultWriteObject();
  }

  private void createReflectionManager() {
    createReflectionManager( new JPAMetadataProvider() );
  }
View Full Code Here

    hbmDocuments = new ArrayList<Document>();
    namingStrategy = EJB3NamingStrategy.INSTANCE;
    setEntityResolver( new EJB3DTDEntityResolver() );
    anyMetaDefs = new HashMap<String, AnyMetaDef>();
    reflectionManager = new JavaReflectionManager();
    ( ( MetadataProviderInjector ) reflectionManager ).setMetadataProvider( new JPAMetadataProvider() );

  }
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.annotations.reflection.JPAMetadataProvider

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.