Examples of BooleanAttributeValue


Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

            return new NestedAnnotationAttributeValue(annotationName, value);
        }

        if (expression instanceof BooleanLiteralExpr) {
            final boolean value = ((BooleanLiteralExpr) expression).getValue();
            return new BooleanAttributeValue(annotationName, value);
        }

        if (expression instanceof CharLiteralExpr) {
            final String value = ((CharLiteralExpr) expression).getValue();
            Validate.isTrue(
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

            if (columnBuilder != null) {
                columnBuilder.addBooleanAttribute("unique", true);
            }
            else {
                final List<AnnotationAttributeValue<?>> attrs = new ArrayList<AnnotationAttributeValue<?>>();
                attrs.add(new BooleanAttributeValue(
                        new JavaSymbolName("unique"), true));
                columnBuilder = new AnnotationMetadataBuilder(COLUMN, attrs);
            }
        }
        if (value != null) {
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

        final List<AnnotationAttributeValue<?>> attrs = new ArrayList<AnnotationAttributeValue<?>>();
        attrs.add(new StringAttributeValue(new JavaSymbolName("contentType"),
                contentType.getContentType()));

        if (autoUpload) {
            attrs.add(new BooleanAttributeValue(
                    new JavaSymbolName("autoUpload"), autoUpload));
        }

        annotations
                .add(new AnnotationMetadataBuilder(ROO_UPLOADED_FILE, attrs));
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final List<AnnotationAttributeValue<?>> config = new ArrayList<AnnotationAttributeValue<?>>();
        config.add(new ClassAttributeValue(new JavaSymbolName("entity"), entity));
        if (!transactional) {
            config.add(new BooleanAttributeValue(new JavaSymbolName(
                    "transactional"), false));
        }
        annotations.add(new AnnotationMetadataBuilder(ROO_INTEGRATION_TEST,
                config));
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

            return new NestedAnnotationAttributeValue(annotationName, value);
        }

        if (expression instanceof BooleanLiteralExpr) {
            final boolean value = ((BooleanLiteralExpr) expression).getValue();
            return new BooleanAttributeValue(annotationName, value);
        }

        if (expression instanceof CharLiteralExpr) {
            final String value = ((CharLiteralExpr) expression).getValue();
            Validate.isTrue(value.length() == 1,
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

            attributes.add(new StringAttributeValue(
                    new JavaSymbolName("value"), uncapitalize(fieldName
                            .getSymbolName())));
            if (field.getFieldType().equals(JavaType.BOOLEAN_PRIMITIVE)
                    || field.getFieldType().equals(JavaType.BOOLEAN_OBJECT)) {
                attributes.add(new BooleanAttributeValue(new JavaSymbolName(
                        "required"), false));
            }
            final AnnotationMetadataBuilder requestParamAnnotation = new AnnotationMetadataBuilder(
                    REQUEST_PARAM, attributes);
            annotations.add(requestParamAnnotation.build());
            if (field.getFieldType().equals(DATE)
                    || field.getFieldType().equals(CALENDAR)) {
                dateFieldPresent = true;
                final AnnotationMetadata annotation = MemberFindingUtils
                        .getAnnotationOfType(field.getAnnotations(),
                                DATE_TIME_FORMAT);
                if (annotation != null) {
                    getShortName(DATE_TIME_FORMAT);
                    annotations.add(annotation);
                }
            }
            parameterNames.add(fieldName);
            parameterTypes.add(new AnnotatedJavaType(field.getFieldType(),
                    annotations));

            if (field.getFieldType().equals(JavaType.BOOLEAN_OBJECT)) {
                methodParams.append(fieldName + " == null ? Boolean.FALSE : "
                        + fieldName + ", ");
            }
            else {
                methodParams.append(fieldName + ", ");
            }
        }

        if (methodParams.length() > 0) {
            methodParams.delete(methodParams.length() - 2,
                    methodParams.length());
        }
       
        final List<AnnotationAttributeValue<?>> firstResultAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        firstResultAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "value"), "page"));
        firstResultAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
                "required"), false));
        final AnnotationMetadataBuilder firstResultAnnotation = new AnnotationMetadataBuilder(
                REQUEST_PARAM, firstResultAttributes);

        final List<AnnotationAttributeValue<?>> maxResultsAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        maxResultsAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "value"), "size"));
        maxResultsAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
                "required"), false));
        final AnnotationMetadataBuilder maxResultAnnotation = new AnnotationMetadataBuilder(
                REQUEST_PARAM, maxResultsAttributes);
       
        final List<AnnotationAttributeValue<?>> sortFieldNameAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        sortFieldNameAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "value"), "sortFieldName"));
        sortFieldNameAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
                "required"), false));
        final AnnotationMetadataBuilder sortFieldNameAnnotation = new AnnotationMetadataBuilder(
                REQUEST_PARAM, sortFieldNameAttributes);
       
        final List<AnnotationAttributeValue<?>> sortOrderAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        sortOrderAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "value"), "sortOrder"));
        sortOrderAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
                "required"), false));
        final AnnotationMetadataBuilder sortOrderAnnotation = new AnnotationMetadataBuilder(
                REQUEST_PARAM, sortOrderAttributes);
       
       
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

        final List<AnnotationAttributeValue<?>> rooWebScaffoldAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        rooWebScaffoldAttributes.add(new StringAttributeValue(pathName, path));
        rooWebScaffoldAttributes.add(new ClassAttributeValue(
                new JavaSymbolName("formBackingObject"), entity));
        for (final String operation : disallowedOperations) {
            rooWebScaffoldAttributes.add(new BooleanAttributeValue(
                    new JavaSymbolName(operation), false));
        }
        return new AnnotationMetadataBuilder(ROO_WEB_SCAFFOLD,
                rooWebScaffoldAttributes);
    }
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

        PATH_VARIABLE, attributes);

    final List<AnnotationAttributeValue<?>> firstResultAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    firstResultAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "page"));
    firstResultAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder firstResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, firstResultAttributes);

    final List<AnnotationAttributeValue<?>> maxResultsAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    maxResultsAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "size"));
    maxResultsAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder maxResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, maxResultsAttributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays.asList(
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

    }

    final List<AnnotationAttributeValue<?>> firstResultAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    firstResultAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "page"));
    firstResultAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder firstResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, firstResultAttributes);

    final List<AnnotationAttributeValue<?>> maxResultsAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    maxResultsAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "size"));
    maxResultsAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder maxResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, maxResultsAttributes);

    final List<AnnotationAttributeValue<?>> sortFieldNameAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    sortFieldNameAttributes.add(new StringAttributeValue(
        new JavaSymbolName("value"), "sortFieldName"));
    sortFieldNameAttributes.add(new BooleanAttributeValue(
        new JavaSymbolName("required"), false));
    final AnnotationMetadataBuilder sortFieldNameAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, sortFieldNameAttributes);

    final List<AnnotationAttributeValue<?>> sortOrderAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    sortOrderAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "sortOrder"));
    sortOrderAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder sortOrderAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, sortOrderAttributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.BooleanAttributeValue

    private AnnotationMetadata getRequestParamAnnotation(
            final String paramName, final boolean required) {
        final List<AnnotationAttributeValue<?>> attributeValue = new ArrayList<AnnotationAttributeValue<?>>();
        if (!required) {
            attributeValue.add(new BooleanAttributeValue(new JavaSymbolName(
                    "required"), false));
        }
        attributeValue.add(new StringAttributeValue(
                new JavaSymbolName("value"), paramName));
        return new AnnotationMetadataBuilder(REQUEST_PARAM, attributeValue)
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.