Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.db
Class DefaultPivotDefinition

java.lang.Object
  extended by com.sciapp.table.db.DefaultPivotDefinition
All Implemented Interfaces:
PivotDefinition

public class DefaultPivotDefinition
extends Object
implements PivotDefinition

DefaultPivotDefinition is the default implementation for a PivotDefintion. This class holds the pivot column and its class. Its getColumnValue method also returns the pivot value formatted as a string.


Field Summary
protected  Class pivotClass
          the pivot column class
protected  String pivotColumn
          the pivot column
 
Constructor Summary
DefaultPivotDefinition(String pivotColumn)
          Constructs a DefaultPivotDefinition.
DefaultPivotDefinition(String pivotColumn, Class pivotClass)
          Constructs a DefaultPivotDefinition.
 
Method Summary
 String getColumnValue(Object pivotValue)
          Returns the value to display on the table for this pivot column having pivotValue as its value.
 String getPivotColumn()
          Returns the pivot column as a string.
 Class getPivotColumnClass()
          Returns the class of the pivot column
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pivotColumn

protected String pivotColumn
the pivot column


pivotClass

protected Class pivotClass
the pivot column class

Constructor Detail

DefaultPivotDefinition

public DefaultPivotDefinition(String pivotColumn)
Constructs a DefaultPivotDefinition.


DefaultPivotDefinition

public DefaultPivotDefinition(String pivotColumn,
                              Class pivotClass)
Constructs a DefaultPivotDefinition.

Method Detail

getColumnValue

public String getColumnValue(Object pivotValue)
Returns the value to display on the table for this pivot column having pivotValue as its value.

Specified by:
getColumnValue in interface PivotDefinition
Parameters:
pivotValue - the value of the pivot column as it was fetched from the database.
Returns:
the string representation of the pivot value. This will be have impact on the table column display.

getPivotColumn

public String getPivotColumn()
Returns the pivot column as a string. This will be used in order to retrieve the database pivot values.

Specified by:
getPivotColumn in interface PivotDefinition
Returns:
the pivot column.

getPivotColumnClass

public Class getPivotColumnClass()
Returns the class of the pivot column

Specified by:
getPivotColumnClass in interface PivotDefinition
Returns:
the pivot columns classes.

Copyright © 2005 Scientific Applications. All Rights Reserved.