dochelper.AbstractTableRecordSet Class Reference

The AbstractTableRecordSet is the base class for defining Database table record sets. More...

Inheritance diagram for dochelper.AbstractTableRecordSet:

Inheritance graph
[legend]
Collaboration diagram for dochelper.AbstractTableRecordSet:

Collaboration graph
[legend]

List of all members.

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< RecordgetRecords () throws ResourceUnavailableException, SQLException
 Method used to retrieve a list of Records for this RecordSet.

Protected Attributes

HashMap< String, Object > params = new HashMap< String, Object >()
 The parameters that describe this File Records Set.

Private Attributes

ArrayList< DocPatternpatterns
 The patterns that should be matched to the records for this record set.
String name
 Reference Name for this instance.


Detailed Description

The 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

Author:
gchristen

Definition at line 30 of file AbstractTableRecordSet.java.


Member Function Documentation

abstract void dochelper.AbstractTableRecordSet.initImpl (  )  throws SQLException, ResourceUnavailableException [protected, pure virtual]

Subclass should implement this method.

Exceptions:
SQLException 
ResourceUnavailableException 

Implemented in dochelper.JdbcTableRecordSet.

Here is the caller graph for this function:

abstract void dochelper.AbstractTableRecordSet.checkParamsImpl (  )  throws MissingArgumentException, InvalidValueException, ResourceUnavailableException [protected, pure virtual]

Subclass should implement this method.

Exceptions:
MissingArgumentException 
InvalidValueException 
ResourceUnavailableException 

Implemented in dochelper.JdbcTableRecordSet.

Here is the caller graph for this function:

abstract List<Record> dochelper.AbstractTableRecordSet.getRecords (  )  throws ResourceUnavailableException, SQLException [protected, pure virtual]

Method used to retrieve a list of Records 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.

Returns:
List of Record objects.
Exceptions:
ResourceUnavailableException 
SQLException 

Implemented in dochelper.JdbcTableRecordSet.

Here is the caller graph for this function:

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.

Parameters:
paramName String Name of the paramter to be stored
value String value of the named param
Exceptions:
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.

Exceptions:
InvalidValueException 
MissingArgumentException 
ResourceUnavailableException 

Implements dochelper.Configurable.

Definition at line 102 of file AbstractTableRecordSet.java.

Here is the call graph for this function:

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.

Exceptions:
InitializationException 
ResourceUnavailableException 

Implements dochelper.Configurable.

Definition at line 114 of file AbstractTableRecordSet.java.

Here is the call graph for this function:

ResultNode dochelper.AbstractTableRecordSet.execute ( ResultNode  doc  )  throws ResourceUnavailableException

Main method of RecordSet.

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.

Parameters:
doc The document onto which the results of running this record set should be appended to.
Returns:
The document with the results of the matches and rendering appended to it.
Exceptions:
ResourceUnavailableException 
Exception 
See also:
RecordSet

Implements dochelper.RecordSet.

Definition at line 141 of file AbstractTableRecordSet.java.

Here is the call graph for this function:

String dochelper.AbstractTableRecordSet.getName (  ) 

Name Accessor + Modifier.

Returns:
name

Definition at line 169 of file AbstractTableRecordSet.java.

Here is the caller graph for this function:

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.

Parameters:
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.

Parameters:
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.


Member Data Documentation

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.

The patterns that should be matched to the records for this record set.

Definition at line 36 of file AbstractTableRecordSet.java.

Reference Name for this instance.

Used to fetch info when rendering or processing.

Definition at line 39 of file AbstractTableRecordSet.java.


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 14:21:57 2009 for DocHelper by  doxygen 1.5.6