Class PropertiesUtils

java.lang.Object
org.eclipse.persistence.config.PropertiesUtils

public class PropertiesUtils extends Object
A static utility class that handles parsing a String "key=value,key1=value1...." and calls an appropriate set[key]([value]) method on the provided instance.
  • Constructor Details

    • PropertiesUtils

      public PropertiesUtils()
  • Method Details

    • set

      public static void set(Object instance, String propertyName, String kvs)
      Attempts to parse and then set the provided kvs String into the appropriate set method on the provided instance. Note: Keys and values cannot contain '=' or ','
      Parameters:
      instance - An JavaBean instance
      propertyName - The configuration name that is being set into instance. This is only used for informational purposes.
      kvs - A String of key=value comma delimited ie: k1=v1,k2=v2,...
      Throws:
      ConversionException - if unable to process the provided kvs