com.flexive.shared.search.query
Class TreeValueNode

java.lang.Object
  extended by com.flexive.shared.search.query.QueryNode
      extended by com.flexive.shared.search.query.QueryValueNode<FxValue,TreeValueNode.TreeValueComparator>
          extended by com.flexive.shared.search.query.TreeValueNode
All Implemented Interfaces:
java.io.Serializable

public class TreeValueNode
extends QueryValueNode<FxValue,TreeValueNode.TreeValueComparator>

Value node for tree queries (i.e. search in subtrees).

Version:
$Rev: 462 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Nested Class Summary
static class TreeValueNode.TreeValueComparator
           
 
Field Summary
 
Fields inherited from class com.flexive.shared.search.query.QueryValueNode
comparator, inputMapper, value
 
Fields inherited from class com.flexive.shared.search.query.QueryNode
children, id, parent
 
Constructor Summary
TreeValueNode(int id, long nodeId, FxTreeMode treeMode, FxString nodeLabel)
           
 
Method Summary
protected  void buildSqlQuery(SqlQueryBuilder builder)
          Build the query represented by this node and its children.
 FxString getLabel()
          Return the label to be displayed for this query node.
 java.util.List<TreeValueNode.TreeValueComparator> getNodeComparators()
          Override this method to set the available value comparators of a node instance.
 FxValueFormatter getValueFormatter()
          Override this method to provide your own formatter for read-only mode.
 boolean isReadOnly()
          Return true if the input fields should be read only for this node.
 boolean isValid()
          Return true if the node's value is valid, or false if it is not.
 
Methods inherited from class com.flexive.shared.search.query.QueryValueNode
getAvailableComparators, getComparator, getEmptyValue, getInputMapper, getPropertyInputMapper, getValue, isValueNode, isWideInput, setComparator, setInputMapper, setValue, visit
 
Methods inherited from class com.flexive.shared.search.query.QueryNode
addChild, addChild, addChildAfter, equals, findChild, getChild, getChildren, getId, getLevel, getNodeName, getParent, getPath, hashCode, isHidden, removeChild, setChildren, setId, setParent, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeValueNode

public TreeValueNode(int id,
                     long nodeId,
                     FxTreeMode treeMode,
                     FxString nodeLabel)
Method Detail

isReadOnly

public boolean isReadOnly()
Return true if the input fields should be read only for this node.

Overrides:
isReadOnly in class QueryValueNode<FxValue,TreeValueNode.TreeValueComparator>
Returns:
true if the input fields should be read only for this node.

getLabel

public FxString getLabel()
Return the label to be displayed for this query node.

Overrides:
getLabel in class QueryNode
Returns:
the label to be displayed for this query node.

isValid

public boolean isValid()
Return true if the node's value is valid, or false if it is not.

Specified by:
isValid in class QueryNode
Returns:
true if the node's value is valid, or false if it is not.

getValueFormatter

public FxValueFormatter getValueFormatter()
Override this method to provide your own formatter for read-only mode.

Overrides:
getValueFormatter in class QueryValueNode<FxValue,TreeValueNode.TreeValueComparator>
Returns:
the FxValueFormatter to be used for rendering read-only mode.

buildSqlQuery

protected void buildSqlQuery(SqlQueryBuilder builder)
Build the query represented by this node and its children.

Specified by:
buildSqlQuery in class QueryNode
Parameters:
builder - an sql query builder

getNodeComparators

public java.util.List<TreeValueNode.TreeValueComparator> getNodeComparators()
Override this method to set the available value comparators of a node instance.

Specified by:
getNodeComparators in class QueryValueNode<FxValue,TreeValueNode.TreeValueComparator>
Returns:
all available enum values for this query node.