org.apache.taglibs.dbtags.preparedstatement
Class BaseSetterTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.dbtags.preparedstatement.BaseSetterTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class BaseSetterTag
- extends javax.servlet.jsp.tagext.TagSupport
Base class for all the setter tags without bodies
in the preparedstatement package.
- Author:
- Morgan Delagrange
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
protected java.lang.Object |
getAttribute(java.lang.String name)
Gets the page attribute for the tag |
protected java.sql.PreparedStatement |
getPreparedStatement()
get the PreparedStatement from the enclosing tag |
protected int |
getSqlTypeForFieldName(java.lang.String fieldName)
Perfoms reflection to translate a String name to one of
the int values of java.sql.Types |
void |
release()
|
void |
setName(java.lang.String attributeName)
Name of the page attribute that will be assigned
to the statement. |
void |
setPosition(int position)
Sets the column number of the prepared statement. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_position
protected int _position
_attributeName
protected java.lang.String _attributeName
BaseSetterTag
public BaseSetterTag()
setPosition
public void setPosition(int position)
- Sets the column number of the prepared statement.
- Parameters:
position
- column index
setName
public void setName(java.lang.String attributeName)
- Name of the page attribute that will be assigned
to the statement.
- Parameters:
attributeName
- attribute name
getAttribute
protected java.lang.Object getAttribute(java.lang.String name)
throws javax.servlet.jsp.JspTagException
- Gets the page attribute for the tag
- Parameters:
name
- name of the attribute
- Returns:
- the page attribute
- Throws:
javax.servlet.jsp.JspTagException
- thrown when the page attribute does not exist
getPreparedStatement
protected java.sql.PreparedStatement getPreparedStatement()
throws javax.servlet.jsp.JspTagException
- get the PreparedStatement from the enclosing tag
- Returns:
- the PreparedStatement
- Throws:
javax.servlet.jsp.JspTagException
- thrown if no PreparedStatement exists
getSqlTypeForFieldName
protected int getSqlTypeForFieldName(java.lang.String fieldName)
throws javax.servlet.jsp.JspTagException
- Perfoms reflection to translate a String name to one of
the int values of java.sql.Types
- Parameters:
fieldName
- name of the field in java.sql.Types
- Returns:
- int value of the sql type
- Throws:
javax.servlet.jsp.JspTagException
- thrown if the sql type does not exist, or if
reflection fails
release
public void release()
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.