Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.tools.ejb11
Class FinderDefinition

java.lang.Object
  extended byoracle.toplink.tools.ejb11.BeanInformationDefinition
      extended byoracle.toplink.tools.ejb11.FinderDefinition


public class FinderDefinition
extends BeanInformationDefinition

Field Summary
java.lang.String cacheUsage
Options for a particular finder may be null (left unset)
static java.lang.String EXPRESSION
java.lang.String finderQuery
java.lang.String finderType
java.lang.String methodName
java.util.Vector methodParamNames
java.util.Vector methodParamTypes
static java.lang.String NAMED
static java.lang.String READALL
static java.lang.String READOBJECT
static java.lang.String REDIRECT
java.lang.Boolean refreshCache
static java.lang.String SQL

Fields inherited from class oracle.toplink.tools.ejb11.BeanInformationDefinition
BEAN_ATTRIBUTES, CACHE_USAGE, CMP_3_5_DTD_NAME, CMP_DTD_LOCATION, CMP_DTD_NAME, CUSTOMIZATION_CLASS, FINDER, FINDER_LIST, FINDER_QUERY, FINDER_TYPE, LOG_DESTINATION, LOG_MESSAGES, METHOD_NAME, METHOD_PARAM, METHOD_PARAMS, PARAM_NAME, PARAM_TYPE, PROJECT, PROJECT_CLASS, PROJECT_DATA_SOURCE, PROJECT_FILE, PROJECT_IDENTIFIER, PROJECT_OPTIONS, PROJECT_PLATFORM, PROJECT_POOL_NAME, PROJECT_READ_ONLY_DATA_SOURCE, PROJECT_TRANSACTION_ISOLATION, READ_ONLY, REFRESH_CACHE, TOPLINK_3_0_DOCTYPE_DESC, TOPLINK_3_5_DOCTYPE_DESC, TOPLINK_CMP_BEAN, TOPLINK_DOCTYPE_DESC, TOPLINK_DOCTYPE_URL, UPDATE_PROPAGATION

Constructor Summary
FinderDefinition()
FinderDefinition(org.w3c.dom.Element finderElem)
FinderDefinition(java.lang.String mthName, java.lang.String fndrType, java.lang.String fndrQuery)

Method Summary
void addParameterTypeAndName(java.lang.String type, java.lang.String name)
Add a parameter (type,name) pair to the this finder.
java.lang.String getCacheUsage()
Return the String that represents the cache usage level for queries.
org.w3c.dom.Element getFinderElement()
java.lang.String getFinderQuery()
java.lang.String getFinderType()
java.lang.String getMethodName()
java.lang.String getMethodNameWithParamTypes()
java.util.Vector getMethodParamNames()
java.util.Vector getMethodParamTypes()
java.lang.String getParameterTypeForName(java.lang.String name)
Get the parameter type for the given parameter name.
java.lang.Boolean getRefreshCache()
Return the Boolean object that contains true if this attribute has been set and the cache should be refreshed with the results of this query.
boolean hasParameters()
void loadProperties()
Precondition: The finderElement has been correctly initialized.
void loadProperties(org.w3c.dom.Element project)
void setCacheUsage(java.lang.String cacheUsageLevel)
Set the cache usage level of the finder.
void setFinderQuery(java.lang.String finderQuery)
Set the string used for the finder query.
void setFinderType(java.lang.String finderType)
Set the type used for the finder query.
void setMethodName(java.lang.String methodName)
Set the method name on the home interface.
void setRefreshCache(java.lang.Boolean shouldRefreshCache)
Set the refresh cache value of the finder to the Boolean containing true if refreshing is to occur, or false if the cache is not to be refreshed.
org.w3c.dom.Element storeProperties(org.w3c.dom.Document xmlDoc)

Methods inherited from class oracle.toplink.tools.ejb11.BeanInformationDefinition
topLink_CMP_DTD

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

methodName

public java.lang.String methodName

methodParamTypes

public java.util.Vector methodParamTypes

methodParamNames

public java.util.Vector methodParamNames

finderType

public java.lang.String finderType

finderQuery

public java.lang.String finderQuery

cacheUsage

public java.lang.String cacheUsage
Options for a particular finder may be null (left unset)

refreshCache

public java.lang.Boolean refreshCache

NAMED

public static final java.lang.String NAMED
See Also:
Constant Field Values

SQL

public static final java.lang.String SQL
See Also:
Constant Field Values

REDIRECT

public static final java.lang.String REDIRECT
See Also:
Constant Field Values

EXPRESSION

public static final java.lang.String EXPRESSION
See Also:
Constant Field Values

READOBJECT

public static final java.lang.String READOBJECT
See Also:
Constant Field Values

READALL

public static final java.lang.String READALL
See Also:
Constant Field Values

Constructor Detail

FinderDefinition

public FinderDefinition()

FinderDefinition

public FinderDefinition(java.lang.String mthName,
                        java.lang.String fndrType,
                        java.lang.String fndrQuery)

FinderDefinition

public FinderDefinition(org.w3c.dom.Element finderElem)

Method Detail

addParameterTypeAndName

public void addParameterTypeAndName(java.lang.String type,
                                    java.lang.String name)
Add a parameter (type,name) pair to the this finder. This should be used to ensure parity amongst the type and name Vectors. Parameters should be added in the order they are declared on the home interface.
Parameters:
type - The type of this parameter in the home interface method
name - The name of this parameter in the home interface method

getCacheUsage

public java.lang.String getCacheUsage()
Return the String that represents the cache usage level for queries. Return null if this attribute has not been set. See CMPDefinition static constants for possible values.

getFinderElement

public org.w3c.dom.Element getFinderElement()

getFinderQuery

public java.lang.String getFinderQuery()

getFinderType

public java.lang.String getFinderType()

getMethodName

public java.lang.String getMethodName()

getMethodNameWithParamTypes

public java.lang.String getMethodNameWithParamTypes()

getMethodParamNames

public java.util.Vector getMethodParamNames()

getMethodParamTypes

public java.util.Vector getMethodParamTypes()

getParameterTypeForName

public java.lang.String getParameterTypeForName(java.lang.String name)
Get the parameter type for the given parameter name. Return null if name not found

getRefreshCache

public java.lang.Boolean getRefreshCache()
Return the Boolean object that contains true if this attribute has been set and the cache should be refreshed with the results of this query. Return null if this attribute has not been set.

hasParameters

public boolean hasParameters()

loadProperties

public void loadProperties()
Precondition: The finderElement has been correctly initialized.
Overrides:
loadProperties in class BeanInformationDefinition

loadProperties

public void loadProperties(org.w3c.dom.Element project)
Overrides:
loadProperties in class BeanInformationDefinition

setCacheUsage

public void setCacheUsage(java.lang.String cacheUsageLevel)
Set the cache usage level of the finder. This may be any one of the string names of the static int cache usage constants defined in the ObjectLevelReadQuery class. This option is not required to be set.

setFinderQuery

public void setFinderQuery(java.lang.String finderQuery)
Set the string used for the finder query. For expression finder types this will be a TopLink expression string, for NAMED it will be the name given to the query in the query manager. For SQL finders this will be the SQL string itself.
Parameters:
finderQuery - The query String appropriate for the finder type

setFinderType

public void setFinderType(java.lang.String finderType)
Set the type used for the finder query.
Parameters:
finderType - A String designating the type of finder. Valid type constants are: NAMED, SQL, REDIRECT, EXPRESSION, READOBJECT, and READALL

setMethodName

public void setMethodName(java.lang.String methodName)
Set the method name on the home interface.
Parameters:
methodName - The name of the finder method on the home interface

setRefreshCache

public void setRefreshCache(java.lang.Boolean shouldRefreshCache)
Set the refresh cache value of the finder to the Boolean containing true if refreshing is to occur, or false if the cache is not to be refreshed. This option is not required to be set.

storeProperties

public org.w3c.dom.Element storeProperties(org.w3c.dom.Document xmlDoc)
Parameters:
xmlDoc - Document
Returns:
Element

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.