Java 类org.hibernate.annotations.common.reflection.ReflectionManager 实例源码

项目:dhus-core    文件:EntityCallbackHandlerInitializer.java   
@PostConstruct
public void init() throws ClassNotFoundException
{
  final Configuration configuration = annotationSessionFactory
        .getConfiguration();
  final ReflectionManager reflectionManager = configuration
        .getReflectionManager();
  final Iterator<PersistentClass> classMappings = configuration
        .getClassMappings();
  while (classMappings.hasNext()) 
  {
     entityCallbackHandler.add(reflectionManager.classForName(
        classMappings.next().getClassName(), this.getClass()),
        reflectionManager);
  }
}
项目:DataHubSystem    文件:EntityCallbackHandlerInitializer.java   
@PostConstruct
public void init() throws ClassNotFoundException
{
  final Configuration configuration = annotationSessionFactory
        .getConfiguration();
  final ReflectionManager reflectionManager = configuration
        .getReflectionManager();
  final Iterator<PersistentClass> classMappings = configuration
        .getClassMappings();
  while (classMappings.hasNext()) 
  {
     entityCallbackHandler.add(reflectionManager.classForName(
        classMappings.next().getClassName(), this.getClass()),
        reflectionManager);
  }
}
项目:lams    文件:AnnotationBinder.java   
/**
 * For the mapped entities build some temporary data-structure containing information about the
 * inheritance status of a class.
 *
 * @param orderedClasses Order list of all annotated entities and their mapped superclasses
 *
 * @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(
                clazz, inheritanceStatePerClass
        );
        InheritanceState state = new InheritanceState( clazz, inheritanceStatePerClass, mappings );
        if ( superclassState != null ) {
            //the classes are ordered thus preventing an NPE
            //FIXME if an entity has subclasses annotated @MappedSperclass wo sub @Entity this is wrong
            superclassState.setHasSiblings( true );
            InheritanceState superEntityState = InheritanceState.getInheritanceStateOfSuperEntity(
                    clazz, inheritanceStatePerClass
            );
            state.setHasParents( superEntityState != null );
            final boolean nonDefault = state.getType() != null && !InheritanceType.SINGLE_TABLE
                    .equals( state.getType() );
            if ( superclassState.getType() != null ) {
                final boolean mixingStrategy = state.getType() != null && !state.getType()
                        .equals( superclassState.getType() );
                if ( nonDefault && mixingStrategy ) {
                    LOG.invalidSubStrategy( clazz.getName() );
                }
                state.setType( superclassState.getType() );
            }
        }
        inheritanceStatePerClass.put( clazz, state );
    }
    return inheritanceStatePerClass;
}
项目:lams    文件:PropertyInferredData.java   
/**
 * Take the annoted element for lazy process
 */
public PropertyInferredData(XClass declaringClass, XProperty property, String propertyAccessor, ReflectionManager reflectionManager) {
    this.declaringClass = declaringClass;
    this.property = property;
    this.defaultAccess = AccessType.getAccessStrategy( propertyAccessor );
    this.reflectionManager = reflectionManager;
}
项目:spring-data-snowdrop    文件:SearchConfigurationTester.java   
@Override
public ReflectionManager getReflectionManager() {
    return null;
}
项目:lams    文件:Configuration.java   
public ReflectionManager getReflectionManager() {
    return reflectionManager;
}
项目:lams    文件:Configuration.java   
public ReflectionManager getReflectionManager() {
    return reflectionManager;
}
项目:Hibernate-Search-GenericJPA    文件:StandaloneSearchConfiguration.java   
@Override
public ReflectionManager getReflectionManager() {
    return this.reflectionManager;
}
项目:lams    文件:Mappings.java   
public ReflectionManager getReflectionManager();