Hi Punnadi,

Option 1 will only retrieve the artifacts according to the criteria of the
given attribute key-value pair. Option 2 can do custom filtering as well
and its implementation underneath will query all artifacts of the given
type first (calling getAllGovernanceArtifacts() ) and then do the
filtering. This could be the reason why you are getting the exception in
second method.

Thanks!
Isuruwan

On Tue, Mar 17, 2015 at 10:23 AM, Punnadi Gunarathna <[email protected]>
wrote:

>
> Hi All,
>
> I am working with GenericArtifactManager and just wanted to know the
> difference between these two implementations:
>
>
> 1. Passing an attribute map to findGenericArtifacts method
> 2. Passing GenericArtifactFilter instance to findGenericArtifacts method
>
> Because in my case, when one of the saved artifact is corrupted, 1 would
> return correct artifact objects of rest of the artifacts saved in Greg
> where as 2 would throw an exception.
>
> --
> Thanks and Regards,
>
> Punnadi Gunarathna
> Senior Software Engineer,
> WSO2, Inc.; http://wso2.com <http://wso2>
> Blog: http://hi-my-world.blogspot.com/
> Tel : 94 11 214 5345
> Fax :94 11 2145300
>
>
>
>  <http://lalajisureshika.blogspot.com/>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Isuruwan Herath
Technical Lead

Contact: +94 776 273 296
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to