org.apache.taglibs.dbtags.resultset
Class BaseDateTimeGetterTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.taglibs.dbtags.resultset.BaseGetterTag
          extended by 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

Field Summary
protected  java.lang.String _format
           
protected static java.util.HashMap _mapDateTimeStyle
           
 
Fields inherited from class org.apache.taglibs.dbtags.resultset.BaseGetterTag
_attributeName, _locale, _metaData, _scope, _tag
 
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
 
Constructor Summary
BaseDateTimeGetterTag()
           
 
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
 

Field Detail

_mapDateTimeStyle

protected static java.util.HashMap _mapDateTimeStyle

_format

protected java.lang.String _format
Constructor Detail

BaseDateTimeGetterTag

public BaseDateTimeGetterTag()
Method Detail

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 ResultSet
nType - 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.