Package org.springframework.roo.model

Examples of org.springframework.roo.model.EnumDetails


            JavaSymbolName value = new JavaSymbolName("EAGER");
            if (fetch == Fetch.LAZY) {
                value = new JavaSymbolName("LAZY");
            }
            attributes.add(new EnumAttributeValue(new JavaSymbolName("fetch"),
                    new EnumDetails(FETCH_TYPE, value)));
        }

        switch (cardinality) {
        case ONE_TO_MANY:
            annotations.add(new AnnotationMetadataBuilder(ONE_TO_MANY,
View Full Code Here


        }
        else if (onUpdate == CascadeAction.CASCADE
                && onDelete != CascadeAction.CASCADE) {
            final List<EnumAttributeValue> arrayValues = new ArrayList<EnumAttributeValue>();
            arrayValues.add(new EnumAttributeValue(new JavaSymbolName(
                    attributeName), new EnumDetails(CASCADE_TYPE,
                    new JavaSymbolName("PERSIST"))));
            arrayValues.add(new EnumAttributeValue(new JavaSymbolName(
                    attributeName), new EnumDetails(CASCADE_TYPE,
                    new JavaSymbolName("MERGE"))));
            annotationBuilder
                    .addAttribute(new ArrayAttributeValue<EnumAttributeValue>(
                            new JavaSymbolName(attributeName), arrayValues));
        }
View Full Code Here

        // Add JSR 220 @Temporal annotation to date fields
        if (fieldType.equals(DATE) || fieldType.equals(CALENDAR)) {
            final AnnotationMetadataBuilder temporalBuilder = new AnnotationMetadataBuilder(
                    TEMPORAL);
            temporalBuilder.addEnumAttribute(VALUE, new EnumDetails(
                    TEMPORAL_TYPE, new JavaSymbolName(column.getJdbcType())));
            annotations.add(temporalBuilder);

            final AnnotationMetadataBuilder dateTimeFormatBuilder = new AnnotationMetadataBuilder(
                    DATE_TIME_FORMAT);
View Full Code Here

            transactionalBuilder.addStringAttribute("value",
                    crudAnnotationValues.getTransactionManager());
        }
        if (isGaeEnabled && isPersistMethod) {
            transactionalBuilder.addEnumAttribute("propagation",
                    new EnumDetails(PROPAGATION, new JavaSymbolName(
                            "REQUIRES_NEW")));
        }
        annotations.add(transactionalBuilder);
    }
View Full Code Here

    private MethodMetadataBuilder getHttpPostMethod(
            final String declaredByMetadataId) {
        final List<AnnotationMetadataBuilder> postMethodAnnotations = new ArrayList<AnnotationMetadataBuilder>();
        final List<AnnotationAttributeValue<?>> postMethodAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        postMethodAttributes.add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "POST"))));
        postMethodAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "value"), "{id}"));
        postMethodAnnotations.add(new AnnotationMetadataBuilder(
                REQUEST_MAPPING, postMethodAttributes));
View Full Code Here

        final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("value"), "/jsonArray"));
        requestMappingAttributes.add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "POST"))));
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("headers"), "Accept=application/json"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);
View Full Code Here

            .asList(
        new JavaSymbolName("json"), new JavaSymbolName("uriBuilder"));

        final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        requestMappingAttributes.add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "POST"))));
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("headers"), "Accept=application/json"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);
View Full Code Here

        final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        requestMappingAttributes
                .add(new StringAttributeValue(new JavaSymbolName("value"), "/{"
                        + identifierField.getFieldName().getSymbolName() + "}"));
        requestMappingAttributes.add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "DELETE"))));
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("headers"), "Accept=application/json"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);
View Full Code Here

        requestMappingAttributes
                .add(new StringAttributeValue(new JavaSymbolName("value"), "/{"
                        + identifierField.getFieldName().getSymbolName() + "}"));
        requestMappingAttributes
                .add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "GET"))));
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("headers"), "Accept=application/json"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);
View Full Code Here

        final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("value"), "/jsonArray"));
        requestMappingAttributes.add(new EnumAttributeValue(new JavaSymbolName(
                "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
                "PUT"))));
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("headers"), "Accept=application/json"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);
View Full Code Here

TOP

Related Classes of org.springframework.roo.model.EnumDetails

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.