Examples of AnnotationValue


Examples of org.jboss.jandex.AnnotationValue

    );
    if ( hibernateProxyAnnotation != null ) {
      isLazy = hibernateProxyAnnotation.value( "lazy" ) == null
          || hibernateProxyAnnotation.value( "lazy" ).asBoolean();
      if ( isLazy ) {
        final AnnotationValue proxyClassValue = hibernateProxyAnnotation.value( "proxyClass" );
        if ( proxyClassValue == null ) {
          proxy = getName();
        }
        else {
          proxy = proxyClassValue.asString();
        }
      }
      else {
        proxy = null;
      }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

  }

  @Override
  protected Map<String, String> resolveHibernateTypeParameters(AnnotationInstance typeAnnotation) {
    HashMap<String, String> typeParameters = new HashMap<String, String>();
    AnnotationValue parameterAnnotationValue = typeAnnotation.value( "parameters" );
    if ( parameterAnnotationValue != null ) {
      AnnotationInstance[] parameterAnnotations = parameterAnnotationValue.asNestedArray();
      for ( AnnotationInstance parameterAnnotationInstance : parameterAnnotations ) {
        typeParameters.put(
            JandexHelper.getValue( parameterAnnotationInstance, "name", String.class ),
            JandexHelper.getValue( parameterAnnotationInstance, "value", String.class )
        );
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    AnnotationInstance notFoundAnnotation = JandexHelper.getSingleAnnotation(
        annotations(),
        HibernateDotNames.NOT_FOUND
    );
    if ( notFoundAnnotation != null ) {
      AnnotationValue actionValue = notFoundAnnotation.value( "action" );
      if ( actionValue != null ) {
        action = Enum.valueOf( NotFoundAction.class, actionValue.asEnum() );
      }
    }

    return NotFoundAction.IGNORE.equals( action );
  }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

  }

  private boolean determineOptionality(AnnotationInstance associationAnnotation) {
    boolean optional = true;

    AnnotationValue optionalValue = associationAnnotation.value( "optional" );
    if ( optionalValue != null ) {
      optional = optionalValue.asBoolean();
    }

    return optional;
  }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    return optional;
  }

  private boolean determineOrphanRemoval(AnnotationInstance associationAnnotation) {
    boolean orphanRemoval = false;
    AnnotationValue orphanRemovalValue = associationAnnotation.value( "orphanRemoval" );
    if ( orphanRemovalValue != null ) {
      orphanRemoval = orphanRemovalValue.asBoolean();
    }
    return orphanRemoval;
  }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    return orphanRemoval;
  }

  private boolean determineFetchType(AnnotationInstance associationAnnotation) {
    boolean lazy = false;
    AnnotationValue fetchValue = associationAnnotation.value( "fetch" );
    if ( fetchValue != null ) {
      FetchType fetchType = Enum.valueOf( FetchType.class, fetchValue.asEnum() );
      if ( FetchType.LAZY.equals( fetchType ) ) {
        lazy = true;
      }
    }
    return lazy;
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    );
    if ( targetAnnotation != null ) {
      targetTypeName = targetAnnotation.value().asClass().name().toString();
    }

    AnnotationValue targetEntityValue = associationAnnotation.value( "targetEntity" );
    if ( targetEntityValue != null ) {
      targetTypeName = targetEntityValue.asClass().name().toString();
    }

    return targetTypeName;
  }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    return targetTypeName;
  }

  private String determineMappedByAttributeName(AnnotationInstance associationAnnotation) {
    String mappedBy = null;
    AnnotationValue mappedByAnnotationValue = associationAnnotation.value( "mappedBy" );
    if ( mappedByAnnotationValue != null ) {
      mappedBy = mappedByAnnotationValue.asString();
    }

    return mappedBy;
  }
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

    return mappedBy;
  }

  private Set<CascadeType> determineCascadeTypes(AnnotationInstance associationAnnotation) {
    Set<CascadeType> cascadeTypes = new HashSet<CascadeType>();
    AnnotationValue cascadeValue = associationAnnotation.value( "cascade" );
    if ( cascadeValue != null ) {
      String[] cascades = cascadeValue.asEnumArray();
      for ( String s : cascades ) {
        cascadeTypes.add( Enum.valueOf( CascadeType.class, s ) );
      }
    }
    return cascadeTypes;
View Full Code Here

Examples of org.jboss.jandex.AnnotationValue

                continue;
            }
            final String beanClassName = classInfo.name().toString();

            // Get the managed bean name from the annotation
            final AnnotationValue nameValue = instance.value();
            final String beanName = nameValue == null || nameValue.asString().isEmpty() ? beanClassName : nameValue.asString();
            final ComponentDescription componentDescription = new ComponentDescription(beanName, beanClassName, moduleDescription, deploymentUnit.getServiceName());

            // Add the view
            ViewDescription viewDescription = new ViewDescription(componentDescription, beanClassName);
            viewDescription.getConfigurators().addFirst(new ViewConfigurator() {
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.