Package javax.persistence

Examples of javax.persistence.Inheritance


  public String accessType = null;
  public Boolean isPropertyAnnotated;

  private void extractInheritanceType() {
    XAnnotatedElement element = clazz;
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }
View Full Code Here


  private InheritanceType type;
  private boolean isEmbeddableSuperclass = false;

  private void extractInheritanceType() {
    XAnnotatedElement element = getClazz();
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }
View Full Code Here

  public String accessType = null;
  public Boolean isPropertyAnnotated;

  private void extractInheritanceType() {
    XAnnotatedElement element = clazz;
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }
View Full Code Here

        Class superClass = c;
        Class rootClass = null;
        while ((superClass = superClass.getSuperclass()) != null) {
            MappedSuperclass mappedSuperclass = (MappedSuperclass) superClass.getAnnotation(MappedSuperclass.class);
            Entity entity = (Entity) superClass.getAnnotation(Entity.class);
            Inheritance inheritance = (Inheritance) superClass.getAnnotation(Inheritance.class);
            if (mappedSuperclass != null || entity != null) {
                putProperties(ai, superClass);
                putMethods(ai, superClass);
                if (entity != null) {
                    rootClass = superClass;
View Full Code Here

    extractInheritanceType();
  }

  private void extractInheritanceType() {
    XAnnotatedElement element = getClazz();
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }
View Full Code Here

  public String accessType = null;
  public Boolean isPropertyAnnotated;

  private void extractInheritanceType() {
    XAnnotatedElement element = clazz;
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }
View Full Code Here

    extractInheritanceType();
  }

  private void extractInheritanceType() {
    XAnnotatedElement element = getClazz();
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }
View Full Code Here

            // scan for inheritence model.

            if (superClazzType.getPersistenceType().equals(PersistenceType.ENTITY)
                    && superClazzType.getJavaType().isAnnotationPresent(Inheritance.class))
            {
                Inheritance inheritenceAnn = superClazzType.getJavaType().getAnnotation(Inheritance.class);

                InheritanceType strategyType = inheritenceAnn.strategy();

                String descriminator = null;
                String descriminatorValue = null;
                String tableName = null;
                String schemaName = null;
View Full Code Here

    else
      typeName = entityAnn.name();

    // Validates the type
    String entityName;
    Inheritance inheritanceAnn = null;
    InheritanceConfig inheritanceConfig = null;
    Class rootClass = type;
    Entity rootEntityAnn = null;
    EntityConfig rootEntityConfig = null;
View Full Code Here

/*    else
      typeName = mappedSuperAnn.name();
*/
    // Validates the type
    String entityName;
    Inheritance inheritanceAnn = null;
    InheritanceConfig inheritanceConfig = null;
    Class rootClass = type;
    Entity rootEntityAnn = null;
    EntityConfig rootEntityConfig = null;

View Full Code Here

TOP

Related Classes of javax.persistence.Inheritance

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.