Package com.ibatis.common.beans

Examples of com.ibatis.common.beans.Probe


                    if (javaType == null) {
                        javaType = DomTypeMarker.class;
                    }
                    columnValues[i] = getNestedSelectMappingValue(statementScope, rs, mapping, javaType);
                } else {
                    Probe p = ProbeFactory.getProbe(resultClass);
                    Class type = p.getPropertyTypeForSetter(resultClass, mapping.getPropertyName());
                    columnValues[i] = getNestedSelectMappingValue(statementScope, rs, mapping, type);
                }
                foundData = foundData || columnValues[i] != null;
            } else if (mapping.getNestedResultMapName() == null) {
                columnValues[i] = getPrimitiveResultMappingValue(rs, mapping);
View Full Code Here


    private Object prepareDomParameterObject(ResultSet rs, ResultMapping mapping) throws SQLException {
        TypeHandlerFactory typeHandlerFactory = getDelegate().getTypeHandlerFactory();

        Document doc = newDocument("parameter");
        Probe probe = ProbeFactory.getProbe(doc);

        String complexName = mapping.getColumnName();

        TypeHandler stringTypeHandler = typeHandlerFactory.getTypeHandler(String.class);
        if (complexName.indexOf('=') > -1) {
            // old 1.x style multiple params
            StringTokenizer parser = new StringTokenizer(complexName, "{}=, ", false);
            while (parser.hasMoreTokens()) {
                String propName = parser.nextToken();
                String colName = parser.nextToken();
                Object propValue = stringTypeHandler.getResult(rs, colName);
                probe.setObject(doc, propName, propValue.toString());
            }
        } else {
            // single param
            Object propValue = stringTypeHandler.getResult(rs, complexName);
            probe.setObject(doc, "value", propValue.toString());
        }

        return doc;
    }
View Full Code Here

TOP

Related Classes of com.ibatis.common.beans.Probe

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.