org.apache.taglibs.dbtags.resultset
Class BaseDateTimeGetterTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.dbtags.resultset.BaseGetterTag
org.apache.taglibs.dbtags.resultset.BaseDateTimeGetterTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- GetDateTag, GetTimestampTag, GetTimeTag
public class BaseDateTimeGetterTag
- extends BaseGetterTag
Base tag for getDate, getTime, and getTimestamp
- Author:
- Morgan Delagrange, Marius Scurtescu
- 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.String |
getDateAsString(int position,
int nType)
Returns a formatted Date as a String, or null if the
database row was null |
void |
setFormat(java.lang.String strFormat)
|
Methods inherited from class org.apache.taglibs.dbtags.resultset.BaseGetterTag |
doEndTag, getLocale, getMetaData, getPosition, getResultSet, getResultSetTag, release, setAttribute, setColName, setLocale, setPosition, setPosition, setScope, setTo |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, 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 |
_mapDateTimeStyle
protected static java.util.HashMap _mapDateTimeStyle
_format
protected java.lang.String _format
BaseDateTimeGetterTag
public BaseDateTimeGetterTag()
setFormat
public void setFormat(java.lang.String strFormat)
getDateAsString
protected java.lang.String getDateAsString(int position,
int nType)
throws javax.servlet.jsp.JspTagException
- Returns a formatted Date as a String, or null if the
database row was null
- Parameters:
position
- position of the column in the ResultSetnType
- one of the following java.sql.Types: DATE, TIME, TIMESTAMP
- Returns:
- a formatted String, or null
- Throws:
javax.servlet.jsp.JspTagException
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.