Package org.hibernate.reflection

Examples of org.hibernate.reflection.XPackage


      }
    }
  }

  public static void bindPackage(String packageName, ExtendedMappings mappings) {
    XPackage pckg = null;
    try {
      pckg = mappings.getReflectionManager().packageForName( packageName );
    }
    catch (ClassNotFoundException cnf) {
      log.warn( "Package not found or wo package-info.java: " + packageName );
      return;
    }
    if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) {
      SequenceGenerator ann = pckg.getAnnotation( SequenceGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
      log.debug( "Add sequence generator with name: " + idGen.getName() );
    }
    if ( pckg.isAnnotationPresent( TableGenerator.class ) ) {
      TableGenerator ann = pckg.getAnnotation( TableGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );

    }
    if ( pckg.isAnnotationPresent( GenericGenerator.class ) ) {
      GenericGenerator ann = pckg.getAnnotation( GenericGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
    }
    bindQueries( pckg, mappings );
    bindFilterDefs( pckg, mappings );
View Full Code Here


      }
    }
  }

  public static void bindPackage(String packageName, ExtendedMappings mappings) {
    XPackage pckg = null;
    try {
      pckg = mappings.getReflectionManager().packageForName( packageName );
    }
    catch (ClassNotFoundException cnf) {
      log.warn( "Package not found or wo package-info.java: " + packageName );
      return;
    }
    if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) {
      SequenceGenerator ann = pckg.getAnnotation( SequenceGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
      log.debug( "Add sequence generator with name: " + idGen.getName() );
    }
    if ( pckg.isAnnotationPresent( TableGenerator.class ) ) {
      TableGenerator ann = pckg.getAnnotation( TableGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );

    }
    if ( pckg.isAnnotationPresent( GenericGenerator.class ) ) {
      GenericGenerator ann = pckg.getAnnotation( GenericGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
    }
    bindQueries( pckg, mappings );
    bindFilterDefs( pckg, mappings );
View Full Code Here

      }
    }
  }

  public static void bindPackage(String packageName, ExtendedMappings mappings) {
    XPackage pckg = null;
    try {
      pckg = mappings.getReflectionManager().packageForName( packageName );
    }
    catch (ClassNotFoundException cnf) {
      log.warn( "Package not found or wo package-info.java: " + packageName );
      return;
    }
    if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) {
      SequenceGenerator ann = pckg.getAnnotation( SequenceGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
      log.debug( "Add sequence generator with name: " + idGen.getName() );
    }
    if ( pckg.isAnnotationPresent( TableGenerator.class ) ) {
      TableGenerator ann = pckg.getAnnotation( TableGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );

    }
    if ( pckg.isAnnotationPresent( GenericGenerator.class ) ) {
      GenericGenerator ann = pckg.getAnnotation( GenericGenerator.class );
      IdGenerator idGen = buildIdGenerator( ann, mappings );
      mappings.addGenerator( idGen );
    }
    bindQueries( pckg, mappings );
    bindFilterDefs( pckg, mappings );
View Full Code Here

TOP

Related Classes of org.hibernate.reflection.XPackage

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.