Package org.apache.openjpa.lib.util

Examples of org.apache.openjpa.lib.util.ParameterTemplate


        String imports = getImports();
        String[] fieldCode = getFieldCode();
        String constructor = getConstructor();

        // get code template
        _code = new ParameterTemplate();
        String codeStr = getClassCode();
        if (codeStr != null) {
            _code.append(codeStr);
            _code.setParameter("packageDec", packageDec);
            _code.setParameter("imports", imports);
View Full Code Here


        boolean fieldAccess = !usePropertyBasedAccess();
        String custom = getDeclaration(fmd);
        if (decs.length() > 0)
            decs.endl();
        ParameterTemplate templ;
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            decs.append(templ.toString());
        } else {
            if (fieldAccess)
                writeAnnotations(decs, getFieldAnnotations(fmd), 1);
            decs.tab().append("private ").append(fieldType).
                append(paramType).append(" ").append(fieldName).
                append(fieldValue).append(";");
            if (fieldAccess)
                decs.endl();
        }

        custom = getFieldCode(fmd);
        if (code.length() > 0)
            code.afterSection();
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            code.append(templ.toString());
        } else {
            // getter
            if (!fieldAccess)
                writeAnnotations(code, getFieldAnnotations(fmd), 1);
            code.tab().append("public ").append(fieldType).append(paramType).
View Full Code Here

        String imports = getImports();
        String[] fieldCode = getFieldCode();
        String constructor = getConstructor();

        // get code template
        _code = new ParameterTemplate();
        String codeStr = getClassCode();
        if (codeStr != null) {
            _code.append(codeStr);
            _code.setParameter("packageDec", packageDec);
            _code.setParameter("imports", imports);
View Full Code Here

        boolean fieldAccess = !usePropertyBasedAccess();
        String custom = getDeclaration(fmd);
        if (decs.length() > 0)
            decs.endl();
        ParameterTemplate templ;
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            decs.append(templ.toString());
        } else {
            if (fieldAccess)
                writeAnnotations(decs, getFieldAnnotations(fmd), 1);
            decs.tab().append("private ").append(fieldType).
                append(paramType).append(" ").append(fieldName).
                append(fieldValue).append(";");
            if (fieldAccess)
                decs.endl();
        }

        custom = getFieldCode(fmd);
        if (code.length() > 0)
            code.afterSection();
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            code.append(templ.toString());
        } else {
            // getter
            if (!fieldAccess)
                writeAnnotations(code, getFieldAnnotations(fmd), 1);
            code.tab().append("public ").append(fieldType).append(paramType).
View Full Code Here

        String imports = getImports();
        String[] fieldCode = getFieldCode();
        String constructor = getConstructor();

        // get code template
        _code = new ParameterTemplate();
        String codeStr = getClassCode();
        if (codeStr != null) {
            _code.append(codeStr);
            _code.setParameter("packageDec", packageDec);
            _code.setParameter("imports", imports);
View Full Code Here

        boolean fieldAccess = !usePropertyBasedAccess();
        String custom = getDeclaration(fmd);
        if (decs.length() > 0)
            decs.endl();
        ParameterTemplate templ;
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            decs.append(templ.toString());
        } else {
            if (fieldAccess)
                writeAnnotations(decs, getFieldAnnotations(fmd), 1);
            decs.tab().append("private ").append(fieldType).
                append(paramType).append(" ").append(fieldName).
                append(fieldValue).append(";");
            if (fieldAccess)
                decs.endl();
        }

        custom = getFieldCode(fmd);
        if (code.length() > 0)
            code.afterSection();
        if (custom != null) {
            templ = new ParameterTemplate();
            templ.append(custom);
            templ.setParameter("fieldName", fieldName);
            templ.setParameter("capFieldName", capFieldName);
            templ.setParameter("propertyName", propertyName);
            templ.setParameter("fieldType", fieldType);
            templ.setParameter("keyType", keyType);
            templ.setParameter("elementType", elementType);
            templ.setParameter("fieldValue", fieldValue);
            code.append(templ.toString());
        } else {
            // getter
            if (!fieldAccess)
                writeAnnotations(code, getFieldAnnotations(fmd), 1);
            code.tab().append("public ").append(fieldType).append(paramType).
View Full Code Here

TOP

Related Classes of org.apache.openjpa.lib.util.ParameterTemplate

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.