CATPLMIntegrationUse CATAdpPLMQueryServices

Usage: you must use this class as is. You should never derive it.


public class CATAdpPLMQueryServices

Class to manage queries on PLM component in database.

Role: Provides all basic functions to query PLM data.


Method Index


o GetElementByIdentificationSet(CATIType*,CATAdpIdentificationSet&,CATIAdpPLMIdentificator*&)
o GetElementByUniqueKey(CATUnicodeString&,CATIAdpPLMIdentificator*&,CATIAdpPLMErrorReviewer*)
o GetElementsByUniqueKey(CATAdpPLMComponentUniqueKey&,CATListPtrCATIAdpPLMIdentificator&,CATIAdpPLMErrorReviewer*)
Searches in the Database the Components which correspond to the given Unique Key.
o GetElementsFromAttributes(CATIType*,CATAdpAttributeSet&,CATLISTP(CATAdpQueryResult)&)
Retrieves in the current repository the objects corresponding to a simple set of string attributes.
o GetRepresentationsFromReference(CATBaseUnknown*,CATListPtrCATIAdpPLMIdentificator&)
Retrieves all the representation references from a PLM reference object.
o GetUniqueKey(CATIAdpPLMIdentificator*,CATUnicodeString&,CATIAdpPLMErrorReviewer*)
o GetUniqueKey(CATIAdpPLMIdentificator*,CATAdpPLMComponentUniqueKey&,CATIAdpPLMErrorReviewer*,CATUnicodeString*)
Search the Unique Key of a Component.

Methods


o GetElementByIdentificationSet
public static GetElementByIdentificationSet( iType,
const iIdentifyingSet,
oComponentIdentifier)
Deprecated:
V6R215 Use or CATAdpPLMQueryServices#GetElementsByUniqueKey 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. It must be used to retrieve element created on V1 typing. Used to retrieve element created with new typing.
  • 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.
  • 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 GetElementByUniqueKey
public static GetElementByUniqueKey( const iUniqueKey,
oComponentIdentifier,
iopErrorReviewer= NULL)
Deprecated:
V6R214
o GetElementsByUniqueKey
public static GetElementsByUniqueKey( const iUniqueKey,
oComponentsIdentifiers,
iopErrorReviewer= NULL)
Searches in the Database the Components which correspond to the given Unique Key.
Role: This method enables to search in the connected Database the Component which has the given Unique Key.
Parameters:
iUniqueKey
[in] The Unique Key of the searched Component
  • E_INVALIDARG return is expected if the given Unique Key is invalid.
oComponentsIdentifiers
[out] The PLM Identificator of the found Component. It is not loaded in the Authoring Session. Use
to load it. Don't forget to call on the returned identifiers when useless.
iErrorReviewer
[in] The ErrorReviewer dedicated to store and handle all PLM Errors raised during the execution of this service.
Returns:
  • S_OK if Components were found in the Database.
  • E_INVALIDARG if the given Unique Key is invalid.
  • E_FAIL if no Component was found given this Unique Key. The blocking error can be accessed through protocol
o GetElementsFromAttributes
public static GetElementsFromAttributes( iType,
const iAttributeSet,
oQueryResults)
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.
Parameters:
iType
[in] The type of the object to be retrieved.
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 GetRepresentationsFromReference
    public static GetRepresentationsFromReference( iReference,
    oRepresentations)
    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
    o GetUniqueKey
    public static GetUniqueKey( iComponentIdentifier,
    oUniqueKey,
    iopErrorReviewer= NULL)
    Deprecated:
    V6R214
    o GetUniqueKey
    public static GetUniqueKey( iComponentIdentifier,
    oUniqueKey,
    iopErrorReviewer=0,
    iUKId=0 )
    Search the Unique Key of a Component.
    Role: This method enables to search in the connected Database the Unique Key of a given PLM Component. This Unique Key represents an identifier enabling to retrieve the Component from the Database later on.
    Parameters:
    iComponentIdentifier
    [in] The identifier of the object on which user wants to retrieve the Unique Key.
    • E_INVALIDARG is returned if invalid Component is given.
    • E_FAIL is returned if the given Component is not yet supported by this API.
    oUniqueKey
    [out] The Unique Key of the given Component.
    iopErrorReviewer
    [inout] The ErrorReviewer dedicated to store and handle all PLM Errors raised during the execution of this service.
    iUKId
    [in] A Unique Key identifier if available.
    Returns:
    • S_OK if search successfully done. The oUniqueKey is available.
    • E_INVALIDARG if input arguments are invalid.
    • E_FAIL if an error occured. The blocking error can be accessed through protocol.

    This object is included in the file: CATAdpPLMQueryServices.h
    If needed, your Imakefile.mk should include the module: CATPLMIntegrationUse

    Copyright © 1999-2014, Dassault Systèmes. All rights reserved.