Functions and Methods for Queries

Functions and methods used to perform queries in the database.

Note: The following functions are KML/Know-how Apps Components specific.

This page discusses:

CreatePLMQuery

Function used to create an object of PLMQuery type to do queries in the database.

Signature

CreatePLMQuery(queryType: String) : PLMQuery

Arguments

Name Input / Output Required? Type Comment
queryType In Yes String Object type your are looking for (VPMReference...)

ReturnType

PLMQuery

When the object is returned, the query is not launched. The object is used to determine the attributes to be filtered then the query is launched.

PLMQuery.RunQuery()

Function used to launch the query. l

Signature

PLMQuery.RunQuery(plmQuery: PLMQuery) : List

Arguments

Name Input / Output Required? Type Comment
plmQuery In Yes PLMQuery Objet returned by CreatePLMQuery.

ReturnType

List

Returns the results list containing objects of PLMQueryResult type. These objects are only identifiers and are not loaded.

PLMQuery.AddCriterion()

Method used to add conditions on to attributes values.

Signature

PLMQuery.AddCriterion(plmQuery: PLMQuery, attributeName: String, 
attributeValue: String) : List

Arguments

Name Input / Output Required? Type Comment
attributeName In Yes String Attribute name.
attributeValue In Yes String Value.

PLMQueryResult.LoadResult()

Function used to load the objects of the list.

Signature

PLMQueryResult.LoadResult(plmQueryResult: PLMQueryResult) : Feature

Arguments

Name Input / Output Required? Type Comment
plmQueryResult In Yes PLMQueryResult Result to be loaded.

ReturnType

Feature

Returns the loaded object.