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/sql StorageBeanBase.java ResultSetUtils.java
Date Thu, 12 Sep 2002 12:36:42 GMT
husted      2002/09/12 05:36:42

  Modified:    scaffold/src/java/org/apache/commons/scaffold/sql
                        StorageBeanBase.java ResultSetUtils.java
  Log:
  + Replace calls to BeanUtils.populate with copyProperties.
  + Migrate to latest commons.beanutil.BeanUtils.
  + StorageBeanBase: change marked default to 1 (nominal).
  
  Revision  Changes    Path
  1.8       +22 -7     jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/StorageBeanBase.java
  
  Index: StorageBeanBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/StorageBeanBase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StorageBeanBase.java	9 Sep 2002 20:37:05 -0000	1.7
  +++ StorageBeanBase.java	12 Sep 2002 12:36:42 -0000	1.8
  @@ -8,8 +8,8 @@
   import java.util.Map;
   import java.util.Properties;
   
  -// 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.ParameterException;
   import org.apache.commons.scaffold.lang.PopulateException;
  @@ -277,9 +277,9 @@
        * Records to be deleted are marked and may be
        * restored before they are removed from the
        * database.
  -     * The default value is "0" - not marked.
  +     * The default value is "1" - nominal.
        */
  -    private Short marked = ConvertUtils.SHORT_ZERO;
  +    private Short marked = ConvertUtils.SHORT_ONE;
   
   
       /**
  @@ -308,7 +308,7 @@
       public void populate(Map parameters) throws Exception {
   
           if (parameters!=null) {
  -            BeanUtils.populate(this,parameters);
  +            BeanUtils.copyProperties(this,parameters);
           }
   
       } // end populate
  @@ -334,6 +334,21 @@
       } // end executeUpdate
   
   
  +    public void executeUpdateRoot(String command)
  +            throws ResourceException {
  +
  +        try {
  +
  +             int result = StatementUtils.executeUpdate(
  +                 null,getCommandRoot(command));
  +
  +        }
  +        catch (SQLException e) {
  +            throw new ResourceException(e);
  +        }
  +
  +    } // end executeUpdate
  +
   // --------------------------------------------------------------------- Retrieval Methods
   
   
  @@ -952,7 +967,7 @@
   
           return result;
   
  -    } // end execute
  +    } // end restore
   
   } // end StorageBeanBase
   
  
  
  
  1.2       +5 -5      jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/ResultSetUtils.java
  
  Index: ResultSetUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/scaffold/src/java/org/apache/commons/scaffold/sql/ResultSetUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultSetUtils.java	14 Aug 2002 17:51:42 -0000	1.1
  +++ ResultSetUtils.java	12 Sep 2002 12:36:42 -0000	1.2
  @@ -21,10 +21,10 @@
   import java.util.Iterator;
   import java.util.Map;
   
  -// import org.apache.commons.beanutils.BeanUtils; // Struts 1.1
  -// import org.apache.commons.beanutils.PropertyUtils; // Struts 1.1
  -import org.apache.struts.util.BeanUtils; // Struts 1.0.x
  -import org.apache.struts.util.PropertyUtils; // 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
   
   
    /**
  
  
  

--
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