public class MaapiCursor extends Object
For example if we have:
module mtest { namespace "http://tail-f.com/test/mtest/1.0"; prefix mtest; tailf:id ""; import ietf-yang-types { prefix yang; } import ietf-inet-types { prefix inet; } import tailf-common { prefix tailf; } import tailf-xsd-types { prefix xs; } container mtest { container servers { list server { key name; max-elements 64; leaf name { type string; } leaf ip { type inet:host; mandatory true; } leaf port { type inet:port-number; default 80; } list interface { key name; max-elements 8; leaf name { type string; } leaf mtu { type int64; default 1500; } } } } } }We can have the following Java code which iterates over all 'server' instances.
MaapiCursor c; ConfKey x; c = maapi.newCursor(th, "/mtest:mtest/servers/server"); x = maapi.getNext(c); while(x != null) { // do something x = maapi.getNext(c); }
Maapi.getNext(MaapiCursor)
Modifier and Type | Method and Description |
---|---|
int |
getId() |
ConfPath |
getPath() |
ConfEObject |
getPrev() |
String |
getSecondaryIndex()
Return the name of the specified secondary index (if any).
|
int |
getTid() |
void |
setPrev(ConfEObject prev) |
void |
setSecondaryIndex(String idx)
Makes it possible to use a secondary index for the getNext calls.
|
String |
toString() |
public int getId()
public ConfPath getPath()
public ConfEObject getPrev()
public String getSecondaryIndex()
public int getTid()
public void setPrev(ConfEObject prev)
public void setSecondaryIndex(String idx)
idx
- Secondary index name