|
|||||||||
| Home >> All >> com >> RuntimeCollective >> webapps >> [ tag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.webapps.tag
Class FindBeanCollectionTag

java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.RuntimeCollective.webapps.tag.FindBeanCollectionTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public final class FindBeanCollectionTag
- extends javax.servlet.jsp.tagext.TagSupport
Finds a collection of EntityBean's given the bean type and a named query.
The tag uses reflection to call the static finder method for the query on the bean type. The naming convention for the finder method is:
public static Collection findQueryName();
Attributes:
- name - the name of the collection to create.
- scope - the scope in which to create the collection. [optional]
- type - the subtype of the EntityBean in which the finder is defined.
- query - the name of the query to be executed.
For example, the tag:
<rs:findBeans name="giraffes"
type="com.RuntimeCollective.webapps.bean.Giraffe"
query="femaleGiraffes" />
Would cause a collection called "giraffes" to be defined in page scope which contained the results of executing Giraffe.findFemaleGiraffes()
If an exception is thrown while trying execute the query, the error is logged and an empty collection is returned to the calling page.
- Version:
- $Id: FindBeanCollectionTag.java,v 1.3 2003/09/30 15:13:18 joe Exp $
| Field Summary | |
private java.lang.String |
name
|
private java.lang.String |
query
|
private java.lang.String |
scope
|
private java.lang.String |
type
|
| 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 | |
FindBeanCollectionTag()
|
|
| Method Summary | |
int |
doStartTag()
Execute the query and define the collection. |
private java.lang.reflect.Method |
getFinder()
|
java.lang.String |
getName()
get the name. |
java.lang.String |
getQuery()
get the query. |
java.lang.String |
getScope()
get the scope. |
java.lang.String |
getType()
get the type. |
private void |
initialise()
|
private java.lang.String |
mangleMethodName()
|
void |
release()
Release any acquired resources. |
void |
setName(java.lang.String name)
set the name. |
void |
setQuery(java.lang.String query)
set the query. |
void |
setScope(java.lang.String scope)
set the scope. |
void |
setType(java.lang.String type)
set the type. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, 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 |
name
private java.lang.String name
scope
private java.lang.String scope
type
private java.lang.String type
query
private java.lang.String query
| Constructor Detail |
FindBeanCollectionTag
public FindBeanCollectionTag()
| Method Detail |
getName
public java.lang.String getName()
- get the name.
setName
public void setName(java.lang.String name)
- set the name.
getScope
public java.lang.String getScope()
- get the scope.
setScope
public void setScope(java.lang.String scope)
- set the scope.
getType
public java.lang.String getType()
- get the type.
setType
public void setType(java.lang.String type)
- set the type.
getQuery
public java.lang.String getQuery()
- get the query.
setQuery
public void setQuery(java.lang.String query)
- set the query.
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Execute the query and define the collection.
release
public void release()
- Release any acquired resources.
getFinder
private java.lang.reflect.Method getFinder() throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.SecurityException
mangleMethodName
private java.lang.String mangleMethodName()
initialise
private void initialise()
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> webapps >> [ tag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC