Package org.springframework.roo.classpath.itd

Examples of org.springframework.roo.classpath.itd.InvocableMemberBodyBuilder.indentRemove()


                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + minValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
        }
        else if (decimalMinAnnotation == null && decimalMaxAnnotation != null) {
            final String maxValue = (String) decimalMaxAnnotation.getAttribute(
                    VALUE).getValue();
View Full Code Here


                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + maxValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
        }
        else if (decimalMinAnnotation != null && decimalMaxAnnotation != null) {
            final String minValue = (String) decimalMinAnnotation.getAttribute(
                    VALUE).getValue();
View Full Code Here

                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + maxValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
        }

        return bodyBuilder.getOutput();
    }
View Full Code Here

            bodyBuilder.indent();
            bodyBuilder.appendFormalLine(fieldName + " = "
                    + maxValue.doubleValue() + suffix + ";");
        }

        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");

        return bodyBuilder.getOutput();
    }
View Full Code Here

            bodyBuilder.appendFormalLine("if (this." + entityManagerFieldName
                    + ".contains(this)) {");
            bodyBuilder.indent();
            bodyBuilder.appendFormalLine("this." + entityManagerFieldName
                    + ".remove(this);");
            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("} else {");
            bodyBuilder.indent();
            bodyBuilder.appendFormalLine(destination.getSimpleTypeName()
                    + " attached = " + destination.getSimpleTypeName() + "."
                    + getFindMethod().getMethodName().getSymbolName()
View Full Code Here

                    + getFindMethod().getMethodName().getSymbolName()
                    + "(this." + identifierField.getFieldName().getSymbolName()
                    + ");");
            bodyBuilder.appendFormalLine("this." + entityManagerFieldName
                    + ".remove(attached);");
            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
        }
        else {
            // Persist
            addTransactionalAnnotation(annotations, true);
View Full Code Here

        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("jpaQuery = jpaQuery + \" ORDER BY \" + sortFieldName;");
        bodyBuilder.appendFormalLine("if (\"ASC\".equalsIgnoreCase(sortOrder) || \"DESC\".equalsIgnoreCase(sortOrder)) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("jpaQuery = jpaQuery + \" \" + sortOrder;");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine("return " + ENTITY_MANAGER_METHOD_NAME
            + "().createQuery(jpaQuery, " + destination.getSimpleTypeName() + ".class" + ").getResultList();");
View Full Code Here

                }
                else {
                    bodyBuilder.appendFormalLine(fieldName + " = " + fieldName
                            + ".substring(0, " + maxValue + ");");
                }
                bodyBuilder.indentRemove();
                bodyBuilder.appendFormalLine("}");
            }
            else if (sizeAnnotation == null && values != null) {
                if (values.containsKey("length")) {
                    final Integer lengthValue = (Integer) values.get("length");
View Full Code Here

        bodyBuilder.appendFormalLine("if (\"ASC\".equalsIgnoreCase(sortOrder) || \"DESC\".equalsIgnoreCase(sortOrder)) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("jpaQuery = jpaQuery + \" \" + sortOrder;");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine("return " + ENTITY_MANAGER_METHOD_NAME
            + "().createQuery(jpaQuery, " + destination.getSimpleTypeName() + ".class" + ").getResultList();");

        final MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(
View Full Code Here

                    else {
                        bodyBuilder.appendFormalLine(fieldName + " = "
                                + fieldName + ".substring(0, " + lengthValue
                                + ");");
                    }
                    bodyBuilder.indentRemove();
                    bodyBuilder.appendFormalLine("}");
                }
            }
        }
        else if (JdkJavaType.isDecimalType(fieldType)) {
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.