Class BeanUtils

java.lang.Object
org.deltava.util.BeanUtils

public class BeanUtils extends Object
A utility class to perform java bean operations.
Since:
7.4
Version:
11.1
Author:
Luke
  • Method Details

    • clone

      public static <T extends Serializable> T clone(T obj)
      Deep clones an object by serializing and deserializing it.
      Parameters:
      obj - the object
      Returns:
      a clone of the object
    • getDelta

      public static List<BeanUtils.PropertyChange> getDelta(Object o, Object n, String... ignoredFields)
      Compares two beans and determines what fields have changed.
      Parameters:
      o - the old bean value
      n - the new bean value
      ignoredFields - a list of fields to ignore
      Returns:
      a Collection of PropertyChange beans