Style Intelligence v12.0

inetsoft.uql.schema
Class XValueNode

java.lang.Object
  extended by inetsoft.uql.XNode
      extended by inetsoft.uql.schema.XValueNode
All Implemented Interfaces:
Serializable, Cloneable, Comparable
Direct Known Subclasses:
BooleanValue, ByteValue, CharacterValue, DateValue, DoubleValue, FloatValue, IntegerValue, LongValue, RoleValue, ShortValue, StringValue, TimeInstantValue, TimeValue, UserValue

public class XValueNode
extends XNode

This is the base class for all primitive value node.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.XNode
value
 
Constructor Summary
XValueNode()
          Create a value node.
XValueNode(String name)
          Create a value node.
 
Method Summary
static XValueNode createValueNode(Element root)
          Create a value node from XML element.
static XValueNode createValueNode(Object value, String name)
          Create a value node from a value.
static XValueNode createValueNode(String name, String type)
          Create a value node from a type.
 boolean equals(Object obj)
          Check if equals another object.
 String format()
          Convert the value to a string.
 String getType()
          Get the type of this node.
 String getVariable()
          Get the variable name of this node.
 int hashCode()
          Get the hash code value.
 void parse(String str)
          Parse the string to the value.
 void setFormat(Format fmt)
          Set the format string for the type.
 void setVariable(String var)
          Set the variable name for this value node.
 Object toSQLValue()
          from java Object to SQL type
 String toString()
           
 void writeXML(PrintWriter writer)
          Write the node XML representation.
 
Methods inherited from class inetsoft.uql.XNode
addChild, addChild, addChild, addr, checkDuplicate, clone, cloneValue, compareTo, eq, getAttribute, getAttributeNames, getChild, getChild, getChildCount, getChildIndex, getDefaultFormat, getName, getNode, getParent, getPath, getPath, getValue, getValue, insertChild, isAncestor, removeAllChildren, removeChild, removeChild, removeChild, removeChild, setAttribute, setChild, setDefaultFormat, setName, setValue, sort, sort
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XValueNode

public XValueNode()
Create a value node.


XValueNode

public XValueNode(String name)
Create a value node.

Method Detail

setVariable

public void setVariable(String var)
Set the variable name for this value node. If the variable name is not null, the value of the value node is gotten from the named variable at runtime.

Parameters:
var - variable name.

getVariable

public String getVariable()
Get the variable name of this node.


format

public String format()
Convert the value to a string.


getType

public String getType()
Get the type of this node. The types are defined in XSchema class.


setFormat

public void setFormat(Format fmt)
Set the format string for the type. The meaning of the format depends on the data type. For example, for date related formats, the format string is used to construct a SimpleDateFormat object.


parse

public void parse(String str)
           throws ParseException
Parse the string to the value.

Throws:
ParseException

writeXML

public void writeXML(PrintWriter writer)
Write the node XML representation.

Overrides:
writeXML in class XNode

toString

public String toString()
Overrides:
toString in class XNode

createValueNode

public static XValueNode createValueNode(Object value,
                                         String name)
Create a value node from a value.


createValueNode

public static XValueNode createValueNode(String name,
                                         String type)
Create a value node from a type.


createValueNode

public static XValueNode createValueNode(Element root)
                                  throws ParseException
Create a value node from XML element.

Throws:
ParseException

toSQLValue

public Object toSQLValue()
from java Object to SQL type


equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class XNode
Returns:
true if equals, false otherwise.

hashCode

public int hashCode()
Get the hash code value.

Overrides:
hashCode in class XNode
Returns:
the hash code value.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.