cancel
Showing results for 
Search instead for 
Did you mean: 

queryAssociated

itayh
Champ in-the-making
Champ in-the-making
Hi,

I am using queryAssociated in my web service client jar.
I define:
association = new Association( Constants.createQNameString( "custom.model", "Thumbnail"), "target"); 

and than i run
        QueryResult result = AdministratorThread.repositoryService.queryAssociated( reference, association);

In the response I get also other associations that I have define for my reference. Is it OK?
1 REPLY 1

itayh
Champ in-the-making
Champ in-the-making
Hi,

I looked at AssociatedQuerySession class and saw this code in getNextResultsBatch function:

            if (association != null)
            {
                assocs = nodeService.getTargetAssocs(nodeRef, RegexQNamePattern.MATCH_ALL);
            }
            else
            {
                QNamePattern name = RegexQNamePattern.MATCH_ALL;
                String assocType = association.getAssociationType();
                if (assocType != null)
                {
                    name = QName.createQName(assocType);
                }
                if ("source".equals(association.getDirection()) == true)
                {
                    assocs = nodeService.getSourceAssocs(nodeRef, name);
                }
                else
                {
                    assocs = nodeService.getTargetAssocs(nodeRef, name);
                }
            }

so if association is != null we fetch everything? its look like the terms in the if condition should be change
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.