|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.LocationAwareTagSupport net.sf.jameleon.JameleonTagSupport net.sf.jameleon.data.AbstractDataDrivableTag net.sf.jameleon.data.SqlTag
public class SqlTag
Used to iterate over all tags it is surrounding one time per row in a SQL ResultSet. This tag should work with any RDBMS that provides a JDBC driver. One thing to remember is each JDBC driver seems to act a bit differently when returning the column names returned. Some JDBC drivers will returned the column names in all caps some will return them as undercase, while others may return them as defined when the table was created.
Field Summary | |
---|---|
protected String |
id
|
protected String |
jdbcDriver
|
protected String |
jdbcPassword
|
protected String |
jdbcUrl
|
protected String |
jdbcUsername
|
protected String |
query
|
protected SqlDataDriver |
sqld
|
Fields inherited from class net.sf.jameleon.data.AbstractDataDrivableTag |
---|
addt, breakPoint, countRow, dataDrivableRowResult, executer, failedOnCurrentRow, log, numOfRowFailures, parentFailed, previousStateDir, resultContainer, resultRecorder, rowData, stateStorer, stopTestExecutionOnFailure, tct, vars, xmlOut |
Fields inherited from class net.sf.jameleon.JameleonTagSupport |
---|
attributes, broker, contextVars, fp, unsupportedAttributes |
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
columnNumber, elementTagName, lineNumber, scriptFileName |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
SqlTag()
|
Method Summary | |
---|---|
protected DataDriver |
getDataDriver()
Gets the DataDriver used for this tag. |
protected String |
getDataExceptionMessage()
Gets an error message to be displayed when a error occurs due to the DataDriver. |
protected org.apache.log4j.Logger |
getLogger()
Gets the logger used for this tag |
protected String |
getNewStateStoreLocation(int rowNum)
Calculates the location of the state to be stored for any tags under this tag. |
String |
getQuery()
Gets the query to be used for this tag |
String |
getTagDescription()
Describe the tag when error messages occur. |
protected String |
getTagTraceMsg()
Gets the trace message when the execution is beginning and ending. |
void |
setId(String id)
Set the SQL ID number This is primarily used for debugging. |
void |
setJdbcDriver(String jdbcDriver)
Set the JDBC Driver needed for the Database Connection |
void |
setJdbcPassword(String jdbcPassword)
Set the JDBC Password for the Database Connection |
void |
setJdbcUrl(String jdbcUrl)
Set the JDBC URL for the Database Connection |
void |
setJdbcUsername(String jdbcUsername)
Set the JDBC UserName for the Database Connection |
void |
setQuery(String query)
Set the SQL Query for the Database Connection |
protected void |
setupDataDriver()
Sets up the DataDriver by calling any implementation-dependent methods. |
Methods inherited from class net.sf.jameleon.JameleonTagSupport |
---|
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught |
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.jelly.Tag |
---|
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent |
Field Detail |
---|
protected SqlDataDriver sqld
protected String query
protected String id
protected String jdbcDriver
protected String jdbcUrl
protected String jdbcUsername
protected String jdbcPassword
Constructor Detail |
---|
public SqlTag()
Method Detail |
---|
protected org.apache.log4j.Logger getLogger()
getLogger
in class AbstractDataDrivableTag
protected DataDriver getDataDriver()
getDataDriver
in class AbstractDataDrivableTag
protected String getDataExceptionMessage()
getDataExceptionMessage
in class AbstractDataDrivableTag
protected void setupDataDriver()
setupDataDriver
in class AbstractDataDrivableTag
public String getQuery()
protected String getTagTraceMsg()
getTagTraceMsg
in class AbstractDataDrivableTag
public String getTagDescription()
getTagDescription
in class AbstractDataDrivableTag
protected String getNewStateStoreLocation(int rowNum)
getNewStateStoreLocation
in class AbstractDataDrivableTag
public void setJdbcDriver(String jdbcDriver)
public void setJdbcUrl(String jdbcUrl)
public void setJdbcUsername(String jdbcUsername)
public void setJdbcPassword(String jdbcPassword)
public void setQuery(String query)
public void setId(String id)
SqlTag
tags.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |