CATPLMIntegrationAccess CATAdpQueryServices
Usage: you must use this class as is. You should never derive it.
public class CATAdpQueryServices
Class to manage queries on PLM component in database.
Role: Provides all basic functions to query PLM data.
Method Index
- o
GetElementByIdentificationSet(CATIAdpType*,CATAdpIdentificationSet&,CATIAdpPLMIdentificator*&)
-
- o
GetElementsFromAttributes(CATIAdpType*,CATAdpAttributeSet&,CATLISTP(CATAdpQueryResult)&)
-
- o
GetIdentificationSet(CATIAdpPLMIdentificator*,CATAdpIdentificationSet&,CATIAdpPLMErrorReviewer*)
-
- o
GetRepresentationsFromReference(CATBaseUnknown*,CATListPtrCATIAdpPLMIdentificator&)
-
Methods
o GetElementByIdentificationSet
public static GetElementByIdentificationSet( | | iType, |
| const | iIdentifyingSet, |
| | oComponentIdentifier) |
-
- Deprecated:
- R213 Use
instead
Retrieves in the current repository the object corresponding to the unique identification set provided.
Role: This method retrieves in the current repository, the unique object responding
to the criteria defined by the identification set.
- If no provider is currently connected, the query will result in a E_FAIL return.
- If more than one provider is connected, the query will result in a E_FAIL return.
- The service will always query a distant repository irrespective of the fact that the component
is loaded or not in the current session. Since communication to a distant server (net access) is far
less efficient than querying the local session (local CPU access), a performance degradation is
unavoidable, each time this API is called.
- It is thus strongly recommended not to use this API if the component is loaded in session,
and use it if necessary otherwise.
ERR_04_QUERY
error is available through
if the provided IdentifierSet is not complete.
- Parameters:
-
- iType
- [in] The type of the object to be retrieved.
- This argument can be obtained by using
or
.
- The type must not be an abstract type, this resulting in a
E_INVALIDARG
return. Only customized types are accepted.
- iIdentifyingSet
- [in] The parameters enabling to identify the component in the database.
- oComponentIdentifier
- [out] The PLM identificator corresponding to the retrived object. in the repository. The component is not loaded in memory. Use
to load it.
- Returns:
-
S_OK
if the component was found in the database.
E_FAIL
if the component was not found.
E_INVALIDARG
if the provided iType is invalid or if the provided iIdentifyingSet is not complete.
The blocking error can be accessed through
protocol.
o GetElementsFromAttributes
public static GetElementsFromAttributes( | | iType, |
| const | iAttributeSet, |
| | oQueryResults) |
-
- Deprecated:
- R213 Use
instead
Retrieves in the current repository the objects corresponding to a simple set of string attributes.
Role: This method retrieves in the current repository the objects matching the input defined criterion.
- The input criterion is a set of attributes which objects must match the values (see further on for more accurate description).
- If no provider is currently connected, the query will result in an E_FAIL return.
- If more than one provider is connected, the query will result in an E_FAIL return.
- Parameters:
-
- iType
- [in] The type of the object to be retrieved.
This argument can be obtained by using
or
.
- iAttributeSet
- [in] The attribute set that the searched object should match. It contains the names and values of the
attributes which will be used during the search operation. It must not be empty.
- All attributes are combined through a ‘AND’ condition, thus leading to a search of objects which match all the attributes of the set.
- These attributes should be of only string types.
- Wildcard are supported as attribute values.
The set is invalid if :
- The attribute set is empty.
- Or, one of the attributes available in the set is not defined for such a
in the metadata.
- Or, one of the attributes available in the set is not defined as a string attribute in the metadata.
- oQueryResults
- [out] Returned list of information (
) objects associated with the PLMComponents retrieved.
- The list is emptied by the beginning of the method.
- You must delete the elements of the list when useless.
- These objects are not loaded in a session.
- Objects are identified through
by using the
method.
- The attributes obtained through the
method are the one which were given as input in iAttributeSet with the exact values retrieved from the database.
- Returns:
-
S_OK
if a component was found in the database.
S_FALSE
if no component matching the criterion was found in the database.
E_FAIL
if no component was found. If a blocking error occured, it can be accessed through
method. E_INVALIDARG
if the provided iType or iAttributeSet is invalid.
o GetIdentificationSet
public static GetIdentificationSet( | | iComponentIdentifier, |
| | oIdentifyingSet, |
| | iopErrorReviewer | = NULL ) |
-
- Deprecated:
- V6R215 Use
in any case instead
Searches the attributes corresponding to the unique identification set for a given object.
Role: This method searches in database the key/value attributes which correspond to the unique identification set
of the identified object. It must be used on element created with V1 typing. Used
to retrieve an identifier on a element created with new typing.
ERR_01_QUERY
error is available through
if the provided component has no identification set defined in the metadata. ERR_02_QUERY
error is available through
if the provided component has an identification not available.
- Parameters:
-
- iComponentIdentifier
- [in] The identifier of the object on which user wants to retrieve the identifier set.
It is invalid if the pointer is nul.
- oIdentifyingSet
- [out] The parameters enabling to identify the component in the database.
It is invalid if it is not empty.
- iopErrorReviewer
- [inout] The ErrorReviewer dedicated to store and handle all PLM Errors raised during the execution of this service.
- Returns:
-
S_OK
if search successfully done. The oIdentifyingSet can be empty.
E_INVALIDARG
if input arguments are invalid.
E_FAIL
if an error occured. The blocking error can be accessed through
method.
o GetRepresentationsFromReference
public static GetRepresentationsFromReference( | | iReference, |
| | oRepresentations) |
-
- Deprecated:
- R213 Use
instead
Retrieves all the representation references from a PLM reference object.
Role: This method retrieves PLM identicators of all representations associated to a PLMCoreReference object.
Lists should be empty when calling this method otherwise this method returns E_INVALIDARG.
- Parameters:
-
- iReference
- [in] The reference object on which user wants to retrieve all representations.
- oRepresentations
- [out] The list of representations of the reference, all elements of this list should be released.
- Returns:
-
- S_OK: Search successfully done.
- E_INVALIDARG: if input arguments are not corrects (NULL or not Empty List or not a CoreReference)
- E_FAIL: Error during query
This object is included in the file: CATAdpQueryServices.h
If needed, your Imakefile.mk should include the module: CATPLMIntegrationAccess
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.