Package com.ptc.core.query.report.common
Class ReportAttributeHelper
java.lang.Object
com.ptc.core.query.report.common.ReportAttributeHelper
This class provides helper methods for calculating attribute values needed
by report queries.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectThis method computes and returns the value of the specified Server Calculated Attribute (SCA) for the specified Persistable object.static Mapcalculate(WTCollection a_collection, String a_serverCalculatedAttributeName) This method computes and returns the values of the specified Server Calculated Attribute (SCA) for the specified Persistable collection.static Map<AttributeTypeIdentifier,Map<ObjectIdentifier, Object>> calculateAttributes(WTCollection a_collection, Set<AttributeTypeIdentifier> a_attributeTypeIds) This method computes and returns the values of the specified attribute for the Persistable collection.static ObjectconcatenateGlobalAttributes(String a_typeName, long a_objectId, String a_globalAttributeName, String a_seperator) This method retrieves and concatenates multiple values as a single display string for the specified global attribute of the specified Persistable object.static StringThis method finds a single value for the specified key filter from the specified map.
-
Method Details
-
filterMap
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 pairsa_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 attributea_objectId- id the object containing the global attributea_globalAttributeName- name of the global attributea_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 SCAa_objectId- id the object containing the SCAa_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 SCAa_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, calculateAttributesObject>> (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 SCAa_attributeTypeId- attribute to calculate- Returns:
- Map of ObjectIdentifier to the associated computed value
- Throws:
WTException
-