com.ibm.websphere.samples.plantsbywebsphereejb
Class ReportFormat

java.lang.Object
  extended by com.ibm.websphere.samples.plantsbywebsphereejb.ReportFormat
All Implemented Interfaces:
java.io.Serializable

public class ReportFormat
extends java.lang.Object
implements java.io.Serializable

Report format for database query. Currently, this format only determines whether the data is sorted in an ascending or descending order. This class can be expanded to allow for selecting what columns appear, order of columns, etc.

See Also:
Serialized Form

Constructor Summary
ReportFormat()
          Create a ReportFormat object which defaults to an ascending sort order.
ReportFormat(boolean ascending)
          Create a ReportFormat object.
 
Method Summary
 boolean isAscending()
          Is report sorted in ascending order?
 void sortBy(boolean ascending)
          Used to establish the sorting rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportFormat

public ReportFormat()
Create a ReportFormat object which defaults to an ascending sort order.


ReportFormat

public ReportFormat(boolean ascending)
Create a ReportFormat object.

Parameters:
ascending - A boolean value set to TRUE when sortingby ascending values, and FALSE when sorting by descending values.
Method Detail

sortBy

public void sortBy(boolean ascending)
Used to establish the sorting rules.

Parameters:
ascending - A boolean value set to TRUE when sortingby ascending values, and FALSE when sorting by descending values.

isAscending

public boolean isAscending()
Is report sorted in ascending order?

Returns:
True, if ascending.