Class ReportAttributeHelper

java.lang.Object
com.ptc.core.query.report.common.ReportAttributeHelper

public class ReportAttributeHelper extends Object
This class provides helper methods for calculating attribute values needed by report queries.

Supported API: true

Extendable: false
  • Method Details

    • filterMap

      public static String filterMap(Map a_resultMap, String a_keyFilter) throws WTException
      This method finds a single value for the specified key filter from the specified map. If an entry from the map has a key that contains the filter, then the associated value's display string for that entry will be returned.

      Supported API: true
      Parameters:
      a_resultMap - Map of key and value pairs
      a_keyFilter - key to search for in the map
      Returns:
      Display string for the value (if it exists)
      Throws:
      WTException
    • concatenateGlobalAttributes

      public static Object concatenateGlobalAttributes(String a_typeName, long a_objectId, String a_globalAttributeName, String a_seperator) throws WTException
      This method retrieves and concatenates multiple values as a single display string for the specified global attribute of the specified Persistable object. A separator can be specified for building the display string if multiple values exists. If the separate string is null, then a default comma (',') will be used.

      Supported API: true
      Parameters:
      a_typeName - type name for the object containing the global attribute
      a_objectId - id the object containing the global attribute
      a_globalAttributeName - name of the global attribute
      a_separator - string to use for separating any values in the display string
      Returns:
      Display string for the global attribute value
      Throws:
      WTException
    • calculate

      public static Object calculate(String a_typeName, long a_objectId, String a_serverCalculatedAttributeName) throws WTException
      This method computes and returns the value of the specified Server Calculated Attribute (SCA) for the specified Persistable object.

      Supported API: true
      Parameters:
      a_typeName - type name for the object containing the SCA
      a_objectId - id the object containing the SCA
      a_serverCalculatedAttributeName - name of the SCA to calculate
      Returns:
      Object value computed
      Throws:
      WTException
    • calculate

      public static Map calculate(WTCollection a_collection, String a_serverCalculatedAttributeName) throws WTException
      This method computes and returns the values of the specified Server Calculated Attribute (SCA) for the specified Persistable collection.

      Supported API: true
      Parameters:
      a_collection - objects containing the SCA
      a_serverCalculatedAttributeName - name of the SCA to calculate
      Returns:
      Map of ObjectIdentifier to the associated computed value
      Throws:
      WTException
    • calculateAttributes

      public static Map<AttributeTypeIdentifier,Map<ObjectIdentifier,Object>> calculateAttributes(WTCollection a_collection, Set<AttributeTypeIdentifier> a_attributeTypeIds) throws WTException
      This method computes and returns the values of the specified attribute for the Persistable collection.

      Supported API: true
      Parameters:
      a_collection - objects containing the SCA
      a_attributeTypeId - attribute to calculate
      Returns:
      Map of ObjectIdentifier to the associated computed value
      Throws:
      WTException