User: dsundstrom
  Date: 01/07/26 15:24:29

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata
                        JDBCQueryMetaDataFactory.java
  Log:
  Applied patch 444422. This fixes a bug where it was assumed that a bean
  always had a home and local home interface, which are optional in ejb 2.x
  
  Revision  Changes    Path
  1.3       +10 -4     
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCQueryMetaDataFactory.java
  
  Index: JDBCQueryMetaDataFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCQueryMetaDataFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JDBCQueryMetaDataFactory.java     2001/07/26 02:39:33     1.2
  +++ JDBCQueryMetaDataFactory.java     2001/07/26 22:24:29     1.3
  @@ -22,7 +22,7 @@
    * on the query specifiection type.
    *    
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   public class JDBCQueryMetaDataFactory {
        private JDBCEntityMetaData entity;
  @@ -88,7 +88,7 @@
      public Method[] getQueryMethods(QueryMetaData queryData) throws 
DeploymentException {
                String methodName = queryData.getMethodName();
                Class[] parameters = convertToJavaClasses(queryData.getMethodParams());
  -             String methodIntf = queryData.getMethodName();
  +             String methodIntf = queryData.getMethodIntf();
                return getQueryMethods(methodName, parameters, methodIntf);
        }
   
  @@ -103,9 +103,15 @@
                } else {
                        // interface element
                        if(methodIntf == null || 
methodIntf.equals(QueryMetaData.HOME)) {
  -                             methods.add(getQueryMethod(methodName, parameters, 
entity.getHomeClass()));
  +                             Class homeClass = entity.getHomeClass(); // optional, 
might be null
  +                             if(homeClass != null) {
  +                                     methods.add(getQueryMethod(methodName, 
parameters, homeClass));
  +                             }
                        } else if(methodIntf == null || 
methodIntf.equals(QueryMetaData.LOCAL_HOME)) {
  -                             methods.add(getQueryMethod(methodName, parameters, 
entity.getLocalHomeClass()));
  +                             Class localHomeClass = entity.getLocalHomeClass(); // 
optional, might be null
  +                             if(localHomeClass != null) {
  +                                     methods.add(getQueryMethod(methodName, 
parameters, localHomeClass));
  +                             }
                        }
                }          
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to