You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dg...@apache.org on 2003/11/09 22:16:40 UTC

cvs commit: jakarta-commons-sandbox/mapper/xdocs index.xml

dgraham     2003/11/09 13:16:40

  Modified:    mapper/xdocs index.xml
  Log:
  Removed JDBC examples because DbUtils takes care
  of that.
  
  Revision  Changes    Path
  1.3       +16 -55    jakarta-commons-sandbox/mapper/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/mapper/xdocs/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml	9 Sep 2003 00:51:39 -0000	1.2
  +++ index.xml	9 Nov 2003 21:16:40 -0000	1.3
  @@ -24,10 +24,23 @@
   Commons Mapper is a thin abstraction layer around a project's chosen data mapping
   technology.  It allows the developer to vary the mapping technique behind
   this layer (often combining several technologies) so that the rest of the 
  -application doesn't change.  Technologies such as EJB, JDO, Hibernate, XML, 
  -and JDBC can all be used to map Java objects to a data store. 
  +application doesn't change.  Technologies such as these can be used to map 
  +Java objects to a data store:
   </p>
   
  +<ul>
  +<li>
  +    <a href="http://java.sun.com/products/jdbc/">JDBC</a> -Using 
  +    <a href="http://jakarta.apache.org/commons/dbutils/">Jakarta Commons DbUtils</a> 
  +    will make JDBC coding significantly easier.
  +</li>
  +<li><a href="http://java.sun.com/products/jdo/">JDO</a></li>
  +<li><a href="http://java.sun.com/products/ejb/">EJB</a></li>
  +<li><a href="http://www.hibernate.org/">Hibernate</a></li>
  +<li><a href="http://www.ibatis.com/">iBatis</a></li>
  +<li>XML</li>
  +</ul>
  +
   <p>
   The purpose of Mapper is similar to Commons Logging.  It isn't a mapping technology
   itself, it merely exposes common functionality of other mapping APIs.
  @@ -47,16 +60,11 @@
   Commons Mapper is <strong>not</strong> a data mapping implementation.  It is meant
   to be an API allowing pluggable mapper objects of varying implementations.
   </p>
  -<p>
  -The package also contains well factored JDBC helper classes that reduce the burden
  -of using JDBC as a data mapping tool.  This functionality could be placed in a 
  -different package if needed.
  -</p>
   
   </section>
   
   <section name="Interaction With Other Packages">
  -    <p>Commons Mapper relies on the standard JDK 1.2 (or later) APIs.</p>
  +    <p>Commons Mapper relies on the standard Java 1.2 (or later) APIs.</p>
   </section>
   
   <section name="Example Usage">
  @@ -109,53 +117,6 @@
   </pre>
   
   </section>
  -
  -<section name="JDBC Utilities">
  -<p>
  -The other component in Commons Mapper is a set of JDBC helper classes and interfaces.
  -Using these classes has several advantages:
  -</p>
  -<ul>
  -	<li>
  -	No possibility for resource leaks.  Correct JDBC coding isn't difficult but
  -	it is time-consuming and tedious.  This often leads to connection leaks that may
  -	be difficult to track down.
  -	</li>
  -	<li>
  -	Cleaner, clearer persistence code.  The amount of code needed to persist objects
  -	in a database is drastically reduced. The remaining code clearly expresses your
  -    intention without being cluttered with resource cleanup.
  -	</li>
  -</ul>
  -</section>
  -
  -<section name="JDBC Example">
  -	<p>
  -		This code could be part of a JdbcPersonMapper class that you write
  -		to perist Person objects in your application.
  -	</p>
  -	<pre>
  -	// Define a ResultSetProcessor instance to create Person objects
  -	private static final ResultSetProcessor makePerson = 
  -		new ResultSetRowProcessor() {
  -		public Object processRow(ResultSet rs) {
  -			Person p = new Person();
  -			p.setFirstName(rs.getString("firstName"));
  -			// set other properties from ResultSet...
  -			
  -			return p;
  -		}	
  -	};
  -	
  -	// Implement findAllObjects from the Mapper interface with a one
  -	// line call to a JdbcHelper instance.  No connections, statements,
  -	// or cleanup required!
  -	public Collection findAllObjects() {
  -		return this.helper.executeQuery(this.getQuery("person.findAll"), makePerson);
  -	}
  -	</pre>
  -</section>
  -
   
   </section>
   
  
  
  

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