Package javax.persistence

Examples of javax.persistence.Inheritance


        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            Inheritance annotation = element.getAnnotation(Inheritance.class);
            entity.setInheritance(new JpaInheritance(annotation));
        }
View Full Code Here


        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            Inheritance annotation = element.getAnnotation(Inheritance.class);
            entity.setInheritance(new JpaInheritance(annotation));
        }
View Full Code Here

   */
  private <T, I> void processSuperclassInheritance(CFMappingDef<T, I> cfMapDef) {
    Class<T> clazz = cfMapDef.getClazz();

    // if inheritance is defined then we setup for subclasses
    Inheritance inheritance = clazz.getAnnotation(Inheritance.class);
    if (null == inheritance) {
      return;
    }
    // TODO not hard-coded
    cfMapDef.setInheritanceType(InheritanceType.SINGLE_TABLE);
View Full Code Here

   *
   * @param c    The Entity class to be parsed.
   * @param sc  The SpeedoClass under construction.
   */
  private void parseInheritance(Class c, SpeedoClass sc) {
    Inheritance a = (Inheritance) c.getAnnotation(Inheritance.class);
    if (a == null) {
      return;
    }
    if (sc.inheritance == null) {
      // 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

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            Inheritance annotation = element.getAnnotation(Inheritance.class);
            entity.setInheritance(new JpaInheritance(annotation));
        }
View Full Code Here

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            Inheritance annotation = element.getAnnotation(Inheritance.class);
            entity.setInheritance(new JpaInheritance(annotation));
        }
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

        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

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.