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

2004-04-10 Thread dgraham
dgraham 2004/04/10 12:55:33

  Modified:mapper/xdocs index.xml
  Log:
  Cleaned up sections.
  
  Revision  ChangesPath
  1.6   +0 -5  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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.xml 14 Mar 2004 23:50:36 -  1.5
  +++ index.xml 10 Apr 2004 19:55:33 -  1.6
  @@ -10,8 +10,6 @@
   
   section name=Mapper: Data Mapping Abstraction Component
   
  -section name=Purpose
  -
   p
   Most Java applications must store data to a data store whether it's XML files or
   a relational database.  Changes to the mapping technology should be transparent
  @@ -116,9 +114,6 @@
   /source
   
   /section
  -
  -/section
  -
   
   /body
   /document
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2004-03-14 Thread dgraham
dgraham 2004/03/14 15:50:36

  Modified:mapper/xdocs index.xml
  Log:
  Use source instead of pre for code.
  
  Revision  ChangesPath
  1.5   +2 -2  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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- index.xml 14 Mar 2004 23:42:25 -  1.4
  +++ index.xml 14 Mar 2004 23:50:36 -  1.5
  @@ -82,7 +82,7 @@
   interface.  The majority of mapping work can be accomplished through the methods in 
this
   interface with specialized methods added to specific Mappers as needed.
   /p
  -pre
  +source
   // 1. Setup MapperFactory (this is best done with a .properties file).
   // The keys in the file are fully qualified class names of objects to
   // persist.  The values are the fully qualified class names of the Mapper
  @@ -113,7 +113,7 @@
   Person p = new Person(Joe, User);
   Mapper m = factory.getMapper(Person.class);
   m.create(p);
  -/pre
  +/source
   
   /section
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2003-11-09 Thread dgraham
dgraham 2003/11/09 13:16:40

  Modified:mapper/xdocs index.xml
  Log:
  Removed JDBC examples because DbUtils takes care
  of that.
  
  Revision  ChangesPath
  1.3   +16 -55jakarta-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 -   1.2
  +++ index.xml 9 Nov 2003 21:16:40 -   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
  +lia href=http://java.sun.com/products/jdo/;JDO/a/li
  +lia href=http://java.sun.com/products/ejb/;EJB/a/li
  +lia href=http://www.hibernate.org/;Hibernate/a/li
  +lia href=http://www.ibatis.com/;iBatis/a/li
  +liXML/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 strongnot/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
  -pCommons Mapper relies on the standard JDK 1.2 (or later) APIs./p
  +pCommons 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]