"WEBNMS_5 API Docs"

com.adventnet.nms.provisioning.xml
Class SQLUpdate

java.lang.Object
  extended by com.adventnet.management.config.xml.BaseElement
      extended by com.adventnet.nms.provisioning.xml.SQLUpdate
All Implemented Interfaces:
java.io.Serializable

public class SQLUpdate
extends BaseElement

The SQLUpdate class represents Relational Database update data in the templates. Data can be updated into any relational database. The user can use this SQLUpdate element for updating databases other than the Provisioning database. For updating Provisioning database, user can use MOUpdate element.

Usage of Tag in the Template:
<InventoryUpdate>
   <SQLUpdate contextHandleName="handle" sqlCommand="update query" when="onSuccess" />
</InventoryUpdate>

contextHandleName specifies the database connection that is to be used. The database connection details are specified in Initialization tag.
sqlCommand is the sql update command that should be executed.
"when" attribute specifies the criteria for executing this update, whether the query should be executed on successful provisioning operation or not.

Since:
3.0
See Also:
MOUpdate, InventoryUpdate, Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.management.config.xml.BaseElement
element, isServer
 
Constructor Summary
SQLUpdate()
          Creates a new SQLUpdate instance.
SQLUpdate(org.w3c.dom.Element element)
          Creates a new SQLUpdate that contains representaion of the supplied xml element.
SQLUpdate(java.lang.String xmlString)
          Creates a new SQLUpdate object that contains representation of the supplied xml string.
 
Method Summary
 java.lang.String getContextHandleName()
          Fetches the sql context's handle name associated with this SQLUpdate element.
 java.lang.String getSQLCommand()
          Executes the sql command which can do updations in the relational database.
 java.lang.String getWhen()
          Fetches when attribute value.
 void setContextHandleName(java.lang.String contextHandleName)
          Sets the value of the "contextHandleName" attribute.
 void setSQLCommand(java.lang.String sqlCommand)
          Sets the value of the "sqlCommand" attribute.
 void setWhen(java.lang.String when)
          Sets when attribute value to the specified one.
 
Methods inherited from class com.adventnet.management.config.xml.BaseElement
addSubTag, getAttribute, getElement, getProperties, getSubTagsByName, hasAttribute, removeSubTagsByName, setAttribute, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLUpdate

public SQLUpdate(org.w3c.dom.Element element)
          throws InvalidTemplateException
Creates a new SQLUpdate that contains representaion of the supplied xml element.

Parameters:
element - element that represents SQLUpdate.
Throws:
InvalidTemplateException - if an error occurs

SQLUpdate

public SQLUpdate(java.lang.String xmlString)
          throws InvalidTemplateException
Creates a new SQLUpdate object that contains representation of the supplied xml string.

Parameters:
xmlString - xml string that contains representation of this SQLUpdate.
Throws:
InvalidTemplateException - if any error occurs.

SQLUpdate

public SQLUpdate()
Creates a new SQLUpdate instance.

Method Detail

getSQLCommand

public java.lang.String getSQLCommand()
Executes the sql command which can do updations in the relational database. No 'SELECT' command is allowed in the "sqlCommand" attribute.


setSQLCommand

public void setSQLCommand(java.lang.String sqlCommand)
Sets the value of the "sqlCommand" attribute.

Parameters:
sqlCommand - value of the "sqlCommand" attribute.

getContextHandleName

public java.lang.String getContextHandleName()
Fetches the sql context's handle name associated with this SQLUpdate element. This context handle name will be given in "handleName" attribute of Context element.

See Also:
Context.getHandleName()

setContextHandleName

public void setContextHandleName(java.lang.String contextHandleName)
Sets the value of the "contextHandleName" attribute.

Parameters:
contextHandleName - value of the "contextHandleName" attribute.

getWhen

public java.lang.String getWhen()
Fetches when attribute value.

Returns:
value of "when" attribute of this MOUpdate.

setWhen

public void setWhen(java.lang.String when)
Sets when attribute value to the specified one.

Parameters:
when - value of "when" attribute of this MOUpdate.

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.