You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Emmanuel Dupont <em...@jwaretechnologies.com> on 2003/03/18 14:35:02 UTC

RE : how to manipulate many repository

Yes !


-----Message d'origine-----
De : TINE Houari (OBJECTIVA) [mailto:houari.tine@ca-cedicam.fr] 
Envoyé : mardi 18 mars 2003 14:18
À : 'OJB Users List'
Objet : how to manipulate many repository

Hi,

I want to handle many repository in the same projet. But the first parameter
of createPersistenceBroker(RepositoryFile, String, String) don't correspond
of the file name: it seems to correspond to jcd-alias. That right?

Houar

 -----Message d'origine-----
De : 	TINE Houari (OBJECTIVA) [mailto:houari.tine@ca-cedicam.fr] 
Envoyé :	mardi 18 mars 2003 13:59
À :	'OJB Users List'
Objet :	RE: how to obtain the SQL code from a Query object?

Hi,

I use P6Spy to see generated sql at runtime.

Houar

 -----Message d'origine-----
De : 	Mahler Thomas [mailto:thomas.mahler@itellium.com] 
Envoyé :	lundi 17 mars 2003 17:46
À :	'OJB Users List'
Objet :	RE: how to obtain the SQL code from a Query object?

Mhh,

I don't know all API changes since 0.9.5 by heart, but the
SqlGeneratorFactory is really a very old piece of code.
have a look in the org.apache.ojb.broker.accesslayer.sql package

Maybe you can also instaiate SqlGenerator directly?!

cheers,
Thomas

> -----Original Message-----
> From: Sylvain.Thevoz@swisscom.com [mailto:Sylvain.Thevoz@swisscom.com]
> Sent: Monday, March 17, 2003 4:30 PM
> To: ojb-user@db.apache.org
> Subject: RE: how to obtain the SQL code from a Query object?
> 
> 
> Thomas,
> 
> Thanks for your help!
> 
> How do you use this SqlGeneratorFactory. This class doesn't 
> seem to be in OJB 0.9.5.
> 
> I think that I could migrate to 1.0 but I don't know what 
> exactly I will have to change in my code.
> 
> Best.
> Sylvain
> 
> -----Message d'origine-----
> De: Mahler Thomas [mailto:thomas.mahler@itellium.com]
> Date: lundi, 17. mars 2003 16:12
> À: 'OJB Users List'
> Objet: RE: how to obtain the SQL code from a Query object?
> 
> 
> Hi Sylvain,
> 
> I think so!
> But you can use the SqlGeneratorFactory to obtain a 
> SqlGenerator instance
> instead!
> 
> cheers,
> Thomas
> 
> > -----Original Message-----
> > From: Sylvain.Thevoz@swisscom.com 
> [mailto:Sylvain.Thevoz@swisscom.com]
> > Sent: Monday, March 17, 2003 3:59 PM
> > To: ojb-user@db.apache.org
> > Subject: RE: how to obtain the SQL code from a Query object?
> > 
> > 
> > Hi Thomas,
> > 
> > I can't find the broker.serviceSqlGenerator() method.
> > 
> > I'm using OJB 0.9.5.
> > Is it the problem?
> > 
> > Thanks
> > Sylvain
> > 
> > 
> > 
> > -----Message d'origine-----
> > De: Mahler Thomas [mailto:thomas.mahler@itellium.com]
> > Date: lundi, 17. mars 2003 10:59
> > À: 'OJB Users List'
> > Objet: RE: how to obtain the SQL code from a Query object?
> > 
> > 
> > The Query object is not able to return SQL code, as it does 
> > not have any
> > platform specific know how.
> > You have to ask the OJB SqlGenerator component to generate SQL:
> > 
> > PersistenceBroker broker = ...
> > Query query = ...;
> > ClassDescriptor cld = ...;
> > 
> > // obtain prepared stmt sql:
> > String sql = 
> > broker.serviceSqlGenerator().getPreparedSelectStatement(query,
> > cld);
> > 
> > // obtain no prepared sql: 
> > sql = 
> broker.serviceSqlGenerator().getSelectStatementDep(query, cld);
> > 
> > cheers,
> > thomas
> > 
> > > -----Original Message-----
> > > From: Sylvain.Thevoz@swisscom.com 
> > [mailto:Sylvain.Thevoz@swisscom.com]
> > > Sent: Monday, March 17, 2003 10:32 AM
> > > To: ojb-user@db.apache.org
> > > Subject: how to obtain the SQL code from a Query object?
> > > 
> > > 
> > > Hello,
> > > 
> > > I have this query:
> > > 
> > > ----code----
> > > Criteria crit = new Criteria();
> > > crit.addEqualTo("workstationName", "U68111");
> > > 
> > > Query query = new QueryByCriteria(Workstation.class, crit, true);
> > > ----code----
> > > 
> > > Is there a way to obtain the SQL query (select * from 
> > > Workstation where....) from the query object?
> > > 
> > > Thanks
> > > Sylvain
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: ojb-user-help@db.apache.org
> > > 
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


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

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

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