Package javax.persistence

Examples of javax.persistence.Inheritance


    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

  {
    // Inheritance annotation/configuration is specified
    // on the entity class that is the root of the entity
    // class hierarachy.
    InheritanceConfig inheritanceConfig;
    Inheritance inheritanceAnn;

    getInternalInheritanceConfig(type, _annotationCfg);
    inheritanceAnn = (Inheritance) _annotationCfg.getAnnotation();
    inheritanceConfig = _annotationCfg.getInheritanceConfig();
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

    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

    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

    TableName tableName = getTableNameFromAnnotation(beanClass);
    if (tableName == null) {

      Class<?> supCls = beanClass.getSuperclass();
      Inheritance inheritance = supCls.getAnnotation(Inheritance.class);
      if (inheritance != null) {
        // get the table as per inherited class in case their
        // is not a table annotation in the inheritance hierarchy
        return getTableName(supCls);
      }
View Full Code Here

      info.setParent(parent);
    } else {
      // its the root of inheritance tree...
    }

    Inheritance ia = (Inheritance) cls.getAnnotation(Inheritance.class);
    if (ia != null) {
      ia.strategy();
    }
    DiscriminatorColumn da = (DiscriminatorColumn) cls.getAnnotation(DiscriminatorColumn.class);
    if (da != null) {
      // lowercase the discriminator column for RawSql and JSON
      info.setDiscriminatorColumn(da.name().toLowerCase());
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.