Package com.github.dactiv.orm.core.exception

Examples of com.github.dactiv.orm.core.exception.SecurityCodeNotEqualException


      E e = persistentContext.findOne((ID) id);
      String originalCode = ReflectionUtils.invokeGetterMethod(e, securityCode.value());
      String currentCode = generateSecurityCode(e, securityCode);
     
      if (!StringUtils.equals(originalCode, currentCode)) {
        throw new SecurityCodeNotEqualException("安全码不正确,原始码为:" + originalCode + "当前对象的安全码为:" + currentCode);
      }
     
      ReflectionUtils.invokeSetterMethod(entity, securityCode.value(), currentCode);
    }
   
View Full Code Here


        E e = persistentContext.get((ID) id);
        String originalCode = ReflectionUtils.invokeGetterMethod(e, securityCode.value());
        String currentCode = generateSecurityCode(e, securityCode);
       
        if (!StringUtils.equals(originalCode, currentCode)) {
          throw new SecurityCodeNotEqualException("安全码不正确,原始码为:" + originalCode + "当前对象的安全码为:" + currentCode);
        }
       
        ReflectionUtils.invokeSetterMethod(entity, securityCode.value(), currentCode);
      }
    }
View Full Code Here

TOP

Related Classes of com.github.dactiv.orm.core.exception.SecurityCodeNotEqualException

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.