Examples of strategy()


Examples of com.director.core.annotation.DirectReturn.strategy()

   private void extractStrategy() {
      Annotation[] annotations = this.method.getDeclaredAnnotations();
      for(Annotation annotation : annotations) {
         if (annotation.annotationType().isAnnotationPresent(DirectReturn.class)){
            DirectReturn directReturn = annotation.annotationType().getAnnotation(DirectReturn.class);
            Class<? extends ReturnDataStrategy> strategyClass = directReturn.strategy();
            try {
               this.returnDataStrategy = strategyClass.getConstructor(annotation.annotationType()).newInstance(annotation);
               return;
            } catch(Exception e) {
               throw new DirectException(e);
View Full Code Here

Examples of javax.jdo.annotations.DatastoreIdentity.strategy()

        final Class<?> cls = processClassContext.getCls();
        final DatastoreIdentity annotation = Annotations.getAnnotation(cls, DatastoreIdentity.class);
        if (annotation == null) {
            return;
        }
        IdGeneratorStrategy strategyAttribute = annotation.strategy();
       
        FacetUtil.addFacet(new JdoDatastoreIdentityFacetAnnotation(
                strategyAttribute, processClassContext.getFacetHolder()));
        return;
    }
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

    final boolean isComponent = returnedClass.isAnnotationPresent( Embeddable.class )
        || property.isAnnotationPresent( EmbeddedId.class );

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

        Map<String, IdGenerator> localGenerators = new HashMap<String, IdGenerator>();
        localGenerators.putAll( buildLocalGenerators( property, mappings ) );

        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

      String propertyAccessor = entityBinder.getPropertyAccessor( returnedClass );
      //if ( isComponent && embeddableAnn != null && embeddableAnn.access() == AccessType.FIELD ) propertyAccess = false;

      GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
      String generatorType = generatedValue != null ?
          generatorType( generatedValue.strategy() ) :
          "assigned";
      String generator = generatedValue != null ?
          generatedValue.generator() :
          BinderHelper.ANNOTATION_STRING_DEFAULT;
      if ( isComponent ) generatorType = "assigned"; //a component must not have any generator
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

    final boolean isComponent = returnedClass.isAnnotationPresent( Embeddable.class )
        || property.isAnnotationPresent( EmbeddedId.class );

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

        Map<String, IdGenerator> localGenerators = new HashMap<String, IdGenerator>();
        localGenerators.putAll( buildLocalGenerators( property, mappings ) );

        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

    final boolean isComponent = returnedClass.isAnnotationPresent( Embeddable.class )
        || property.isAnnotationPresent( EmbeddedId.class );

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) generatorType = "assigned"; //a component must not have any generator
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

         //clone classGenerator and override with local values
         Map<String, IdGenerator> localGenerators = new HashMap<String, IdGenerator>();
         localGenerators.putAll( buildLocalGenerators( property, mappings ) );

         GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
         String generatorType = generatedValue != null ? generatorType( generatedValue.strategy(), mappings ) : "assigned";
         String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;
                  
         BinderHelper.makeIdGenerator( (SimpleValue) comp.getProperty(property.getName()).getValue(), generatorType, generator, mappings, localGenerators);
      }
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

    final boolean isComponent = returnedClass.isAnnotationPresent( Embeddable.class )
        || property.isAnnotationPresent( EmbeddedId.class );

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
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.