[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata QueryMetaData.java

2002-02-12 Thread Dain Sundstrom

  User: dsundstrom
  Date: 02/02/12 10:51:18

  Modified:src/main/org/jboss/metadata QueryMetaData.java
  Log:
  Fixed the loading of result-type-mapping.
  
  Revision  ChangesPath
  1.6   +5 -5  jboss/src/main/org/jboss/metadata/QueryMetaData.java
  
  Index: QueryMetaData.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/QueryMetaData.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- QueryMetaData.java26 Nov 2001 03:17:48 -  1.5
  +++ QueryMetaData.java12 Feb 2002 18:51:18 -  1.6
  @@ -17,7 +17,7 @@
* Contains information about ejb-ql queries.
* 
* @author a href=mailto:[EMAIL PROTECTED];Dain Sundstrom/a
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
*/
   public class QueryMetaData extends MetaData {
public final static String REMOTE = Remote;
  @@ -101,11 +101,11 @@
// result type mapping
resultTypeMapping = 
   getOptionalChildContent(element, result-type-mapping);
  - if(resultTypeMapping == null) {
  + if(resultTypeMapping == null || LOCAL.equals(resultTypeMapping)) {
resultTypeMapping = LOCAL;
  - }
  - if(!REMOTE.equals(resultTypeMapping) 
  - !LOCAL.equals(resultTypeMapping)) {
  + } else if(REMOTE.equals(resultTypeMapping)) {
  + resultTypeMapping = REMOTE;
  +  } else {
throw new DeploymentException(result-type-mapping must be ' +
  REMOTE + ' or ' + LOCAL + ', if specified);
}
  
  
  

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata QueryMetaData.java

2001-07-26 Thread Dain Sundstrom

  User: dsundstrom
  Date: 01/07/26 15:09:41

  Modified:src/main/org/jboss/metadata QueryMetaData.java
  Log:
  Applied patch 444395. This fixes a bug where the optional element method-intf
  was required.
  
  Revision  ChangesPath
  1.2   +2 -3  jboss/src/main/org/jboss/metadata/QueryMetaData.java
  
  Index: QueryMetaData.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/QueryMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QueryMetaData.java2001/06/24 01:06:16 1.1
  +++ QueryMetaData.java2001/07/26 22:09:41 1.2
  @@ -17,7 +17,7 @@
* Contains information about ejb-ql queries.
* 
* @author a href=mailto:[EMAIL PROTECTED];Dain Sundstrom/a
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
*/
   public class QueryMetaData extends MetaData {
// Constants -
  @@ -81,8 +81,7 @@

// method interface
methodIntf = getElementContent(getOptionalChild(queryMethod, 
method-intf));
  - if(!HOME.equals(methodIntf) 
  - !LOCAL_HOME.equals(methodIntf)) {
  + if(methodIntf!=null  !HOME.equals(methodIntf)  
!LOCAL_HOME.equals(methodIntf)) {
throw new DeploymentException(result-type-mapping must be ' 
+ 
HOME + ', ' + 
LOCAL_HOME + ', if 
specified);
  
  
  

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata QueryMetaData.java

2001-06-23 Thread dsundstrom

  User: dsundstrom
  Date: 01/06/23 18:06:16

  Added:   src/main/org/jboss/metadata QueryMetaData.java
  Log:
  Contains information about ejb-ql queries.
  
  Revision  ChangesPath
  1.1  jboss/src/main/org/jboss/metadata/QueryMetaData.java
  
  Index: QueryMetaData.java
  ===
  /*
   * JBoss, the OpenSource EJB server
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  package org.jboss.metadata;
  
  import java.util.ArrayList;
  import java.util.Iterator;
  
  import org.w3c.dom.Element;
  
  import org.jboss.ejb.DeploymentException;
  
  /**
   * Contains information about ejb-ql queries.
   * 
   * @author a href=mailto:[EMAIL PROTECTED];Dain Sundstrom/a
   * @version $Revision: 1.1 $
   */
  public class QueryMetaData extends MetaData {
// Constants -
public final static String REMOTE = Remote;
public final static String LOCAL = Local;
  
public final static String HOME = Home;
public final static String LOCAL_HOME = LocalHome;

// Attributes 
private String description;
private String methodName;
private String methodIntf;
private ArrayList methodParams;
private String resultTypeMapping;
private String ejbQl;

// Static 

// Constructors --
public QueryMetaData () {
methodParams = new ArrayList();
}

// Public 

public String getDescription() {
return description;
}

public String getMethodName() {
return methodName;
}

public String getMethodIntf() {
return methodIntf;
}

public Iterator getMethodParams() {
return methodParams.iterator();
}

public String getResultTypeMapping() {
return resultTypeMapping;
}
  
public String getEjbQl() {
return ejbQl;
}
  
  
public void importEjbJarXml(Element element) throws DeploymentException {
// description
description = getElementContent(getOptionalChild(element, 
description));

// query-method sub-element
Element queryMethod = getUniqueChild(element, query-method);

// method name
methodName = getElementContent(getUniqueChild(queryMethod, 
method-name));

// method interface
methodIntf = getElementContent(getOptionalChild(queryMethod, 
method-intf));
if(!HOME.equals(methodIntf) 
!LOCAL_HOME.equals(methodIntf)) {
throw new DeploymentException(result-type-mapping must be ' 
+ 
HOME + ', ' + 
LOCAL_HOME + ', if 
specified);
}
  
// method params
Element methodParamsElement = getUniqueChild(queryMethod, 
method-params);
Iterator iterator = getChildrenByTagName(methodParamsElement, 
method-param);  
while (iterator.hasNext()) {
methodParams.add(getElementContent((Element)iterator.next()));
}
  
// result type mapping
resultTypeMapping = getElementContent(getOptionalChild(element, 
result-type-mapping));
if(resultTypeMapping == null) {
resultTypeMapping = LOCAL;
}
if(!REMOTE.equals(resultTypeMapping) 
!LOCAL.equals(resultTypeMapping)) {
throw new DeploymentException(result-type-mapping must be ' 
+ REMOTE + ' or ' + LOCAL + ', if specified);
}
  
ejbQl = getElementContent(getUniqueChild(element, ejb-ql));
}   
  
  }
  
  
  

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