Package org.hibernate.annotations.common.reflection

Examples of org.hibernate.annotations.common.reflection.ReflectionManager


   * @return A map of {@code InheritanceState}s keyed against their {@code XClass}.
   */
  public static Map<XClass, InheritanceState> buildInheritanceStates(
      List<XClass> orderedClasses,
      Mappings mappings) {
    ReflectionManager reflectionManager = mappings.getReflectionManager();
    Map<XClass, InheritanceState> inheritanceStatePerClass = new HashMap<XClass, InheritanceState>(
        orderedClasses.size()
    );
    for ( XClass clazz : orderedClasses ) {
      InheritanceState superclassState = InheritanceState.getSuperclassInheritanceState(
View Full Code Here


    final Properties configurationProperties = factoryState.getConfigurationProperties();
    BuildContext buildContext = new BuildContext();
   
    //TODO we don't keep the reflectionManager. Is that an issue?
    IncrementalSearchConfiguration cfg = new IncrementalSearchConfiguration( classes, configurationProperties );
    final ReflectionManager reflectionManager = getReflectionManager( cfg );

    //TODO programmatic mapping support
    //FIXME The current initDocumentBuilders
    initDocumentBuilders( cfg, reflectionManager, buildContext );
    final Map<Class<?>, DocumentBuilderIndexedEntity<?>> documentBuildersIndexedEntities = factoryState.getDocumentBuildersIndexedEntities();
View Full Code Here

  private SearchFactoryImplementor buildNewSearchFactory() {
    createCleanFactoryState();

    factoryState.setConfigurationProperties( cfg.getProperties() );
    factoryState.setErrorHandler( createErrorHandler( factoryState.getConfigurationProperties() ) );
    final ReflectionManager reflectionManager = getReflectionManager( cfg );
    BuildContext buildContext = new BuildContext();

    final SearchMapping mapping = SearchMappingBuilder.getSearchMapping( cfg );
    if ( mapping != null ) {
      if ( !( reflectionManager instanceof MetadataProviderInjector ) ) {
View Full Code Here

      );
    }
  }

  private ReflectionManager getReflectionManager(SearchConfiguration cfg) {
    ReflectionManager reflectionManager = cfg.getReflectionManager();
    return geReflectionManager( reflectionManager );
  }
View Full Code Here

   * @return A map of {@code InheritanceState}s keyed against their {@code XClass}.
   */
  public static Map<XClass, InheritanceState> buildInheritanceStates(
      List<XClass> orderedClasses,
      Mappings mappings) {
    ReflectionManager reflectionManager = mappings.getReflectionManager();
    Map<XClass, InheritanceState> inheritanceStatePerClass = new HashMap<XClass, InheritanceState>(
        orderedClasses.size()
    );
    for ( XClass clazz : orderedClasses ) {
      InheritanceState superclassState = InheritanceState.getSuperclassInheritanceState(
View Full Code Here

   * @return A map of {@code InheritanceState}s keyed against their {@code XClass}.
   */
  public static Map<XClass, InheritanceState> buildInheritanceStates(
      List<XClass> orderedClasses,
      Mappings mappings) {
    ReflectionManager reflectionManager = mappings.getReflectionManager();
    Map<XClass, InheritanceState> inheritanceStatePerClass = new HashMap<XClass, InheritanceState>(
        orderedClasses.size()
    );
    for ( XClass clazz : orderedClasses ) {
      InheritanceState superclassState = InheritanceState.getSuperclassInheritanceState(
View Full Code Here

    }
  }

  private static String getDirectoryProviderName(XClass clazz, Configuration cfg) {
    //yuk
    ReflectionManager reflectionManager = SearchFactoryImpl.getReflectionManager(cfg);
    //get the most specialized (ie subclass > superclass) non default index name
    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    PersistentClass pc = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( pc.getMappedClass() );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

  }

  @SuppressWarnings( "unchecked" )
  public SearchFactoryImpl(Configuration cfg) {
    //yuk
    ReflectionManager reflectionManager = getReflectionManager( cfg );

    Analyzer analyzer = initAnalyzer(cfg);
    initDocumentBuilders(cfg, reflectionManager, analyzer);

    Set<Class> indexedClasses = documentBuilders.keySet();
View Full Code Here

    return readerProvider;
  }

  //not happy about having it as a helper class but I don't want cfg to be associated with the SearchFactory
  public static ReflectionManager getReflectionManager(Configuration cfg) {
    ReflectionManager reflectionManager;
    try {
      //TODO introduce a ReflectionManagerHolder interface to avoid reflection
      //I want to avoid hard link between HAN and Validator for usch a simple need
      //reuse the existing reflectionManager one when possible
      reflectionManager =
View Full Code Here

   * @return A map of {@code InheritanceState}s keyed against their {@code XClass}.
   */
  public static Map<XClass, InheritanceState> buildInheritanceStates(
      List<XClass> orderedClasses,
      Mappings mappings) {
    ReflectionManager reflectionManager = mappings.getReflectionManager();
    Map<XClass, InheritanceState> inheritanceStatePerClass = new HashMap<XClass, InheritanceState>(
        orderedClasses.size()
    );
    for ( XClass clazz : orderedClasses ) {
      InheritanceState superclassState = InheritanceState.getSuperclassInheritanceState(
View Full Code Here

TOP

Related Classes of org.hibernate.annotations.common.reflection.ReflectionManager

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.