Examples of IncorrectReturnTypeException


Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        rootNode.checkType(context); // 检测sql中的参数是否和方法上的参数匹配
        checkCacheBy(rootNode); // 如果使用cache,检测cache参数

        List<ASTIterableParameter> aips = rootNode.getASTIterableParameters();
        if (!aips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (aips.size() == 1) {
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        } else if (int.class.equals(returnType) || long.class.equals(returnType)) { // 更新
            return new UpdateOperator(rootNode, method, sqlType);
        } else if (int[].class.equals(returnType)) { // 批量更新
            return new BatchUpdateOperator(rootNode, method, sqlType);
        } else {
            throw new IncorrectReturnTypeException("if sql don't start with select, " +
                    "update return type expected int, " +
                    "batch update return type expected int[], " +
                    "but " + method.getReturnType());
        }
    }
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        Class<?> mappedClass = typeToken.getMappedClass();
        rowMapper = getRowMapper(mappedClass);

        List<ASTIterableParameter> ips = rootNode.getIterableParameters();
        if (!ips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (ips.size() == 1) {
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        } else if (int.class.equals(method.getReturnType())) {
            return UpdateOperator.create(rootNode, method, sqlType);
        } else if (int[].class.equals(method.getReturnType())) {
            return BatchUpdateOperator.create(rootNode, method, sqlType);
        } else {
            throw new IncorrectReturnTypeException("if sql don't start with select, " +
                    "update return type expected int, " +
                    "batch update return type expected int[], " +
                    "but " + method.getReturnType());
        }
    }
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        rootNode.checkType(context); // 检测sql中的参数是否和方法上的参数匹配
        checkCacheBy(rootNode); // 如果使用cache,检测cache参数

        List<ASTIterableParameter> aips = rootNode.getASTIterableParameters();
        if (!aips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (aips.size() == 1) {
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        } else if (int.class.equals(returnType) || long.class.equals(returnType)) { // 更新
            return new UpdateOperator(rootNode, method, sqlType);
        } else if (int[].class.equals(returnType)) { // 批量更新
            return new BatchUpdateOperator(rootNode, method, sqlType);
        } else {
            throw new IncorrectReturnTypeException("if sql don't start with select, " +
                    "update return type expected int, " +
                    "batch update return type expected int[], " +
                    "but " + method.getReturnType());
        }
    }
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        Class<?> mappedClass = typeToken.getMappedClass();
        rowMapper = getRowMapper(mappedClass);

        List<ASTIterableParameter> ips = rootNode.getIterableParameters();
        if (!ips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (ips.size() == 1) {
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        } else if (int.class.equals(returnType) || long.class.equals(returnType)) { // 更新
            return new UpdateOperator(rootNode, method, sqlType);
        } else if (int[].class.equals(returnType)) { // 批量更新
            return new BatchUpdateOperator(rootNode, method, sqlType);
        } else {
            throw new IncorrectReturnTypeException("if sql don't start with select, " +
                    "update return type expected int, " +
                    "batch update return type expected int[], " +
                    "but " + method.getReturnType());
        }
    }
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        Class<?> mappedClass = typeToken.getMappedClass();
        rowMapper = getRowMapper(mappedClass);

        List<ASTIterableParameter> ips = rootNode.getIterableParameters();
        if (!ips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (ips.size() == 1) {
View Full Code Here

Examples of cc.concurrent.mango.exception.IncorrectReturnTypeException

        Class<?> mappedClass = typeToken.getMappedClass();
        rowMapper = getRowMapper(mappedClass);

        List<ASTIterableParameter> ips = rootNode.getIterableParameters();
        if (!ips.isEmpty() && !isForList && !isForSet && !isForArray) {
            throw new IncorrectReturnTypeException("if sql has in clause, return type " +
                    "expected array or implementations of java.util.List or implementations of java.util.Set " +
                    "but " + method.getGenericReturnType()); // sql中使用了in查询,返回参数必须可迭代
        }
        if (isUseCache()) {
            if (ips.size() == 1) {
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.