Skip navigation
Currently Being Moderated

Execute DQL Query Result

Mar 26, 2010 2:11 AM

The Data Type for DQL Query result is List. What is the Sub-Type to be used?

When i use sub type as string it returns only the first record?

How do i retrieve the other records which are being returned by the query?

 

Thanks.

 
Replies
  • Currently Being Moderated
    Mar 30, 2010 2:12 AM   in reply to ANURD

     

    DQL query result returns back a List of Map (List<Map>).

     

    Each row in the list i.e. each Map entry designates a row obtained as DQL execution result. And each key-pair in the Map represents the attribute of that item.

     

    e.g. Executing the following query Select title, object_name,r_modify_date  FROM dm_document where FOLDER ('/Test') gives me back the following 3 items (Result Item 1, Result Item 2, and Result Item 3).

     

    Here is what the operation output looks like from an API:-

     

    [

          // Row 1/Result Item 1
           {

                title= Updated_Name678_title,                         // Attribute title of Result Item 1

                object_name=Updated_Name678,                          // Attribute object_name of Result Item 1

                r_modify_date=Mon Nov 24 12:57:37 IST 2008            // Attribute r_modify_date of Result Item 1

          },

     

          // Row 2/Result Item 2

          {     title=,

                object_name=jacorb.jar,

                r_modify_date=Wed Mar 18 15:33:56 IST 2009

          },

     

          // Row 3/Result Item 3

          {

    title=,

    object_name=TestDoc1.txt,

    r_modify_date=Wed Mar 24 20:06:17 IST 2010

    }

    ]

     

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2010 5:18 AM   in reply to ANURD

    Looks like you are using workbench for the operation.

     

    Can you instead try using API invocation instead of workbench. There is a limited support for complex types through workbench and process context and it looks like List<Map> doesn't comes under the supported list. API invocation should however, work perfectly fine in this case.

     
    |
    Mark as:
  • Currently Being Moderated
    May 28, 2010 9:13 AM   in reply to Raghu A

    I've the same issue, here is what I've tested :

    For the result variable I've used :

    - A List<Map> : Same issue : Type conversion failed => (Using Workbench or Using SOAP invocation by SOAPUI)

    - An Object : SOAPUI returns a Map<Object> with only the first record.

     

    Where I'm wrong ?

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2010 11:58 PM   in reply to Jean-François LORMEAU

    Hi Jean,

     

    By SOAP UI you mean SOAP Endpoint invocation? Also, that means you are using client jar adobe-connectorforemcdocumentum-client.jar for the purpose, correct?

     

    An example invocation code looks like:-

    // Obtain Service Client Factory from LiveCycle Server details.
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://lcseever:8080");
    ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP");
    ConnectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");
    ConnectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "username");
    ConnectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");

    ServiceClientFactory serviceClientFactory = ServiceClientFactory.createInstance(ConnectionProps);

    // Create Documentum Client object.
    EMCDocumentumContentRepositoryConnectorServiceClient dctmClient = new EMCDocumentumContentRepositoryConnectorServiceClient(serviceClientFac tory);

    // Create Login Settings Object with Documentum Login details
    LoginSettings loginSettings = new LoginSettings(LoginMode.USER_CREDENTIALS, "dctmUserName", "dctmPassword", null);
                    
    String repositoryName = "DocbaseName";

    // Invoke executeDQLQuery
    List<Map> resultMap = dctmClient.executeDQLQuery(loginSettings, repositoryName, queryString);

     

    If yes, Can you try using EJB Endpoint invocation method instead? For more information on EJB and SOAP invocations in LiveCycle ES2 take a look at:- http://help.adobe.com/en_US/livecycle/9.0/programLC/help/000495.html#1 548279

     
    |
    Mark as:
  • Currently Being Moderated
    May 31, 2010 5:36 AM   in reply to Raghu A

    Thanks for your quick response.

    Your solution is ok, I've created a custom component using the EJB endpoint of the service and it solves my issue, it return a List<Map> ...

     

    Thanks again

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2010 6:06 PM   in reply to ANURD

    thanks for the code

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2011 10:15 AM   in reply to Raghu A

    Hi


    Do you have an idea on what are the information passed in process context.

    let me tell you what I am trying to do. I am invoking a process which contains a retrieve content(documentum) service that uses the process context as login mode. The process context that is used to invoke is made by impersonating (ie using admin user creditential to create a context for another user). Now I am able to invoke the process but I get login exception in documentum service.

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2011 11:57 PM   in reply to Dhanesh S

    Hi Dhanesh,

     

    Can you please start a new thread for the same discussion as both of the issues are no where related. It would be easy to track them later on.

     

    You can start it under the same category i.e. "LiveCycle Connectors for ECM ES"

     

    Thanks and Regards,

    Raghu

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 16, 2011 9:56 PM   in reply to Raghu A

    Hi

     

    Thanks for the reply

    I have created a new thread

     

    Thanks

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points