planetj.possiblevalues
Class AbstractPV

java.lang.Object
  |
  +--planetj.possiblevalues.AbstractPV
All Implemented Interfaces:
IPossibleValueGetter
Direct Known Subclasses:
ConcurrencyPV, DayOfTheWeekFieldPV, FieldClassPV, FieldNullibilityPV, FormatterClassPV, MonthFieldPV, PVClassPV, SQLTypePV, USStateFieldPV

public abstract class AbstractPV
extends Object
implements IPossibleValueGetter

This abstract class simplifies the creation of a possible value getter class.

Author:
PlanetJ Corporation

Constructor Summary
AbstractPV()
          SQLTypePV constructor comment.
 
Method Summary
abstract  String getKey()
          Get the key for this possible value class.
 String[] getOrderByColumnNames()
          Get columns to order possible values by.
 RowCollection getPossibleValues(Field field)
          It is recommended that your possible value class use the DataEngine.getRows() methods to return a RowCollection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPV

public AbstractPV()
SQLTypePV constructor comment.

Method Detail

getKey

public abstract String getKey()
Get the key for this possible value class.


getOrderByColumnNames

public String[] getOrderByColumnNames()
Get columns to order possible values by. Subclasses may override this method if they wish to order by something other than the display order and display value.

Returns:
String array of columns to order by

getPossibleValues

public RowCollection getPossibleValues(Field field)
                                throws CMException
It is recommended that your possible value class use the DataEngine.getRows() methods to return a RowCollection. If the RowCollection returns 1 column, that column will be used for the value and display value. If the RowCollection returns 2 columns, it is assumed the 2nd column will be the display value.

Specified by:
getPossibleValues in interface IPossibleValueGetter
Returns:
RowCollection
CMException