cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Access a Network from the Java Eclipse SDK

Raccone
10-Marble

Access a Network from the Java Eclipse SDK

Dear devs,

 

I am struggling finding the way to access a Network using the Java Eclipse SDK: I have a service with a Thing, which is correctly assigned by the context, and I can access the list of the Networks in which the Thing belongs using:

 

 

thingNetworks = apiWrapper.GetNetworks();

 

 

 

Which returns an InfoTable with name and description of the network. I don't understand how can I use it to access the corresponding Network in the SDK, since based on the docs it only has an empty constructor associated to it.  

 

Thanks and best regards!

1 ACCEPTED SOLUTION

Accepted Solutions
Raccone
10-Marble
(To:Raccone)

I answered myself, there is a generic utility to find all entities by name: 

 

thingsNetwork = (Network) EntityUtilities.findEntityDirect(thingNetworks.getRow(0).getStringValue("name"), ThingworxRelationshipTypes.Network);

 

View solution in original post

1 REPLY 1
Raccone
10-Marble
(To:Raccone)

I answered myself, there is a generic utility to find all entities by name: 

 

thingsNetwork = (Network) EntityUtilities.findEntityDirect(thingNetworks.getRow(0).getStringValue("name"), ThingworxRelationshipTypes.Network);

 

Top Tags