Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add custom attributes for "queryForDatapoints()" Method. #2

Open
neerajkumarnj opened this issue Dec 14, 2015 · 0 comments
Open

Comments

@neerajkumarnj
Copy link
Collaborator

TimeseriesFactory has two methods as "queryForLatestDatapoint()" and "queryForDatapoints()".

When I use queryForLatestDatapoint() Method, I'm able to add my custom attributes as give below and get the desired output:

List list = new ArrayList();
        list.add("775");
        Map<String, List<String>> map = new HashMap<String, List<String>>();
        map.put("assetId", list);

        com.ge.predix.solsvc.bootstrap.tbs.dto.datapoints.latest.request.Filters filters = new Filters();
        filters.setAttributes(map);

But, When I use queryForDatapoints() Method, It doesn't allow me to add my custom attributes. Because the "Filters" Class here is taking the attributes using a Class "Attribute". Attribute class takes only a defined attribute named "host". If this "Filters" Class takes a "Map" for setting custom attributes, problem will be solved. find the reference code below,

com.ge.predix.solsvc.bootstrap.tbs.dto.datapoints.request.Filters filters=new com.ge.predix.solsvc.bootstrap.tbs.dto.datapoints.request.Filters();
        List<String> attributeValues=Arrays.asList("775");
        Attribute attribute=new Attribute();
        attribute.setHost(attributeValues);
        filters.setAttributes((Arrays.asList(attribute)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant