public class PreparedXMLStatement extends Object
The put() method is used to replace a "?" parameter
with its actual ConfValue. The parameter index is zero-based.
When all "?"" parameters have been replaced,
setValues() can be issued which will insert or replace
(if values already exist) the configuration tree specified by the
XML-string at the location where prepareXMLCall was
called.
If a parameter is not replaced by a value before a setValues()
occurs, the value is treated as a ConfDefault.
No validation of data types occurs when put() is called, but
setValues() will fail if a parameter is set to a type other
than the one mandated by the YANG-model.
module mtest { namespace "http://tail-f.com/test/mtest/1.0"; prefix mtest; import ietf-inet-types { prefix inet; } 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; } } } } } }PreparedXMLStatement xmlst = serversNavuNode.prepareXMLCall("<server>" + "<name>?</name>" + "<ip>?</ip>" + "<port>?</port>" + "</server>"); xmlst.put(0, "www1"); xmlst.put(1, new ConfIPv4("192.168.10.12")); xmlst.put(2, new ConfUInt16(80)); xmlst.setValues();
| Constructor and Description |
|---|
PreparedXMLStatement(ConfXMLParam[] params,
Map<Integer,Object[]> paramInfoMap,
NavuNode node) |
| Modifier and Type | Method and Description |
|---|---|
ConfXMLParam[] |
getConfXMLParams() |
void |
put(int index,
ConfObject val)
Populate the parameterized value at position
index
with the value |
void |
put(int index,
String strval)
Populate the parameterized value at position
index with
the value |
void |
reset() |
void |
set()
Deprecated.
|
void |
set(NavuContext context)
Deprecated.
|
void |
set(NavuNode node)
Deprecated.
|
void |
setBinary(int index,
ConfBinary val)
Deprecated.
|
void |
setBit32(int index,
ConfBit32 val)
Deprecated.
|
void |
setBit64(int index,
ConfBit64 val)
Deprecated.
|
void |
setBool(int index,
boolean val)
Deprecated.
|
void |
setBool(int index,
ConfBool val)
Deprecated.
|
void |
setBuf(int index,
ConfBuf val)
Deprecated.
|
void |
setBuf(int index,
String val)
Deprecated.
|
void |
setConfDouble(int index,
ConfDouble val)
Deprecated.
|
void |
setConfFloat(int index,
ConfFloat val)
Deprecated.
|
void |
setConfHexList(int index,
ConfHexList val)
Deprecated.
|
void |
setConfIdentityRef(int index,
ConfIdentityRef val)
Deprecated.
|
void |
setConfKey(int index,
ConfKey key)
Deprecated.
|
void |
setConfObjectRef(int index,
ConfObjectRef val)
Deprecated.
|
void |
setDate(int index,
ConfDate val)
Deprecated.
|
void |
setDatetime(int index,
ConfDatetime val)
Deprecated.
|
void |
setDecimal64(int index,
ConfDecimal64 val)
Deprecated.
|
void |
setDuration(int index,
ConfDuration val)
Deprecated.
|
void |
setEnumeration(int index,
ConfEnumeration val)
Deprecated.
|
void |
setHexList(int index,
ConfHexList val)
Deprecated.
|
void |
setInt16(int index,
ConfInt16 val)
Deprecated.
|
void |
setInt32(int index,
ConfInt32 val)
Deprecated.
|
void |
setInt64(int index,
ConfInt64 val)
Deprecated.
|
void |
setInt8(int index,
ConfInt8 val)
Deprecated.
|
void |
setIPv4(int index,
ConfIPv4 val)
Deprecated.
|
void |
setIPv4Prefix(int index,
ConfIPv4Prefix val)
Deprecated.
|
void |
setIPv6(int index,
ConfIPv6 val)
Deprecated.
|
void |
setIPv6Prefix(int index,
ConfIPv6Prefix val)
Deprecated.
|
void |
setUInt16(int index,
ConfUInt16 val)
Deprecated.
|
void |
setUInt32(int index,
ConfUInt32 val)
Deprecated.
|
void |
setUInt64(int index,
ConfUInt64 val)
Deprecated.
|
void |
setUInt8(int index,
ConfUInt8 val)
Deprecated.
|
void |
setValues()
When all of the parameterized values have been filled in,
this method is intended to be invoked for a
final set operation with the given values.
|
void |
setValues(NavuContext context)
When all of the parameterized values have been filled in,
this method is intended to be invoked for a
final set operation with the given values.
|
void |
setValues(NavuNode node)
Similar to
PreparedXMLStatement.setValues(NavuContext) but uses the context of
the supplied node. |
void |
sharedSetValues()
Variant of
PreparedXMLStatement.setValues() with FastMap support. |
void |
sharedSetValues(NavuContext context)
Variant of
PreparedXMLStatement.setValues(NavuContext) with FastMap support. |
void |
sharedSetValues(NavuNode node)
Variant of
PreparedXMLStatement.setValues(NavuNode) with FastMap support. |
public PreparedXMLStatement(ConfXMLParam[] params, Map<Integer,Object[]> paramInfoMap, NavuNode node)
public void put(int index,
ConfObject val)
index
with the value val. The first parameter has index 0.index - zero-based index of the parameterval - the value to give to the parameterpublic void put(int index,
String strval)
index with
the value strval. The first parameter has index 0. The
input string is converted to the appropriate data type as specified
by the current schema.index - zero-based index of the parameterstrval - string representation of the value to give to the parameterpublic void reset()
@Deprecated public void setUInt8(int index, ConfUInt8 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt8 value.index - The Index positionval - The value at position index@Deprecated public void setUInt16(int index, ConfUInt16 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt16 value.index - The Index positionval - The value at position index@Deprecated public void setUInt32(int index, ConfUInt32 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt32 value.index - The Index positionval - The value at position index@Deprecated public void setUInt64(int index, ConfUInt64 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt64 value.index - The Index positionval - The value at position index@Deprecated public void setInt8(int index, ConfInt8 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfInt8 value.index - The Index positionval - The value at position index@Deprecated public void setInt16(int index, ConfInt16 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt16 value.index - The Index positionval - The value at position index@Deprecated public void setInt32(int index, ConfInt32 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt32 value.index - The Index positionval - The value at position index@Deprecated public void setInt64(int index, ConfInt64 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfUInt64 value.index - The Index positionval - The value at position index@Deprecated public void setIPv4(int index, ConfIPv4 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIPv4 value.index - The Index positionval - The value at position index@Deprecated public void setIPv4Prefix(int index, ConfIPv4Prefix val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIPv4Prefix value.index - The Index positionval - The value at position index@Deprecated public void setIPv6(int index, ConfIPv6 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIPv4Prefix value.index - The Index positionval - The value at position index@Deprecated public void setIPv6Prefix(int index, ConfIPv6Prefix val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIPv6Prefix value.index - The Index positionval - The value at position index@Deprecated public void setBinary(int index, ConfBinary val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBinary value.index - The Index positionval - The value at position index@Deprecated public void setHexList(int index, ConfHexList val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfHexList value.index - The Index positionval - The value at position index@Deprecated public void setBit32(int index, ConfBit32 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBit32value.index - The Index positionval - The value at position index@Deprecated public void setBit64(int index, ConfBit64 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBit64value.index - The Index positionval - The value at position index@Deprecated public void setBool(int index, ConfBool val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBool.index - The Index positionval - The value at position index@Deprecated public void setBool(int index, boolean val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBool.index - The Index positionval - The value at position index@Deprecated public void setBuf(int index, ConfBuf val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBuf.index - The Index positionval - The value at position index@Deprecated public void setBuf(int index, String val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfBuf.index - The Index positionval - The value at position index@Deprecated public void setDate(int index, ConfDate val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDate.index - The Index positionval - The value at position index@Deprecated public void setDatetime(int index, ConfDatetime val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDatetime.index - The Index positionval - The value at position index@Deprecated public void setDuration(int index, ConfDuration val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDuration.index - The Index positionval - The value at position index@Deprecated public void setEnumeration(int index, ConfEnumeration val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfEnumeration.index - The Index positionval - The value at position index@Deprecated public void setDecimal64(int index, ConfDecimal64 val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDecimal64.index - The Index positionval - The value at position index@Deprecated public void setConfDouble(int index, ConfDouble val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDouble.index - The Index positionval - The value at position index@Deprecated public void setConfFloat(int index, ConfFloat val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfDouble.index - The Index positionval - The value at position index@Deprecated public void setConfIdentityRef(int index, ConfIdentityRef val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIdentityRef.index - The Index positionval - The value at position index@Deprecated public void setConfObjectRef(int index, ConfObjectRef val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIdentityRef.index - The Index positionval - The value at position index@Deprecated public void setConfHexList(int index, ConfHexList val)
PreparedXMLStatement.put(int, ConfObject) instead.
Set the parameter at index index with
the corresponding ConfIdentityRef.index - The Index positionval - The value at position index@Deprecated public void setConfKey(int index, ConfKey key)
PreparedXMLStatement.put(int, ConfObject) instead.public ConfXMLParam[] getConfXMLParams()
@Deprecated public void set() throws NavuException
PreparedXMLStatement.setValues() insteadNavuException@Deprecated public void set(NavuContext context) throws NavuException
PreparedXMLStatement.setValues(NavuContext) insteadNavuException@Deprecated public void set(NavuNode node) throws NavuException
PreparedXMLStatement.setValues(NavuNode) insteadNavuExceptionpublic void setValues()
throws NavuException
NavuExceptionpublic void setValues(NavuContext context) throws NavuException
context - NavuContext object that the setValues() operation should
useNavuExceptionpublic void setValues(NavuNode node) throws NavuException
PreparedXMLStatement.setValues(NavuContext) but uses the context of
the supplied node.node - node containing the NavuContext to useNavuExceptionpublic void sharedSetValues()
throws NavuException
PreparedXMLStatement.setValues() with FastMap support.NavuExceptionpublic void sharedSetValues(NavuContext context) throws NavuException
PreparedXMLStatement.setValues(NavuContext) with FastMap support.context - NavuContext object that the sharedSetValues()
operation should useNavuExceptionpublic void sharedSetValues(NavuNode node) throws NavuException
PreparedXMLStatement.setValues(NavuNode) with FastMap support.node - node containing the NavuContext to useNavuException