Examples of InheritanceType


Examples of javax.persistence.InheritanceType

                            idClassName = ((Class)annotationValues.get("value")).getName();
                        }
                        else if (annName.equals(JPAAnnotationUtils.INHERITANCE))
                        {
                            // Only valid in the root class
                            InheritanceType inhType = (InheritanceType)annotationValues.get("strategy");
                            inheritanceStrategyForTree = inhType.toString();
                            if (inhType == InheritanceType.JOINED)
                            {
                                inheritanceStrategy = InheritanceStrategy.NEW_TABLE.toString();
                            }
                            else if (inhType == InheritanceType.TABLE_PER_CLASS)
View Full Code Here

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

Examples of org.hibernate.metamodel.binding.InheritanceType

    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

Examples of org.hibernate.metamodel.binding.InheritanceType

  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

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

Examples of org.hibernate.metamodel.binding.InheritanceType

    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

Examples of org.hibernate.metamodel.binding.InheritanceType

  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

Examples of org.hibernate.metamodel.binding.InheritanceType

  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

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

Examples of org.hibernate.metamodel.binding.InheritanceType

    }
    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
TOP
Copyright © 2018 www.massapi.com. 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.