@Override
  public void copyProperties(Object source, Object target) {
    try {
      BeanCopy beanCopy = BeanCopy.beans(source, target);

      beanCopy.copy();
    } catch (Exception e) {
      _log.error(e, e);
    }
  }
  @Override
  public void copyProperties(Object source, Object target, String[] ignoreProperties) {

    try {
      BeanCopy beanCopy = BeanCopy.beans(source, target);

      beanCopy.exclude(ignoreProperties);

      beanCopy.copy();
    } catch (Exception e) {
      _log.error(e, e);
    }
  }
  @Override
  public void copyProperties(Object source, Object target, Class<?> editable) {

    try {
      BeanCopy beanCopy = BeanCopy.beans(source, target);

      beanCopy.includeAs(editable);

      beanCopy.copy();
    } catch (Exception e) {
      _log.error(e, e);
    }
  }
예제 #4
0
 /**
  * 更新员工信息
  *
  * @param id
  * @param newObject
  */
 public static MerchantUser update(long id, MerchantUser newObject) {
   MerchantUser merchantUser = MerchantUser.findById(id);
   BeanCopy.beans(newObject, merchantUser).ignoreNulls(true).copy();
   return merchantUser.save();
 }