org.makumba.list.engine.valuecomputer
Class NullableValueComputer

java.lang.Object
  extended by org.makumba.list.engine.valuecomputer.ValueComputer
      extended by org.makumba.list.engine.valuecomputer.QueryValueComputer
          extended by org.makumba.list.engine.valuecomputer.NullableValueComputer

 class NullableValueComputer
extends QueryValueComputer

The manager of a nullableValueQuery

Author:
Cristian Bogdan

Field Summary
(package private) static String[] emptyQueryProps
           
 
Fields inherited from class org.makumba.list.engine.valuecomputer.QueryValueComputer
dummy, queryKey
 
Fields inherited from class org.makumba.list.engine.valuecomputer.ValueComputer
expr, parentKey, projectionIndex, type
 
Constructor Summary
NullableValueComputer(MultipleKey parentListKey, String nullableExpr, String expr, PageCache pageCache)
          Makes a query that is identical to the parentQuery, but has expr as projection.
 
Method Summary
 Object getValue(PageContext pageContext)
          Checks if the iterationGroupData is longer than 1, and throws an exception if so.
 
Methods inherited from class org.makumba.list.engine.valuecomputer.QueryValueComputer
doEndAnalyze, getQueryKey, makeQueryAtAnalysis, runQuery
 
Methods inherited from class org.makumba.list.engine.valuecomputer.ValueComputer
getFormattedValue, getProjectionIndex, getType, getValueComputerAtAnalysis, isPointer, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emptyQueryProps

static final String[] emptyQueryProps
Constructor Detail

NullableValueComputer

NullableValueComputer(MultipleKey parentListKey,
                      String nullableExpr,
                      String expr,
                      PageCache pageCache)
Makes a query that is identical to the parentQuery, but has expr as projection.

Parameters:
parentListKey - the key of the parent list
nullableExpr - the nullable expression
expr - the expression we use as projection
pageCache - the page cache of the current page
Method Detail

getValue

public Object getValue(PageContext pageContext)
                throws LogicException
Checks if the iterationGroupData is longer than 1, and throws an exception if so. Takes the first result (if any) otherwise.

Overrides:
getValue in class ValueComputer
Parameters:
running - the tag that is currently running
Returns:
the computed value
Throws:
LogicException