oracle.toplink.tools.ejb11
Class FinderDefinition
java.lang.Object
|
+--oracle.toplink.tools.ejb11.BeanInformationDefinition
|
+--oracle.toplink.tools.ejb11.FinderDefinition
- public class FinderDefinition
- extends BeanInformationDefinition
| 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 |
| Type | Method |
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. |
oracle.toplink.tools.ejb11.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(oracle.toplink.tools.ejb11.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. |
oracle.toplink.tools.ejb11.Element |
storeProperties(oracle.toplink.tools.ejb11.Document xmlDoc)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
SQL
public static final java.lang.String SQL
REDIRECT
public static final java.lang.String REDIRECT
EXPRESSION
public static final java.lang.String EXPRESSION
READOBJECT
public static final java.lang.String READOBJECT
READALL
public static final java.lang.String READALL
FinderDefinition
public FinderDefinition()
FinderDefinition
public FinderDefinition(java.lang.String mthName,
java.lang.String fndrType,
java.lang.String fndrQuery)
FinderDefinition
public FinderDefinition(oracle.toplink.tools.ejb11.Element finderElem)
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 methodname - 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 oracle.toplink.tools.ejb11.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(oracle.toplink.tools.ejb11.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 oracle.toplink.tools.ejb11.Element storeProperties(oracle.toplink.tools.ejb11.Document xmlDoc)
- Parameters:
xmlDoc - Document- Returns:
- Element