Predefined persisted queries

WSRR provides a number of predefined persisted queries.

These queries are described in the table following. Those that are GraphQueries have a depth of zero, meaning that relationships will not be set up in the returned objects.

When supplying the modelled attribute name and attribute value, pass in a String array:
String[] params = new String[] { "attribute name", "attribute value"};

Name of Query Description Parameters
getAllWSDLDocuments Returns all instances of WSDLDocument. None
getAllXSDDocuments Returns all instances of XSDDocument. None
getAllPolicyDocuments Returns all instances of PolicyDocument. None
getAllXMLDocuments Returns all instances of XMLDocument. None
getAllServices Returns all instances of WSDLService. None
getAllPorts Returns all instances of WSDLPort. None
getAllBindings Returns all instances of WSDLBinding. None
getAllPortTypes Returns all instances of WSDLPortType. None
getAllOperations Returns all instances of WSDLOperation. None
getAllMessages Returns all instances of WSDLMessage. None
getAllParts Returns all instances of WSDLPart. None
getAllElementDeclarations Returns all instances of ElementDeclaration. None
getAllComplexTypeDefinitions Returns all instances of ComplexTypeDefinition. None
getAllAttributeDeclarations Returns all instances of AttributeDeclaration. None
getWSDLDocument Returns all instances of WSDLDocument that have a specific value for the named attribute.
  1. Modelled attribute name
  2. Attribute value
getXSDDocument Returns all instances of XSDDocument that have a specific value for the named attribute.
  1. Modelled attribute name
  2. Attribute value
getPolicyDocument Returns all instances of PolicyDocument that have a specific value for the named attribute.
  1. Modelled attribute name
  2. Attribute value
getXMLDocument Returns all instances of XMLDocument that have a specific value for the named attribute.
  1. Modelled attribute name
  2. Attribute value
getWSDLDocServices Return instances of WSDLService corresponding to the WSDL services defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocBindings Return instances of WSDLBinding corresponding to the WSDL bindings defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocSOAPBindings Return instances of SOAPBinding associated with the WSDL bindings defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocPorts Return instances of WSDLPort corresponding to the WSDL ports defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocPortTypes Return instances of WSDLPortType corresponding to the WSDL portTypes defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocOperations Return instances of WSDLOperation corresponding to the WSDL operations defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocMessages Return instances of WSDLMessage corresponding to the WSDL messages defined in a specific WSDL document. bsrURI of the WSDL document.
getWSDLDocParts Return instances of WSDLPart corresponding to the WSDL parts defined in a specific WSDL document. bsrURI of the WSDL document.
getXSDElements Return instances of ElementDeclaration corresponding to the global XML Schema elements declared in a specific schema document. bsrURI of the XML Schema document.
getXSDSimpleTypeDefs Return instances of SimpleTypeDefinition corresponding to the global XML Schema simple types defined in a specific schema document. bsrURI of the XML Schema document.
getXSDComplexTypeDefs Return instances of ComplexTypeDefinition corresponding to the global XML Schema complex types defined in a specific schema document. bsrURI of the XML Schema document.
getXSDAttributeDeclarations Return instances of AttributeDeclaration corresponding to the global XML Schema attributes declared in a specific schema document. bsrURI of the XML Schema document.
getWSDLServices Return instances of WSDLService that have a specific value for a specific modelled attribute.
  1. Modelled attribute name
  2. Attribute value
getWSDLPorts Return instances of WSDLPort that have a specific value for a specific modelled attribute.
  1. Modelled attribute name
  2. Attribute value
getWSDLPortTypes Return instances of WSDLPortType that have a specific value for a specific modelled attribute.
  1. Modelled attribute name
  2. Attribute value
getAllGenericObjects Return all instances of GenericObject.  
getUserDefinedRelationshipNames Returns a List of PropertyQueryResult objects that have the relationship names as a user-defined property of the PropertyQueryResult (see following example). none
getGovernanceRecord Returns the GovernanceRecord of a governed object. bsrURI of the object that has been governed.
getAllLogicalElementsForPhysicalDocument Returns all the logical objects that were derived from a physical document loaded into WSRR. bsrURI of the physical document with derived logical objects that are required.
getPolicyAttachmentsForWSDLDocument Returns all policy attachments for a specified WSDL document.

Each policy attachment has a property called appliesToElementIdentifierURI that lists the WSDL identifiers that were used to attach subjects, separated by the tilde character (~).

In addition, each WSDL identifier is returned in a separate property called appliesToElementIdentifierURI.n, where n is an incremental index value starting from 1.

For example, if the appliesToElementIdentifierURI property contains two WSDL identifiers, there are two additional properties called appliesToElementIdentifierURI.1 and appliesToElementIdentifierURI.2.

bsrURI of the WSDL document with policy attachments that are required.
getAllUDPsForBsrURIList Returns the value of each property in a given list, for each object in a given list.
  1. A comma-separated list of bsrURIs
  2. A comma-separated list of property names
For each object specified in the bsrURI list, the value of every property name in the property list is returned in a PropertyQueryResult, containing:

bsrURI name value.

Example - retrieving the relationship names from the List:

// the "client" is an EJB or web service client previously created
List propertyQueryResults =
    client.executeNamedQuery("getUserDefinedRelationshipNames");

// In this case you want to know the value of the property "name"
// and add it to a list 
ArrayList relationshipNames = new ArrayList();
for (int index = 0; index < propertyQueryResults.size(); index++) {
    PropertyQueryResult propertyQueryResult =
        (PropertyQueryResult)propertyQueryResults.get(index);

    relationshipNames.add(BSRSDOHelper.INSTANCE.getPropertyQueryResultValue
                                              (propertyQueryResult,"name"));
}