|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdochelper.AbstractTableRecordSet
public abstract class AbstractTableRecordSet
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
Field Summary | |
---|---|
private java.lang.String |
name
Reference Name for this instance. |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
params
The parameters that describe this File Records Set. |
private java.util.ArrayList<DocPattern> |
patterns
The patterns that should be matched to the records for this record set. |
Constructor Summary | |
---|---|
AbstractTableRecordSet()
|
Method Summary | |
---|---|
void |
addPattern(DocPattern pattern)
Add a single pattern to be applied to this record set. |
void |
checkParams()
Checks that the parameters are correct for the TableRecordSet defined by the implementing subclass. |
protected abstract void |
checkParamsImpl()
Subclass should implement this method |
void |
clearPatterns()
Empty pattern list. |
ResultNode |
execute(ResultNode doc)
Main method of RecordSet. |
java.lang.String |
getName()
Name Accessor + Modifier |
protected abstract java.util.List<Record> |
getRecords()
Method used to retrieve a list of Record s for this RecordSet. |
void |
init()
Initialize the Table Record Set. |
protected abstract void |
initImpl()
Subclass should implement this method. |
void |
setName(java.lang.String name)
Set the name of this Record Set. |
void |
setParam(java.lang.String paramName,
java.lang.Object value)
Add an initialization parameter to the Record Set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap<java.lang.String,java.lang.Object> params
private java.util.ArrayList<DocPattern> patterns
private java.lang.String name
Constructor Detail |
---|
public AbstractTableRecordSet()
Method Detail |
---|
protected abstract void initImpl() throws java.sql.SQLException, ResourceUnavailableException
java.sql.SQLException
ResourceUnavailableException
protected abstract void checkParamsImpl() throws MissingArgumentException, InvalidValueException, ResourceUnavailableException
MissingArgumentException
InvalidValueException
ResourceUnavailableException
protected abstract java.util.List<Record> getRecords() throws ResourceUnavailableException, java.sql.SQLException
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
java.sql.SQLException
public void setParam(java.lang.String paramName, java.lang.Object value) throws IllegalParamterTypeException
setParam
in interface Configurable
paramName
- String Name of the paramter to be storedvalue
- String value of the named param
IllegalParamterTypeException
public void checkParams() throws InvalidValueException, MissingArgumentException, ResourceUnavailableException
checkParams
in interface Configurable
InvalidValueException
MissingArgumentException
ResourceUnavailableException
public void init() throws InitializationException, ResourceUnavailableException
init
in interface Configurable
InitializationException
ResourceUnavailableException
public ResultNode execute(ResultNode doc) throws ResourceUnavailableException
execute
in interface RecordSet
doc
- The document onto which the results of running this record set should be appended to.
ResourceUnavailableException
java.lang.Exception
RecordSet
public java.lang.String getName()
public void setName(java.lang.String name)
RecordSet
setName
in interface RecordSet
public void addPattern(DocPattern pattern)
addPattern
in interface RecordSet
pattern
- DocPettern to add to this Record Set.public void clearPatterns()
clearPatterns
in interface RecordSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |