Package com.alibaba.tamper.core.introspect

Examples of com.alibaba.tamper.core.introspect.GetExecutor


            if (canBatch(beanField.getBehavior()) == false) {
                config.setBatch(false);
                return null;
            }

            GetExecutor get = beanField.getGetExecutor();// 只针对property进行batch优化
            if (get != null && (get instanceof FastPropertyGetExecutor || get instanceof PropertyGetExecutor) == false) {
                config.setBatch(false);
                return null;
            }
View Full Code Here


    private static void doFieldMapping(BeanMappingParam param, BeanMappingField beanField, BatchObjectHolder holder) {
        // 定义valueContext
        ValueProcessContext valueContext = new ValueProcessContext(param, param.getConfig(), beanField, holder,
                                                                   param.getCustomValueContext());
        // 设置getExecutor
        GetExecutor getExecutor = beanField.getGetExecutor();// 优先从beanField里取
        if (getExecutor == null && StringUtils.isNotEmpty(beanField.getSrcField().getName())) {// 如果不为空,可能存在script
            Class locatorClass = beanField.getSrcField().getLocatorClass();// 从locatorClass中获取
            if (locatorClass == null) {
                locatorClass = param.getSrcRef().getClass();
                beanField.getSrcField().setLocatorClass(locatorClass);
View Full Code Here

        // 定义valueContext
        ValueProcessContext valueContext = new ValueProcessContext(param, param.getConfig(), beanField, holder,
                                                                   param.getCustomValueContext());
        // 检查一下targetClass是否有设置,针对bean对象有效
        // 如果目标对象是map,需要客户端强制设定targetClass
        GetExecutor getExecutor = beanField.getGetExecutor();
        if (getExecutor == null && StringUtils.isNotEmpty(beanField.getSrcField().getName())) {// 可能存在为空
            Class locatorClass = beanField.getSrcField().getLocatorClass();// 从locatorClass中获取
            if (locatorClass == null) {
                locatorClass = param.getSrcRef().getClass();
                beanField.getSrcField().setLocatorClass(locatorClass);
View Full Code Here

TOP

Related Classes of com.alibaba.tamper.core.introspect.GetExecutor

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.