Methods Summary |
---|
protected void | categorizeMethods()Reads all known methods and sorts them by name into specific
Collections for further processing.
EjbCMPEntityDescriptor descriptor = getDescriptor();
Iterator iterator = descriptor.getMethodDescriptors().iterator();
while (iterator.hasNext())
{
MethodDescriptor methodDescriptor =
(MethodDescriptor)iterator.next();
Method method = methodDescriptor.getMethod(descriptor);
String methodName = methodDescriptor.getName();
//if (DEBUG)
// System.out.println("Method: " + methodName); // NOI18N
if (methodName.startsWith(CMPTemplateFormatter.find_))
finders.add(method);
else if (methodName.startsWith(CMPTemplateFormatter.ejbSelect_))
selectors.add(method);
else if (methodName.startsWith(CMPTemplateFormatter.create_))
createMethods.add(method);
else if (methodName.startsWith(CMPTemplateFormatter.get_) ||
methodName.startsWith(CMPTemplateFormatter.set_))
{
;// skip
}
//else
// otherMethods.add(method);
// It is OK to use HashMap here as we won't use it for possible
// overloaded methods.
methodNames.put(methodName, method);
}
|
public java.util.List | getCreateMethods()Gets the list of ejb create methods for this bean. return createMethods;
|
protected EjbCMPEntityDescriptor | getDescriptor()Gets the EjbCMPEntityDescriptor which defines the
information for this bean. return _cmpDescriptor;
|
public java.util.List | getFinders()Gets the list of finder methods for this bean. return finders;
|
public abstract java.lang.String | getJDOFilterExpression(java.lang.reflect.Method method)Gets the jdo filter expression associated with the specified method
if it exists. Note that this method should only be used for CMP 1.1 -
use {@link #getQueryString} for CMP 2.0.
|
public abstract java.lang.String | getJDOOrderingSpecification(java.lang.reflect.Method method)Gets the jdo ordering specification associated with the specified
method if it exists. Note that this method should only be used for
CMP 1.1 - use {@link #getQueryString} for CMP 2.0.
|
public abstract java.lang.String | getJDOParameterDeclaration(java.lang.reflect.Method method)Gets the jdo parameter declaration associated with the specified
method if it exists. Note that this method should only be used for
CMP 1.1 - use {@link #getQueryString} for CMP 2.0.
|
public abstract java.lang.String | getJDOVariableDeclaration(java.lang.reflect.Method method)Gets the jdo variables declaration associated with the specified
method if it exists. Note that this method should only be used for
CMP 1.1 - use {@link #getQueryString} for CMP 2.0.
|
public java.lang.String | getLocalHome()Gets the name of the local home which corresponds to this bean.
return getDescriptor().getLocalHomeClassName();
|
public java.util.Map | getMethodNames()Gets a map of the method names for this bean. The keys are the
method names and the values are the java.lang.reflect.Method objects.
These should represent all methods of this bean. return methodNames;
|
protected QueryDescriptor | getQueryDescriptor(java.lang.reflect.Method method)Gets the query descriptor associated with the specified method if it
exists.
PersistenceDescriptor persistenceDescriptor =
getDescriptor().getPersistenceDescriptor();
return persistenceDescriptor.getQueryFor(method);
|
public int | getQueryReturnType(java.lang.reflect.Method method)Gets the return type associated with the specified method if it
exists. If no corresponding query descriptor is found, the value
NO_RETURN is returned.
QueryDescriptor queryDescriptor = getQueryDescriptor(method);
if (queryDescriptor != null)
{
if (queryDescriptor.getHasLocalReturnTypeMapping())
return LOCAL_RETURN;
if (queryDescriptor.getHasRemoteReturnTypeMapping())
return REMOTE_RETURN;
}
return NO_RETURN;
|
public java.lang.String | getQueryString(java.lang.reflect.Method method)Gets the query string associated with the specified method if it
exists.
QueryDescriptor queryDescriptor = getQueryDescriptor(method);
return ((queryDescriptor != null) ? queryDescriptor.getQuery() : null);
|
public java.lang.String | getRemoteHome()Gets the name of the remote home which corresponds to this bean.
return getDescriptor().getHomeClassName();
|
public java.util.List | getSelectors()Gets the list of selector methods for this bean. return selectors;
|
public abstract boolean | isQueryPrefetchEnabled(java.lang.reflect.Method method)Returns true if prefetch is enabled for the specified
method, false otherwise. Prefetch is enabled by default.
|
protected void | setFinders(java.util.List finderList)
finders = finderList;
|
protected void | setSelectors(java.util.List selectorList)
selectors = selectorList;
|