org.outerj.xreporter.report.instance
Class Qbe

java.lang.Object
  extended byorg.outerj.xreporter.report.instance.Qbe

public class Qbe
extends java.lang.Object

Qbe settings for a specific report instance.


Field Summary
protected  java.util.ArrayList conditionsByLine
           
protected static java.lang.String LINE_EL
           
protected  java.lang.String naturalDescription
           
protected  java.lang.String orientation
          Defines how the QBE is presented to the user: row or column.
protected static java.lang.String QBE_EL
           
protected  QbeDefinition qbeDefinition
           
protected  boolean valid
          true when all conditions are valid
 
Constructor Summary
Qbe(QbeDefinition qbeDefinition)
           
 
Method Summary
 boolean areAllInputFieldsValid()
          Returns true if all conditions have a valid value (or no value).
 void generateSaxFragment(org.xml.sax.ContentHandler contentHandler, ExecutionContext executionContext, ResourceHandle resourceHandle)
          Generates a SAX representation of this QBE instance.
 java.util.List getConditionsByLine()
          Returns a List of Lists containing conditions.
 java.lang.String getNaturalDescription(ResourceHandle resourceHandle)
          Generates a human readable description of the QBE settings.
 boolean notEmptyAndValid()
           
 void reset()
          Removes all QBE conditions.
 void setOrientation(java.lang.String orientation)
           
 void storeState(ReportState reportState)
           
 void submit(java.util.Map values, ExecutionContext executionContext)
           
 void submit(java.util.Map values, ExecutionContext executionContext, boolean rawLocale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qbeDefinition

protected QbeDefinition qbeDefinition

conditionsByLine

protected java.util.ArrayList conditionsByLine

valid

protected boolean valid
true when all conditions are valid


orientation

protected java.lang.String orientation
Defines how the QBE is presented to the user: row or column. If it is "row", then qbe lines are shown as rowes, otherwise as columns.


naturalDescription

protected java.lang.String naturalDescription

QBE_EL

protected static final java.lang.String QBE_EL
See Also:
Constant Field Values

LINE_EL

protected static final java.lang.String LINE_EL
See Also:
Constant Field Values
Constructor Detail

Qbe

public Qbe(QbeDefinition qbeDefinition)
Method Detail

submit

public void submit(java.util.Map values,
                   ExecutionContext executionContext,
                   boolean rawLocale)

submit

public void submit(java.util.Map values,
                   ExecutionContext executionContext)

areAllInputFieldsValid

public boolean areAllInputFieldsValid()
Returns true if all conditions have a valid value (or no value).


generateSaxFragment

public void generateSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                ExecutionContext executionContext,
                                ResourceHandle resourceHandle)
                         throws java.lang.Exception
Generates a SAX representation of this QBE instance. Events for startDocument/endDocument are not generated.

Throws:
java.lang.Exception

reset

public void reset()
Removes all QBE conditions.


setOrientation

public void setOrientation(java.lang.String orientation)

notEmptyAndValid

public boolean notEmptyAndValid()

getConditionsByLine

public java.util.List getConditionsByLine()
Returns a List of Lists containing conditions. Or to be more verbose: returns a List, wherein each item is a List, and each of these Lists contains Conditions. Conditions in the same list should be ANDed together, while mulitple lists should be ORed together.


storeState

public void storeState(ReportState reportState)

getNaturalDescription

public java.lang.String getNaturalDescription(ResourceHandle resourceHandle)
Generates a human readable description of the QBE settings. This is very much like the SQL generated by QbeSqlPart but is more readable (uses column titles instead of field names, formats values, and operators are formatted more readable).