Class ValueHelper

java.lang.Object
com.polarion.platform.persistence.spi.ValueHelper

public class ValueHelper extends Object
FOR INTERNAL USE ONLY!
Author:
dobisekm
  • Method Details

    • wrap

      public static Object wrap(IPObject pobject, String key, IType targetType, Object value)
      Wraps the low-level value from data object into the high-level value returned by IPObject
      Parameters:
      pobject - (not null)
      key - name of pobject's field with which the value is associated (to guard against infinite loops; can be null)
      targetType -
      value -
      Returns:
      the high-level value
      Since:
      3.1.1
    • wrapCustomField

      public static Object wrapCustomField(IPObject pobject, String key, IType targetType, Object value)
      Wraps the low-level value of CUSTOM FIELD from data object into the high-level value returned by IPObject
      Parameters:
      pobject - (not null)
      key - name of pobject's field with which the value is associated (to guard against infinite loops; can be null)
      targetType -
      value -
      Returns:
      the high-level value
      Since:
      3.1.1
    • unwrap

      @Nullable public static Object unwrap(@NotNull IType sourceType, @Nullable Object value)
      Unwraps the high-level value found in IPObject into the low-level value to be set into the data object.
      Parameters:
      sourceType -
      value -
      Returns:
      the low-level value
    • unwrapCustomField

      @Nullable public static Object unwrapCustomField(@NotNull IType sourceType, @Nullable Object value)
      Unwraps the high-level value found in IPObject CUSTOM FIELD into the low-level vlaue to be set into the data object.
      Parameters:
      sourceType -
      value -
      Returns:
      the low-level value