Package org.hibernate.jpamodelgen.model

Examples of org.hibernate.jpamodelgen.model.MetaEntity


    super( parent, propertyName, type, collectionType );
    this.keyType = keyType;
  }

  public String getDeclarationString() {
    final MetaEntity hostingEntity = getHostingEntity();
    return new StringBuilder().append( "public static volatile " )
        .append( hostingEntity.importType( getMetaType() ) )
        .append( "<" )
        .append( hostingEntity.importType( hostingEntity.getQualifiedName() ) )
        .append( ", " )
        .append( hostingEntity.importType( keyType ) )
        .append( ", " )
        .append( hostingEntity.importType( getTypeDeclaration() ) )
        .append( "> " )
        .append( getPropertyName() )
        .append( ";" )
        .toString();
  }
View Full Code Here


      if ( !ElementKind.CLASS.equals( element.getKind() ) ) {
        continue;
      }

      String fqn = ( (TypeElement) element ).getQualifiedName().toString();
      MetaEntity alreadyExistingMetaEntity = tryGettingExistingEntityFromContext( mirror, fqn );
      if ( alreadyExistingMetaEntity != null && alreadyExistingMetaEntity.isMetaComplete() ) {
        String msg = "Skipping processing of annotations for " + fqn + " since xml configuration is metadata complete.";
        context.logMessage( Diagnostic.Kind.OTHER, msg );
        continue;
      }

      AnnotationMetaEntity metaEntity;
      if ( TypeUtils.containsAnnotation( element, Embeddable.class ) ) {
        metaEntity = new AnnotationEmbeddable( (TypeElement) element, context );
      }
      else {
        metaEntity = new AnnotationMetaEntity( (TypeElement) element, context );
      }

      if ( alreadyExistingMetaEntity != null ) {
        metaEntity.mergeInMembers( alreadyExistingMetaEntity.getMembers() );
      }
      addMetaEntityToContext( mirror, metaEntity );
    }
  }
View Full Code Here

      addMetaEntityToContext( mirror, metaEntity );
    }
  }

  private MetaEntity tryGettingExistingEntityFromContext(AnnotationMirror mirror, String fqn) {
    MetaEntity alreadyExistingMetaEntity = null;
    if ( TypeUtils.isAnnotationMirrorOfType( mirror, Entity.class ) ) {
      alreadyExistingMetaEntity = context.getMetaEntity( fqn );
    }
    else if ( TypeUtils.isAnnotationMirrorOfType( mirror, MappedSuperclass.class )
        || TypeUtils.isAnnotationMirrorOfType( mirror, Embeddable.class ) ) {
View Full Code Here

    super( parent, propertyName, type, collectionType );
    this.keyType = keyType;
  }

  public String getDeclarationString() {
    final MetaEntity hostingEntity = getHostingEntity();
    return new StringBuilder().append( "public static volatile " )
        .append( hostingEntity.importType( getMetaType() ) )
        .append( "<" )
        .append( hostingEntity.importType( hostingEntity.getQualifiedName() ) )
        .append( ", " )
        .append( hostingEntity.importType( keyType ) )
        .append( ", " )
        .append( hostingEntity.importType( getTypeDeclaration() ) )
        .append( "> " )
        .append( getPropertyName() )
        .append( ";" )
        .toString();
  }
View Full Code Here

      if ( !ElementKind.CLASS.equals( element.getKind() ) ) {
        continue;
      }

      String fqn = ( (TypeElement) element ).getQualifiedName().toString();
      MetaEntity alreadyExistingMetaEntity = tryGettingExistingEntityFromContext( mirror, fqn );
      if ( alreadyExistingMetaEntity != null && alreadyExistingMetaEntity.isMetaComplete() ) {
        String msg = "Skipping processing of annotations for " + fqn + " since xml configuration is metadata complete.";
        context.logMessage( Diagnostic.Kind.OTHER, msg );
        continue;
      }

      AnnotationMetaEntity metaEntity;
      if ( TypeUtils.containsAnnotation( element, Constants.EMBEDDABLE ) ) {
        metaEntity = new AnnotationEmbeddable( (TypeElement) element, context );
      }
      else {
        metaEntity = new AnnotationMetaEntity( (TypeElement) element, context );
      }

      if ( alreadyExistingMetaEntity != null ) {
        metaEntity.mergeInMembers( alreadyExistingMetaEntity.getMembers() );
      }
      addMetaEntityToContext( mirror, metaEntity );
    }
  }
View Full Code Here

      addMetaEntityToContext( mirror, metaEntity );
    }
  }

  private MetaEntity tryGettingExistingEntityFromContext(AnnotationMirror mirror, String fqn) {
    MetaEntity alreadyExistingMetaEntity = null;
    if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.ENTITY ) ) {
      alreadyExistingMetaEntity = context.getMetaEntity( fqn );
    }
    else if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.MAPPED_SUPERCLASS )
        || TypeUtils.isAnnotationMirrorOfType( mirror, Constants.EMBEDDABLE ) ) {
View Full Code Here

      if ( !ElementKind.CLASS.equals( element.getKind() ) ) {
        continue;
      }

      String fqn = ( (TypeElement) element ).getQualifiedName().toString();
      MetaEntity alreadyExistingMetaEntity = tryGettingExistingEntityFromContext( mirror, fqn );
      if ( alreadyExistingMetaEntity != null && alreadyExistingMetaEntity.isMetaComplete() ) {
        String msg = "Skipping processing of annotations for " + fqn + " since xml configuration is metadata complete.";
        context.logMessage( Diagnostic.Kind.OTHER, msg );
        continue;
      }
View Full Code Here

      addMetaEntityToContext( mirror, metaEntity );
    }
  }

  private MetaEntity tryGettingExistingEntityFromContext(AnnotationMirror mirror, String fqn) {
    MetaEntity alreadyExistingMetaEntity = null;
    if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.ENTITY )
        || TypeUtils.isAnnotationMirrorOfType( mirror, Constants.MAPPED_SUPERCLASS )) {
      alreadyExistingMetaEntity = context.getMetaEntity( fqn );
    }
    else if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.EMBEDDABLE ) ) {
View Full Code Here

    super( parent, propertyName, type, collectionType );
    this.keyType = keyType;
  }

  public String getDeclarationString() {
    final MetaEntity hostingEntity = getHostingEntity();
    return new StringBuilder().append( "public static volatile " )
        .append( hostingEntity.importType( getMetaType() ) )
        .append( "<" )
        .append( hostingEntity.importType( hostingEntity.getQualifiedName() ) )
        .append( ", " )
        .append( hostingEntity.importType( keyType ) )
        .append( ", " )
        .append( hostingEntity.importType( getTypeDeclaration() ) )
        .append( "> " )
        .append( getPropertyName() )
        .append( ";" )
        .toString();
  }
View Full Code Here

      if ( !ElementKind.CLASS.equals( element.getKind() ) ) {
        continue;
      }

      String fqn = ( ( TypeElement ) element ).getQualifiedName().toString();
      MetaEntity alreadyExistingMetaEntity = tryGettingExistingEntityFromContext( mirror, fqn );
      if ( alreadyExistingMetaEntity != null && alreadyExistingMetaEntity.isMetaComplete() ) {
        String msg = "Skipping processing of annotations for " + fqn + " since xml configuration is metadata complete.";
        context.logMessage( Diagnostic.Kind.OTHER, msg );
        continue;
      }

      AnnotationMetaEntity metaEntity;
      if ( TypeUtils.containsAnnotation( element, Embeddable.class ) ) {
        metaEntity = new AnnotationEmbeddable( ( TypeElement ) element, context );
      }
      else {
        metaEntity = new AnnotationMetaEntity( ( TypeElement ) element, context );
      }

      if ( alreadyExistingMetaEntity != null ) {
        metaEntity.mergeInMembers( alreadyExistingMetaEntity.getMembers() );
      }
      addMetaEntityToContext( mirror, metaEntity );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.jpamodelgen.model.MetaEntity

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.