com.flexive.shared.search.query
Class AssignmentValueNode

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.AssignmentValueNode
All Implemented Interfaces:
java.io.Serializable

public class AssignmentValueNode
extends QueryValueNode<FxValue,PropertyValueComparator>

A query node representing a structure property.

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
AssignmentValueNode(int id, long assignmentId)
          Create a new property query node.
 
Method Summary
 void buildSqlQuery(SqlQueryBuilder builder)
          Build the query represented by this node and its children.
 FxAssignment getAssignment()
           
 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.
 boolean isValid()
          Return true if the node's value is valid, or false if it is not.
 void setAssignmentId(long assignmentId)
           
 
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

AssignmentValueNode

public AssignmentValueNode(int id,
                           long assignmentId)
Create a new property query node.

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

getAssignment

public FxAssignment getAssignment()

setAssignmentId

public void setAssignmentId(long assignmentId)

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)