org.outerj.xreporter.report.instance
Class OrderBy

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

public class OrderBy
extends java.lang.Object

Orderby configuration of a report instance. The orderby configuration can be set either to a default configuration defined in the report definition (using setOrderBy(java.lang.String), or to a custom configuration using setCustomOrderBy(java.util.Map, org.outerj.xreporter.resource.ResourceHandle).

In case of a custom orderby configuration, the id of the OrderByDefinition will be "custom".


Field Summary
protected static java.lang.String COLUMNS_EL
           
protected static java.lang.String CUSTOM_ORDERBY_EL
           
protected static java.lang.String CUSTOM_ORDERBY_ENTRY_EL
           
protected  java.util.ArrayList customOrderByEntries
          List containing instances of CustomOrderByEntry.
protected  DatabaseOutputDefinition dbOutputDefinition
           
protected static java.lang.String DESCRIPTION_EL
           
protected static java.lang.String ID_ATTR
           
protected static java.lang.String ORDERBY_CHOICE_EL
           
protected static java.lang.String ORDERBY_CHOICES_EL
           
protected static java.lang.String ORDERBY_INFO_EL
           
protected static java.lang.String SELECTED_ATTR
           
protected  OrderByDefinition selectedOrderByDefinition
           
 
Constructor Summary
OrderBy(DatabaseOutputDefinition dbOutputDefinition)
           
 
Method Summary
 void generateSaxFragment(org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle)
          Generates a SAX representation containing the possible orderby choices.
protected  void generateSaxFragmentForOrderByDefinition(OrderByDefinition orderByDefinition, org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle)
           
 OrderByDefinition getSelectedOrderByDefinition()
           
 void reset()
           
 void setCustomOrderBy(java.util.Map values, ResourceHandle resourceHandle)
           
 void setOrderBy(java.lang.String orderById)
           
 void storeState(ReportState reportState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectedOrderByDefinition

protected OrderByDefinition selectedOrderByDefinition

dbOutputDefinition

protected DatabaseOutputDefinition dbOutputDefinition

customOrderByEntries

protected java.util.ArrayList customOrderByEntries
List containing instances of CustomOrderByEntry.


ORDERBY_INFO_EL

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

ORDERBY_CHOICES_EL

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

ORDERBY_CHOICE_EL

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

DESCRIPTION_EL

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

SELECTED_ATTR

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

ID_ATTR

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

COLUMNS_EL

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

CUSTOM_ORDERBY_EL

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

CUSTOM_ORDERBY_ENTRY_EL

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

OrderBy

public OrderBy(DatabaseOutputDefinition dbOutputDefinition)
Method Detail

generateSaxFragment

public void generateSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                ResourceHandle resourceHandle)
                         throws org.xml.sax.SAXException
Generates a SAX representation containing the possible orderby choices. The selected one (if any) is indicated using a "selected" attribute. SAX events for startDocument/endDocument will not be generated.

Throws:
org.xml.sax.SAXException

generateSaxFragmentForOrderByDefinition

protected void generateSaxFragmentForOrderByDefinition(OrderByDefinition orderByDefinition,
                                                       org.xml.sax.ContentHandler contentHandler,
                                                       ResourceHandle resourceHandle)
                                                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

setOrderBy

public void setOrderBy(java.lang.String orderById)
                throws UnknownOrderByIdException
Throws:
UnknownOrderByIdException

setCustomOrderBy

public void setCustomOrderBy(java.util.Map values,
                             ResourceHandle resourceHandle)

getSelectedOrderByDefinition

public OrderByDefinition getSelectedOrderByDefinition()

reset

public void reset()

storeState

public void storeState(ReportState reportState)