AbstractTableRecordSet
is the base class for defining Database table record sets.
More...
Public Member Functions | |
void | setParam (String paramName, Object value) throws IllegalParamterTypeException |
Add an initialization parameter to the Record Set. | |
void | checkParams () throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for the TableRecordSet defined by the implementing subclass. | |
void | init () throws InitializationException, ResourceUnavailableException |
Initialize the Table Record Set. | |
ResultNode | execute (ResultNode doc) throws ResourceUnavailableException |
Main method of RecordSet. | |
String | getName () |
Name Accessor + Modifier. | |
void | setName (String name) |
Set the name of this Record Set. | |
void | addPattern (DocPattern pattern) |
Add a single pattern to be applied to this record set. | |
void | clearPatterns () |
Empty pattern list. | |
Protected Member Functions | |
abstract void | initImpl () throws SQLException, ResourceUnavailableException |
Subclass should implement this method. | |
abstract void | checkParamsImpl () throws MissingArgumentException, InvalidValueException, ResourceUnavailableException |
Subclass should implement this method. | |
abstract List< Record > | getRecords () throws ResourceUnavailableException, SQLException |
Method used to retrieve a list of Record s for this RecordSet. | |
Protected Attributes | |
HashMap< String, Object > | params = new HashMap< String, Object >() |
The parameters that describe this File Records Set. | |
Private Attributes | |
ArrayList< DocPattern > | patterns |
The patterns that should be matched to the records for this record set. | |
String | name |
Reference Name for this instance. |
AbstractTableRecordSet
is the base class for defining Database table record sets.
It implements common methodology but lets subclasses define connection creation and record retrieval.
The AbstractTableRecordSet only requires that Abstra
Definition at line 30 of file AbstractTableRecordSet.java.
abstract void dochelper.AbstractTableRecordSet.initImpl | ( | ) | throws SQLException, ResourceUnavailableException [protected, pure virtual] |
Subclass should implement this method.
SQLException | ||
ResourceUnavailableException |
Implemented in dochelper.JdbcTableRecordSet.
abstract void dochelper.AbstractTableRecordSet.checkParamsImpl | ( | ) | throws MissingArgumentException, InvalidValueException, ResourceUnavailableException [protected, pure virtual] |
Subclass should implement this method.
MissingArgumentException | ||
InvalidValueException | ||
ResourceUnavailableException |
Implemented in dochelper.JdbcTableRecordSet.
abstract List<Record> dochelper.AbstractTableRecordSet.getRecords | ( | ) | throws ResourceUnavailableException, SQLException [protected, pure virtual] |
Method used to retrieve a list of Record
s for this RecordSet.
Depending on implementation, this may mean the fetching a list that has been retrieved during initialization, or it may mean actually performing the database retrieveal operation.
Record
objects. ResourceUnavailableException | ||
SQLException |
Implemented in dochelper.JdbcTableRecordSet.
void dochelper.AbstractTableRecordSet.setParam | ( | String | paramName, | |
Object | value | |||
) | throws IllegalParamterTypeException |
Add an initialization parameter to the Record Set.
These parameters are used during the call to init to Establish - Initialize the RecordSet. It is the responsibility of this method to check correct types for params used.
paramName | String Name of the paramter to be stored | |
value | String value of the named param |
IllegalParamterTypeException |
Implements dochelper.Configurable.
Definition at line 83 of file AbstractTableRecordSet.java.
void dochelper.AbstractTableRecordSet.checkParams | ( | ) | throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for the TableRecordSet defined by the implementing subclass.
This method will not return a boolean indicating success, rather, it will throw an exception if it fails.
InvalidValueException | ||
MissingArgumentException | ||
ResourceUnavailableException |
Implements dochelper.Configurable.
Definition at line 102 of file AbstractTableRecordSet.java.
void dochelper.AbstractTableRecordSet.init | ( | ) | throws InitializationException, ResourceUnavailableException |
Initialize the Table Record Set.
This implies creating the connection and possibly preemptivley retrieving the records depending on implementation.
InitializationException | ||
ResourceUnavailableException |
Implements dochelper.Configurable.
Definition at line 114 of file AbstractTableRecordSet.java.
ResultNode dochelper.AbstractTableRecordSet.execute | ( | ResultNode | doc | ) | throws ResourceUnavailableException |
This method should append to the document the output generated by interpreting this RecordSet. The abstract RecordSet class iterates through records obtained through a call to the abstract method getRecords(). The implementing subclass will decide how and when these are fetched.
doc | The document onto which the results of running this record set should be appended to. |
ResourceUnavailableException | ||
Exception |
Implements dochelper.RecordSet.
Definition at line 141 of file AbstractTableRecordSet.java.
String dochelper.AbstractTableRecordSet.getName | ( | ) |
Name Accessor + Modifier.
Definition at line 169 of file AbstractTableRecordSet.java.
void dochelper.AbstractTableRecordSet.setName | ( | String | name | ) |
Set the name of this Record Set.
The name of the Record Set is used in conjunction with items that use the name to fetch the appropriate part of the result tree. This includes renderers.
name |
Implements dochelper.RecordSet.
Definition at line 173 of file AbstractTableRecordSet.java.
void dochelper.AbstractTableRecordSet.addPattern | ( | DocPattern | pattern | ) |
Add a single pattern to be applied to this record set.
pattern | DocPettern to add to this Record Set. |
Implements dochelper.RecordSet.
Definition at line 183 of file AbstractTableRecordSet.java.
void dochelper.AbstractTableRecordSet.clearPatterns | ( | ) |
Empty pattern list.
Implements dochelper.RecordSet.
Definition at line 195 of file AbstractTableRecordSet.java.
HashMap< String, Object > dochelper.AbstractTableRecordSet.params = new HashMap< String, Object >() [protected] |
The parameters that describe this File Records Set.
Definition at line 33 of file AbstractTableRecordSet.java.
ArrayList<DocPattern> dochelper.AbstractTableRecordSet.patterns [private] |
The patterns that should be matched to the records for this record set.
Definition at line 36 of file AbstractTableRecordSet.java.
String dochelper.AbstractTableRecordSet.name [private] |
Reference Name for this instance.
Used to fetch info when rendering or processing.
Definition at line 39 of file AbstractTableRecordSet.java.