Package org.springframework.roo.classpath.details

Examples of org.springframework.roo.classpath.details.MethodMetadata


            final JavaType javaType, final MemberDetails memberDetails,
            final String metadataIdentificationString) {
        Validate.notNull(javaType, "Java type required");
        Validate.notNull(memberDetails, "Member details required");

        final MethodMetadata identifierAccessor = persistenceMemberLocator
                .getIdentifierAccessor(javaType);
        final MethodMetadata versionAccessor = persistenceMemberLocator
                .getVersionAccessor(javaType);

        final Map<JavaSymbolName, FieldMetadata> fields = new LinkedHashMap<JavaSymbolName, FieldMetadata>();
        final List<MethodMetadata> methods = memberDetails.getMethods();
View Full Code Here


                .getIdentifierField().getFieldName().getSymbolName())) {
            formUpdate.setAttribute("idField",
                    formBackingTypePersistenceMetadata.getIdentifierField()
                            .getFieldName().getSymbolName());
        }
        final MethodMetadata versionAccessorMethod = formBackingTypePersistenceMetadata
                .getVersionAccessorMethod();
        if (versionAccessorMethod == null) {
            formUpdate.setAttribute("versionField", "none");
        }
        else {
            final String methodName = versionAccessorMethod.getMethodName()
                    .getSymbolName();
            formUpdate.setAttribute("versionField",
                    methodName.substring("get".length()));
        }
View Full Code Here

    private String getRequestMethodCall(
            final ClassOrInterfaceTypeDetails request,
            final MemberTypeAdditions memberTypeAdditions) {
        final String methodName = memberTypeAdditions.getMethodName();
        final MethodMetadata requestMethod = MemberFindingUtils.getMethod(
                request, methodName);
        String requestMethodCall = memberTypeAdditions.getMethodName();
        if (requestMethod != null) {
            if (INSTANCE_REQUEST.getFullyQualifiedTypeName().equals(
                    requestMethod.getReturnType().getFullyQualifiedTypeName())) {
                requestMethodCall = requestMethodCall + "().using";
            }
        }
        return requestMethodCall;
    }
View Full Code Here

      List<JavaType> parameterTypes4Test = new ArrayList<JavaType>(parameterTypes);
      if(!finderName.getSymbolName().startsWith("count") && sorted) {
        parameterTypes4Test.add(STRING);
        parameterTypes4Test.add(STRING);
      }
      final MethodMetadata userMethod = MemberFindingUtils.getDeclaredMethod(governorTypeDetails,
          finderName, parameterTypes4Test);
         if (userMethod != null) {
           return new MethodMetadataBuilder(userMethod);
         }
        
View Full Code Here

                || !jpaActiveRecordMetadata.isValid()) {
            return new FinderMetadata(metadataIdentificationString, aspectName,
                    governorPhysicalTypeMetadata, null,
                    Collections.<JavaSymbolName, QueryHolder> emptyMap());
        }
        final MethodMetadata entityManagerMethod = jpaActiveRecordMetadata
                .getEntityManagerMethod();
        if (entityManagerMethod == null) {
            return null;
        }
View Full Code Here

            if (attribute != null)
                useXmlConfiguration = attribute.getValue();
        }

        final JavaType entity = entityType.getName();
        final MethodMetadata identifierAccessor = persistenceMemberLocator
                .getIdentifierAccessor(entity);
        final MethodMetadata versionAccessor = persistenceMemberLocator
                .getVersionAccessor(entity);
        if (identifierAccessor == null || versionAccessor == null) {
            return null;
        }
View Full Code Here

        return null;
      }
      fieldType = fieldType.getParameters().get(0);
    }

    final MethodMetadata identifierAccessor = persistenceMemberLocator
        .getIdentifierAccessor(fieldType);
    if (identifierAccessor != null) {
      metadataDependencyRegistry.registerDependency(
          identifierAccessor.getDeclaredByMetadataId(),
          metadataIdentificationString);
      return identifierAccessor.getMethodName();
    }

    return null;
  }
View Full Code Here

                            entity, idType, LAYER_POSITION,
                            methodSignature.getValue());
            Validate.notNull(memberTypeAdditions,
                    "No support for %s method for domain type %s", methodId,
                    entity);
            final MethodMetadata requestMethod = getRequestMethod(entity,
                    methodSignature.getKey(), memberTypeAdditions,
                    requestMetadataId);
            requestMethods.put(requestMethod,
                    memberTypeAdditions.getInvokedField());
        }
View Full Code Here

TOP

Related Classes of org.springframework.roo.classpath.details.MethodMetadata

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.