고급 사용자 정의 > Windchill 어댑터 > Windchill Adapter Webject Library > Query Webjects > Query-Objects
  
Query-Objects
The Query-Objects webject fetches or queries for Windchill objects. Objects can be explicitly retrieved by specifying the OBJECT_REF parameter and specifying a list of attributes to retrieve on the ATTRIBUTE parameter.
You can search for objects by specifying the type of object on the TYPE parameter, one or more search criteria on the WHERE parameter (to restrict the search), and which attributes to return in the results on the ATTRIBUTE parameter.
For more information on the use of the WHERE parameter see, Specifying the TYPE and WHERE Parameters.
Syntax
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in" />
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PAGE_COUNT" data="pageCount"/>
<ie:param name="PAGE_OFFSET" data="pageOffset"/>
<ie:param name="PAGING_SESSION_ID" data="pagingSessionId"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="PURGE_DEFAULT" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="SORTBY" data="sortBy"/>
<ie:param name="SORTED" data="sorted"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>
Parameters
Required
Interdependent
Optional
INSTANCE
AUTHORIZATION
ACCEPT_LANGUAGE
CASE_IGNORE
ATTRIBUTE
CONTAINER_REF
CONNECTION_ATTEMPTS
DBUSER
CONNECTION_ATTEMPT_INTERVAL
DESCRIPTOR
FORMAT
GROUP_FILTER
GROUP_IN
INCLUDE_ARGS
GROUP_OUT
INCLUDE_CONSTRAINTS
PAGE_OFFSET
INCLUDE_DESCRIPTORS
PAGING_SESSION_ID
NEXT_OP
PURGE_DEFAULT
OBJECT_REF
REFERENCE_DELIMITER
PAGE_COUNT
REFERENCE_OUTPUT_DELIMITER
PASSWD
SESSION_ID
REFERENCE_EXCEPTIONS
SORTBY
TYPE
SORTED
WHERE
UNFORMATTED
WHERE_CASE_SENSITIVITY
* 
If a parameter is listed in the table but is not defined below, then it has a common parameter definition. For descriptions of those parameters, see Common Webject Parameters section in Adapter Webjects Overview.
CASE_IGNORE
Determines whether or not sorting should be case sensitive.
CONTAINER_REF
A Windchill context to apply the webject against. This parameter accepts the following types of input:
The UFID of a Windchill context. Multiple UFIDs can be specified for this parameter.
MEMBERSHIP—The query finds only those contexts of which the user is a member.
GROUP_IN
The name of an input group containing one UFID per element (OBID attribute). This parameter is optional.
GROUP_OUT
The name of the output group containing the results. If this parameter is omitted, then the name of the output group is constructed by appending the string “-Output” to the webject name. This parameter is optional.
OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If WHERE is not specified, then OBJECT_REF must be specified.
PAGE_COUNT
Specifies how many objects to return per page in a paged query. Specifying PAGE_COUNT without a PAGING_SESSION_ID establishes a new paging session. Subsequent pages in a paging session can be retrieved by specifying PAGING_SESSION_ID, PAGE_COUNT, and PAGE_OFFSET.
SORTED and SORTBY can only be used within the context of a paged query; thus, they are ignored unless PAGE_COUNT is also specified.
PAGE_OFFSET
Specifies from where in the paging session to get the next set of results. This parameter is optional.
PAGING_SESSION_ID
The unique identifier for the current paging session. The value and the size of the complete result for this parameter can be retrieved from metadata on the GROUP_OUT parameter.
The metadata keys are com.ptc.windchill.pagingSession.id and com.ptc.windchill.pagingSession.size.
If this parameter is present, then the next page of results is fetched from the paging session. Otherwise, a new query is performed. This parameter is optional.
PURGE_DEFAULT
Specifies whether to purge the suggested values from the return group. Accepted values are TRUE or FALSE. The default value for this parameter is FALSE. If the parameter is set to TRUE, it purges the suggested values from the return group. This parameter is optional.
SORTBY
Specifies a set of attributes whose sorting orders are specified by the SORTED parameter to be sorted by and returned by the query.
Multiple values can be specified for this parameter. If multiple values are specified, then the first value is the primary sort attribute, the second value is the secondary sort attribute, and so on.
When multiple values are involved, if the list of SORTED parameters is shorter than the list of SORTBY parameters, then the last SORTED is used for the difference.
For example:
SORTBY=a SORTED=ASC
SORTBY=b SORTED=DESC
SORTBY=c
SORTBY=d
Both c and d would use descending order. If you do not specify SORTED, then all SORTBY values use ascending as it is the default value. This parameter is optional.
SORTED
Specifies whether the current attribute to sort by should be sorted as descending (DESC) or ascending (ASC). Multiple values can be specified for this parameter. The default value is ASC. This parameter is optional.
SORTED only produces sorted output if the SORTBY parameter is specified.
TYPE
The Windchill object type name. If WHERE is specified, TYPE must also be specified.
TYPE is ignored unless WHERE is specified or if PAGING_SESSION_ID and ATTRIBUTE are specified together. When fetching subsequent pages from paged query results and specifying the ATTRIBUTE parameter, the TYPE parameter is necessary to properly discover the context of the correct underlying attributes to return.
WHERE
A query expression identifying the objects to be queried. For more information, see Specifying the TYPE and WHERE Parameters.
Either the OBJECT_REF parameter or TYPE and WHERE are required.