Package org.hibernate.metamodel.binding

Examples of org.hibernate.metamodel.binding.InheritanceType


          processedEntities,
          classToDirectSubClassMap
      );

      AccessType defaultAccessType = determineDefaultAccessType( rootClassWithAllSubclasses );
      InheritanceType hierarchyInheritanceType = determineInheritanceType(
          rootClassInfo,
          rootClassWithAllSubclasses
      );

      // create the root entity source
View Full Code Here


    if(classes.size() == 1) {
      return InheritanceType.NO_INHERITANCE;
    }

    // if we have more than one entity class the default is SINGLE_TABLE
    InheritanceType inheritanceType = InheritanceType.SINGLE_TABLE;
    AnnotationInstance inheritanceAnnotation = JandexHelper.getSingleAnnotation(
        rootClassInfo, JPADotNames.INHERITANCE
    );
    if ( inheritanceAnnotation != null ) {
      String enumName = inheritanceAnnotation.value( "strategy" ).asEnum();
View Full Code Here

  public RootEntitySource getRootEntitySource() {
    return rootEntitySource;
  }

  public void processSubclass(SubclassEntitySourceImpl subclassEntitySource) {
    final InheritanceType inheritanceType = Helper.interpretInheritanceType( subclassEntitySource.entityElement() );
    if ( hierarchyInheritanceType == InheritanceType.NO_INHERITANCE ) {
      hierarchyInheritanceType = inheritanceType;
    }
    else if ( hierarchyInheritanceType != inheritanceType ) {
      throw new MappingException( "Mixed inheritance strategies not supported", subclassEntitySource.getOrigin() );
View Full Code Here

          processedEntities,
          classToDirectSubClassMap
      );

      AccessType defaultAccessType = determineDefaultAccessType( rootClassWithAllSubclasses );
      InheritanceType hierarchyInheritanceType = determineInheritanceType(
          rootClassInfo,
          rootClassWithAllSubclasses
      );

      // create the root entity source
View Full Code Here

    if(classes.size() == 1) {
      return InheritanceType.NO_INHERITANCE;
    }

    // if we have more than one entity class the default is SINGLE_TABLE
    InheritanceType inheritanceType = InheritanceType.SINGLE_TABLE;
    AnnotationInstance inheritanceAnnotation = JandexHelper.getSingleAnnotation(
        rootClassInfo, JPADotNames.INHERITANCE
    );
    if ( inheritanceAnnotation != null ) {
      String enumName = inheritanceAnnotation.value( "strategy" ).asEnum();
View Full Code Here

  private final InheritanceType inheritanceType;
  private final List<T> configuredClasses;

  public static ConfiguredClassHierarchy<EntityClass> createEntityClassHierarchy(List<ClassInfo> classInfoList, AnnotationBindingContext context) {
    AccessType defaultAccessType = determineDefaultAccessType( classInfoList );
    InheritanceType inheritanceType = determineInheritanceType( classInfoList );
    return new ConfiguredClassHierarchy<EntityClass>(
        classInfoList,
        context,
        defaultAccessType,
        inheritanceType,
View Full Code Here

  private static InheritanceType determineInheritanceType(List<ClassInfo> classes) {
    if ( classes.size() == 1 ) {
      return InheritanceType.NO_INHERITANCE;
    }

    InheritanceType inheritanceType = null;
    for ( ClassInfo info : classes ) {
      AnnotationInstance inheritanceAnnotation = JandexHelper.getSingleAnnotation(
          info, JPADotNames.INHERITANCE
      );
      if ( inheritanceAnnotation == null ) {
        continue;
      }

      javax.persistence.InheritanceType jpaInheritanceType = Enum.valueOf(
          javax.persistence.InheritanceType.class, inheritanceAnnotation.value( "strategy" ).asEnum()
      );
      InheritanceType tmpInheritanceType = InheritanceType.get( jpaInheritanceType );
      if ( tmpInheritanceType == null ) {
        // default inheritance type is single table
        inheritanceType = InheritanceType.SINGLE_TABLE;
      }
View Full Code Here

          processedEntities,
          classToDirectSubClassMap
      );

      AccessType defaultAccessType = determineDefaultAccessType( rootClassWithAllSubclasses );
      InheritanceType hierarchyInheritanceType = determineInheritanceType(
          rootClassInfo,
          rootClassWithAllSubclasses
      );

      // create the root entity source
View Full Code Here

    }
    return accessType;
  }

  private static InheritanceType determineInheritanceType(ClassInfo rootClassInfo, List<ClassInfo> classes) {
    InheritanceType inheritanceType = InheritanceType.SINGLE_TABLE;
    AnnotationInstance inheritanceAnnotation = JandexHelper.getSingleAnnotation(
        rootClassInfo, JPADotNames.INHERITANCE
    );
    if ( inheritanceAnnotation != null ) {
      String enumName = inheritanceAnnotation.value( "strategy" ).asEnum();
View Full Code Here

  private static InheritanceType determineInheritanceType(List<ClassInfo> classes) {
    if ( classes.size() == 1 ) {
      return InheritanceType.NO_INHERITANCE;
    }

    InheritanceType inheritanceType = null;
    for ( ClassInfo info : classes ) {
      AnnotationInstance inheritanceAnnotation = JandexHelper.getSingleAnnotation(
          info, JPADotNames.INHERITANCE
      );
      if ( inheritanceAnnotation == null ) {
        continue;
      }

      javax.persistence.InheritanceType jpaInheritanceType = Enum.valueOf(
          javax.persistence.InheritanceType.class, inheritanceAnnotation.value( "strategy" ).asEnum()
      );
      InheritanceType tmpInheritanceType = InheritanceType.get( jpaInheritanceType );
      if ( tmpInheritanceType == null ) {
        // default inheritance type is single table
        inheritanceType = InheritanceType.SINGLE_TABLE;
      }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.binding.InheritanceType

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.