com.flexive.shared.search.query
Class PropertyValueNode

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

public class PropertyValueNode
extends QueryValueNode<FxValue,PropertyValueComparator>

A property query condition

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

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
PropertyValueNode(int id, long propertyId)
          Create a new property query node.
 
Method Summary
 void buildSqlQuery(SqlQueryBuilder builder)
          Build the query represented by this node and its children.
 InputMapper getInputMapper()
          Returns the input mapper to be used for this query node.
 FxString getLabel()
          Return the label to be displayed for this query node.
 java.util.List<PropertyValueComparator> getNodeComparators()
          Override this method to set the available value comparators of a node instance.
 FxProperty getProperty()
           
 boolean isValid()
          Return true if the node's value is valid, or false if it is not.
 void setPropertyId(long propertyId)
           
 
Methods inherited from class com.flexive.shared.search.query.QueryValueNode
getAvailableComparators, getComparator, getEmptyValue, getPropertyInputMapper, getValue, getValueFormatter, isReadOnly, 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

PropertyValueNode

public PropertyValueNode(int id,
                         long propertyId)
Create a new property query node.

Parameters:
id - Internal and unique ID of the node
propertyId - the property to be set with this node
Method Detail

getProperty

public FxProperty getProperty()

setPropertyId

public void setPropertyId(long propertyId)

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.

buildSqlQuery

public 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

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.

getNodeComparators

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

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

getInputMapper

public InputMapper getInputMapper()
Returns the input mapper to be used for this query node. Input mappers allow to use "fancier" inputs for common properties, e.g. a select list for an internal ordinal value like the ACL.

Overrides:
getInputMapper in class QueryValueNode<FxValue,PropertyValueComparator>
Returns:
the input mapper for this node
See Also:
InputMapper, InputMapper.getInstance(com.flexive.shared.structure.FxProperty)