com.ibm.task.api
Class QueryHelper
- java.lang.Object
-
- com.ibm.task.api.QueryHelper
-
public class QueryHelper extends java.lang.Object
Helper class to support native SQL requests against the ProcessChoreographer database. This class provides methods that help to build native SQL select statements and to understand the results of the query.- Since:
- 6.1.2
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
-
Method Summary
Methods Modifier and Type Method and Description static java.lang.String
convertGroupIfNeeded(java.lang.String group, int direction, java.util.Locale locale)
Converts the specified group name to lower or upper case or leaves it unchanged depending on the direction and locale values.static java.util.List
convertGroupsIfNeeded(java.util.List groups, int direction, java.util.Locale locale)
Converts the specified group names to lower or upper case or leaves them unchanged depending on the direction and locale values.static java.lang.String
convertUserIfNeeded(java.lang.String user, int direction, java.util.Locale locale)
Converts the specified user ID to lower or upper case or leaves it unchanged depending on the direction and locale values.static java.util.List
convertUsersIfNeeded(java.util.List users, int direction, java.util.Locale locale)
Converts the specified user IDs to lower or upper case or leaves them unchanged depending on the direction and locale values.static OID
toOID(byte[] id)
Creates an OID object from its byte array representation.static OID
toOID(java.lang.String id)
Creates an OID object from its string representation.
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
toOID
public static final OID toOID(java.lang.String id) throws IdWrongFormatException
Creates an OID object from its string representation.- Parameters:
id
- The string representation of an object ID.- Returns:
- An OID object such as a PIID, AIID, or TKIID.
- Throws:
IdWrongFormatException
- Thrown when the passed byte array is null or not a valid string representation of an object ID.
-
toOID
public static final OID toOID(byte[] id) throws IdWrongFormatException
Creates an OID object from its byte array representation. To create a byte array out of an OID, use the OID.toByteArray method.- Parameters:
id
- The byte array representation of an object ID.- Returns:
- An OID object such as a PIID, AIID, or TKIID.
- Throws:
IdWrongFormatException
- Thrown when the passed byte array is null or not a valid byte array representation of an object ID.
-
convertUserIfNeeded
public static final java.lang.String convertUserIfNeeded(java.lang.String user, int direction, java.util.Locale locale)
Converts the specified user ID to lower or upper case or leaves it unchanged depending on the direction and locale values.- Parameters:
user
- The user ID that is to be converted.direction
- An indication to state how the user ID is to be converted - seeHtmConfiguration.CASE_CONVERSION_LOWER etc
for valid values.locale
- The locale to be used for the conversion.- Returns:
- The converted user ID.
- Since:
- 7.5.1
-
convertUsersIfNeeded
public static final java.util.List convertUsersIfNeeded(java.util.List users, int direction, java.util.Locale locale)
Converts the specified user IDs to lower or upper case or leaves them unchanged depending on the direction and locale values.- Parameters:
users
- The user IDs that are to be converted, that is, a list of strings.direction
- An indication to state how the user IDs are to be converted - seeHtmConfiguration.CASE_CONVERSION_LOWER etc
for valid values.locale
- The locale to be used for the conversion.- Returns:
- The converted user IDs, that is, a list of strings.
- Since:
- 7.5.1
-
convertGroupIfNeeded
public static final java.lang.String convertGroupIfNeeded(java.lang.String group, int direction, java.util.Locale locale)
Converts the specified group name to lower or upper case or leaves it unchanged depending on the direction and locale values.- Parameters:
group
- The group name that is to be converted.direction
- An indication to state how the group name is to be converted - seeHtmConfiguration.CASE_CONVERSION_LOWER etc
for valid values.locale
- The locale to be used for the conversion.- Returns:
- The converted group name.
- Since:
- 7.5.1
-
convertGroupsIfNeeded
public static final java.util.List convertGroupsIfNeeded(java.util.List groups, int direction, java.util.Locale locale)
Converts the specified group names to lower or upper case or leaves them unchanged depending on the direction and locale values.- Parameters:
groups
- The group names that are to be converted, that is, a list of strings.direction
- An indication to state how the group names are to be converted - seeHtmConfiguration.CASE_CONVERSION_LOWER etc
for valid values.locale
- The locale to be used for the conversion.- Returns:
- The converted group names, that is, a list of strings.
- Since:
- 7.5.1
-
-