struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yansheng Lin" <yansheng....@isogis.com>
Subject RE: generic SQL implementation
Date Mon, 07 Jul 2003 17:24:54 GMT
I don't quite understand the data access part of the Mapper project.  How do you
initialize a new Jdbc connection?   Shouldn't there be a JdbcFactory class
similar to MapperFactory class, where you could pass the connection properties?

+  public JdbcFactoryTest(String, java.util.Properties) {
+  }

similar to the following test:

    public MapperFactoryTest(String name) {
        super(name);

        this.mappers.put("testMapper", "org.apache.commons.mapper.TestMapper");
        this.mappers.put(
            "java.util.ArrayList",
            "org.apache.commons.mapper.TestMapper");
    }


-----Original Message-----
From: David Graham [mailto:grahamdavid1980@yahoo.com] 
Sent: July 7, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Re: generic SQL implementation


Mapper doesn't have a real website yet but you can view the source online
at:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/mapper/

You could also check it out of the cvs repository.

David

--- Vinay <vinay@mdp.net> wrote:
> David,
> 
> Can you give me the URL for the mapper, this might be the one I am
> looking
> for ,even though I wanted to implement the API on my own.
> 
> Thanks a lot
> VInay
> ----- Original Message ----- 
> From: "David Graham" <grahamdavid1980@yahoo.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Monday, July 07, 2003 11:35 AM
> Subject: Re: generic SQL implementation
> 
> 
> > There is a Mapper project in the commons sandbox that might help you. 
> It
> > allows you to store SQL in a properties file to remove it from your
> code.
> > Also, it acts as a layer between your app and your persistence
> technology
> > so you can swap in an O/R mapping tool, EJBs, etc if you decide
> against
> > using JDBC in the future.  It also, makes using JDBC a breeze and
> removes
> > much error prone and repetitive code from your app.
> >
> > David
> >
> >
> > --- Vinay <vinay@mdp.net> wrote:
> > >
> > >
> > > Has anybody implemented a generic implementation for querying
> databases
> > > during runtime. I am  using  DAO's for data access layer. But I want
> to
> > > furthur move the database logic to down one more layer of
> abstraction.I
> > > am dealing with different kinds of database (eg. let's say a MySQL,
> MS
> > > Access and another not SQL at all ,index sequential files). I want
> the
> > > DAO to access the database during runtime. So I want my DAO to be
> > > independent of the SQL statements.The Database Interfrace would talk
> to
> > > either MySQL,or Oracle or any other database.So that  there is no 
> need
> > > to have  DAO for each database syntax, rather , this should be
> handled
> > > by a API thru an interface.
> > >
> > > Here's and examples
> > >
> > > Let's say for select statement , we supply table name, column names,
> > > where cluase , and's etc
> > >
> > > The following method should handle the query
> > >
> > > List getSelect(String tablename, List columnnames, List
> Orderby,.....)
> > > etc {
> > >
> > >
> > > return queryresult
> > > }
> > >
> > >
> > > Any ideas appreciated
> > > Thank you
> > > Vinay
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> 
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


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


Mime
View raw message