|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.fdsapi.DataSet
|
+--com.fdsapi.DataSetDecorator
This class is used to wrap prefixes and suffixes around a DataSet. This is used to format a DataSet into HTML. The general concept is all dynamic HTML (whether it is a cell in a table, a row in a table, the table itself or even header information) contains a prefix, a value and a suffix.
The DataSet heirarchy of objects uses the decorator and composite patterns from the "Design Patterns" book by Gamma, Helm, Johnson and Vlissides and published by Addison Wesley.
| Field Summary | |
protected DataSetMap |
data
|
| Fields inherited from class com.fdsapi.DataSet |
dataSetParm, templateTagType, variables |
| Constructor Summary | |
protected |
DataSetDecorator()
|
| Method Summary | |
java.lang.Object |
clone()
Note clone() returns a shallow copy of the object. |
DataSet |
createFactoryInstance()
A Factory method that creates a clone of this DataSet (see gang of 4 "Factory method" pattern). |
DataSet |
createFactoryInstance(DataSetFactoryParm dsfParm)
A Factory method that creates a clone of this DataSet with whatever data that makes this instance unique . |
java.lang.Object |
execute()
This function should be implemented in DataSetDecorator class for the client program to call to get the process started. |
void |
execute(int y)
Execute a command against the specified index. |
void |
getData(int x,
int y)
|
protected DataSet |
getDataSet(int x,
int y)
|
void |
getPrefix(int x,
int y)
This method returns the prefix for a particular row, column (i.e. |
void |
getSuffix(int x,
int y)
Returns the suffix for a particular row, column (i.e. |
protected void |
initialize(java.lang.String templateContents)
by default does nothing. |
boolean |
next(int x,
int y)
|
void |
setDataSetParm(DataSetParm dsp)
Method that sets the DataSetParm for the DataSet instance. |
| Methods inherited from class com.fdsapi.DataSet |
createDataIterator, getCellData, getDataSetParm, getMiscDataMap, getStringBuffer, getTabularData, getTemplateVariables, getVariableValue, log, next, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected DataSetMap data
| Constructor Detail |
protected DataSetDecorator()
| Method Detail |
public DataSet createFactoryInstance(DataSetFactoryParm dsfParm)
DataSet
createFactoryInstance in class DataSetpublic DataSet createFactoryInstance()
DataSet
createFactoryInstance in class DataSet
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
DataSetNote clone() returns a shallow copy of the object. This means the cloned instance variables of a DataSet will only clone the references not the underlying objects. When instance variables are stateless this works ok, but a deeper copy will have to be implemented if the instance variables are stateful.
This is an implementation of the Prototype factory pattern as discussed in the Erich Gamma Design Patterns book.
The CloneNotSupportedException could only be thrown if this class didn't implement the Cloneable tag interface.
clone in class DataSetjava.lang.CloneNotSupportedExceptionpublic void setDataSetParm(DataSetParm dsp)
DataSet
setDataSetParm in class DataSetprotected void initialize(java.lang.String templateContents)
DataSet
initialize in class DataSetpublic java.lang.Object execute()
DataSet
execute in class DataSet
public boolean next(int x,
int y)
public void execute(int y)
DataSet
execute in class DataSet
public void getPrefix(int x,
int y)
public void getData(int x,
int y)
protected DataSet getDataSet(int x,
int y)
public void getSuffix(int x,
int y)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||