commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject cvs commit: jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util StorageBean.java ResultListBase.java ResultList.java ProcessResultBase.java ProcessBeanBase.java
Date Thu, 12 Sep 2002 12:38:14 GMT
husted      2002/09/12 05:38:14

  Modified:    scaffold/src/java/org/apache/commons/scaffold/util
                        StorageBean.java ResultListBase.java
                        ResultList.java ProcessResultBase.java
                        ProcessBeanBase.java
  Log:
  + Replace calls to BeanUtils.populate with copyProperties.
  + Migrate to latest commons.beanutil.BeanUtils.
  
  Revision  Changes    Path
  1.4       +15 -2     jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/StorageBean.java
  
  Index: StorageBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/StorageBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StorageBean.java	9 Sep 2002 20:36:55 -0000	1.3
  +++ StorageBean.java	12 Sep 2002 12:38:14 -0000	1.4
  @@ -165,6 +165,19 @@
   
   
       /**
  +     * Lookup command (sans prefix) and execute "update" query to create a table,
  +     * seed it with data, et cetera.
  +     * <p>
  +     * @param command Name of command to execute
  +     * @exception Resource exception if data access error occurs
  +     * @author Ted Husted
  +     * @version $Revision$ $Date$
  +     */
  +    public void executeUpdateRoot(String command)
  +            throws ResourceException;
  +
  +
  +    /**
        * Retrieve object from data storage.
        * <P>
        * <B>NOTE</B> that the precursor to this inteface,
  
  
  
  1.2       +7 -5      jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ResultListBase.java
  
  Index: ResultListBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ResultListBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultListBase.java	14 Aug 2002 17:52:18 -0000	1.1
  +++ ResultListBase.java	12 Sep 2002 12:38:14 -0000	1.2
  @@ -7,8 +7,10 @@
   import java.util.List;
   import java.util.Map;
   
  -// import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  -import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.PropertyUtils; // Struts 1.0.x
  +import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  +import org.apache.commons.beanutils.PropertyUtils; // Struts 1.1
   
   import org.apache.commons.scaffold.lang.ChainedException;
   import org.apache.commons.scaffold.lang.Tokens;
  @@ -322,7 +324,7 @@
       /**
        * Populate matching properties on given object,
        * using bean at given index. Returns false if index>size.
  -     * <code>BeanUtils.describe</code>.
  +     * <code>PropertyUtils.describe</code>.
        * @exception Throws StateException on any error.
        */
       public boolean populate(Object o, int index) throws Exception {
  @@ -331,7 +333,7 @@
               bean = get(index);
           if (bean==null) return false;
           try {
  -            BeanUtils.populate(o,BeanUtils.describe(bean));
  +            BeanUtils.copyProperties(o,bean);
           } catch (Throwable t) {
               throw new ChainedException(t);
           }
  
  
  
  1.2       +6 -4      jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ResultList.java
  
  Index: ResultList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ResultList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultList.java	14 Aug 2002 17:52:18 -0000	1.1
  +++ ResultList.java	12 Sep 2002 12:38:14 -0000	1.2
  @@ -7,8 +7,10 @@
   import java.util.List;
   import java.util.Map;
   
  -// import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  -import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.PropertyUtils; // Struts 1.0.x
  +import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  +import org.apache.commons.beanutils.PropertyUtils; // Struts 1.1
   
   import org.apache.commons.scaffold.lang.ChainedException;
   
  @@ -226,7 +228,7 @@
       /**
        * Populate matching properties on given object,
        * using bean at given index. Returns false if index>size.
  -     * <code>BeanUtils.describe</code>.
  +     * <code>PropertyUtils.describe</code>.
        * @exception Throws StateException on any error.
        */
       public boolean populate(Object o, int index) throws Exception;
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ProcessResultBase.java
  
  Index: ProcessResultBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ProcessResultBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProcessResultBase.java	14 Aug 2002 17:52:18 -0000	1.1
  +++ ProcessResultBase.java	12 Sep 2002 12:38:14 -0000	1.2
  @@ -6,8 +6,8 @@
   import java.util.Iterator;
   import java.util.List;
   
  -// import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  -import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
   
   import org.apache.commons.scaffold.lang.Tokens;
   
  
  
  
  1.3       +4 -4      jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ProcessBeanBase.java
  
  Index: ProcessBeanBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/util/ProcessBeanBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProcessBeanBase.java	16 Aug 2002 22:28:42 -0000	1.2
  +++ ProcessBeanBase.java	12 Sep 2002 12:38:14 -0000	1.3
  @@ -5,8 +5,8 @@
   import java.util.Map;
   
   
  -// import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  -import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +// import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  +import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
   
   import org.apache.commons.scaffold.lang.ChainedException;
   
  @@ -107,7 +107,7 @@
   
           if (parameters!=null) {
               Map map = (Map) parameters;
  -            BeanUtils.populate(this,map);
  +            BeanUtils.copyProperties(this,map);
           }
   
           return execute();
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message