Package javax.persistence

Examples of javax.persistence.Inheritance.strategy()


      // 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


      // This is a root class in an inheritance hierarchy
      sc.inheritance = new SpeedoInheritance();
      sc.inheritance.clazz = sc;
      sc.inheritance.superClassName = null;
    }
    switch (a.strategy()) {
    case SINGLE_TABLE: // filtered inheritance mapping
      SpeedoNoFieldColumn snofc;
      if (sc.inheritance.join != null) {
        logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
            + ": no join column definition required for SINGLE_TABLE strategy inheritance - ignored!");
View Full Code Here

        Inheritance inheritance = getAnnotation(Inheritance.class);
       
        if (inheritance == null) {
            return "";
        } else {
            return inheritance.strategy().name();  
        }
    }
   
    /**
     * INTERNAL: (OVERRIDE)
View Full Code Here

    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

    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }

  boolean hasTable() {
    return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() );
View Full Code Here

    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

    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }

  boolean hasTable() {
    return !hasParents || !InheritanceType.SINGLE_TABLE.equals( type );
View Full Code Here

    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

    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }

  boolean hasTable() {
    return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() );
View Full Code Here

    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

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.