Package org.springframework.roo.classpath.details.annotations

Examples of org.springframework.roo.classpath.details.annotations.AnnotationMetadataBuilder.addStringAttribute()


                Arrays.asList(element));
        // Add @OneToMany annotation
        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final AnnotationMetadataBuilder oneToManyBuilder = new AnnotationMetadataBuilder(
                ONE_TO_MANY);
        oneToManyBuilder.addStringAttribute(MAPPED_BY,
                mappedByFieldName.getSymbolName());
        addCascadeType(oneToManyBuilder, onUpdate, onDelete);
        annotations.add(oneToManyBuilder);

        return new FieldMetadataBuilder(getId(), Modifier.PRIVATE, annotations,
View Full Code Here


            final JavaSymbolName mappedByFieldName,
            final CascadeAction onUpdate, final CascadeAction onDelete) {
        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final AnnotationMetadataBuilder oneToOneBuilder = new AnnotationMetadataBuilder(
                ONE_TO_ONE);
        oneToOneBuilder.addStringAttribute(MAPPED_BY,
                mappedByFieldName.getSymbolName());
        addCascadeType(oneToOneBuilder, onUpdate, onDelete);
        annotations.add(oneToOneBuilder);

        return new FieldMetadataBuilder(getId(), Modifier.PRIVATE, annotations,
View Full Code Here

            final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
            final AnnotationMetadataBuilder annotationBuilder = new AnnotationMetadataBuilder(
                    PERSISTENCE_CONTEXT);
            if (StringUtils.isNotBlank(crudAnnotationValues
                    .getPersistenceUnit())) {
                annotationBuilder.addStringAttribute("unitName",
                        crudAnnotationValues.getPersistenceUnit());
            }
            annotations.add(annotationBuilder);

            return new FieldMetadataBuilder(getId(), Modifier.TRANSIENT,
View Full Code Here

            final boolean isPersistMethod) {
        final AnnotationMetadataBuilder transactionalBuilder = new AnnotationMetadataBuilder(
                TRANSACTIONAL);
        if (StringUtils
                .isNotBlank(crudAnnotationValues.getTransactionManager())) {
            transactionalBuilder.addStringAttribute("value",
                    crudAnnotationValues.getTransactionManager());
        }
        if (isGaeEnabled && isPersistMethod) {
            transactionalBuilder.addEnumAttribute("propagation",
                    new EnumDetails(PROPAGATION, new JavaSymbolName(
View Full Code Here

                                .getDeclaredByMetadataId()));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                locatorPhysicalTypeId);
        final AnnotationMetadataBuilder annotationMetadataBuilder = new AnnotationMetadataBuilder(
                RooJavaType.ROO_GWT_LOCATOR);
        annotationMetadataBuilder.addStringAttribute("value",
                entity.getFullyQualifiedTypeName());

        if (useXmlConfiguration) {
            annotationMetadataBuilder.addBooleanAttribute(
                    "useXmlConfiguration", true);
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.