>
> I went thro' org.apache.turbine.om.peer.BasePeer.java class which is
> supposed to be the super class for all the peer classes generated by
> Torque. Method "doDelete" in BasePeer class does support Cascading
deletes,
> if Criteria for delete is set like that. So Turbine code has to set the
> delete as Cascade in Criteria object and then it will work fine (so may be
> then we have to touch Turbine code as well). I am saying this by looking
at
> the BasePeer.java code. **Some one has to confirm this.***
>
> My question is:
> Once we decide to use TURBINE tables as foreign key tables for respective
> tables in JETSPEED PSML, then,
> do we have to chnage the XML Database schema file for TURBINE to include
> all the Jetspeed Psml related Tables?
> Basically, point is do we have to regenerate Torque/Peer classes for
> Turbine? Or will TurbineMapBuilder figure that out, at run time, if all
the
> tables exist in same database?

I don't think that is necessary. Here is a Torque foreign key definition
taken from the Turbine site:

...
    <foreign-key foreignTable="SCARAB_ATTRIBUTE">
        <reference local="ATTRIBUTE_ID" foreign="ATTRIBUTE_ID"/>
    </foreign-key>


>
>
>
> >There should be some search keys defined. Taking the
JETSPEED_USER_PROFILE,
> >here are some common use cases  :
> >
> >- lookup the PSML page for the current user + the current request
> >parameters:
> >LOGIN_NAME + MEDIA_TYPE + LANGUAGE + COUNTRY
> >
> >- lookup the PSML page by name for the current user + current request
> >parameters:
> >LOGIN_NAME + MEDIA_TYPE + LANGUAGE + COUNTRY + PAGE
> >
> >One index would handle both above:
> >LOGIN_NAME + MEDIA_TYPE + LANGUAGE + COUNTRY + PAGE
> >
> >Another case I can think of is find all PSML for the given user,
sometimes
> >restricted by media type.
> >Again, the above index covers that.
>
> Yes, makes sense to index all those columns.
>
> >I believe country codes and language codes are always 2 characters wide,
but
> >definately not these two:
>
> I am changing Country and Language to 2 characters.
>
> > >      <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
> > >      <column name="PAGE" size="99" type="VARCHAR"/>
>
> Yes.
>
>
> >Im not very familiar with Torque anymore, but the "99" looks very numeric
> >too me, esp. for fields like media_type and page, which would normally
> >contain strings. If you are restricting the COUNTRY and LANGUAGE to
numeric,
>
> No, they are VARCHARs.
>

Right - thats the size=99, sorry my mistake, late night and tired eyes. But
yes, 99 is too large.

> -Atul
>
> >then thats a problem too. Guess I need to re-readup on Torque,
> >
> >David
> >
> >
> >
> > > -----Original Message-----
> > > From: Atul Dambalkar [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, September 04, 2001 2:15 PM
> > > To: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> > > [EMAIL PROTECTED]
> > > Subject: XML Database schema for DatabasePsmlManager Implementation
> > >
> > >
> > > Hi Jon, David,
> > >
> > > Here is the XML Database schema for putting PSML information
> > > along with
> > > user/role/group profile. Please review it.
> > > =======================================================
> > > <app-data>
> > >
> > > <database defaultIdMethod="idbroker"
> > >            basePeer="org.apache.turbine.om.peer.BasePeer" >
> > >
> > >    <table name="JETSPEED_USER_PROFILE" idMethod="idbroker">
> > >
> > >      <column name="USER_ID" required="true" autoIncrement="true"
> > >              primaryKey="true" type="INTEGER"/>
> > >      <column name="LOGIN_NAME" required="true" size="32"
> > > type="VARCHAR"/>
> > >      <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
> > >      <column name="LANGUAGE" size="99" type="VARCHAR"/>
> > >      <column name="COUNTRY" size="99" type="VARCHAR"/>
> > >      <column name="PAGE" size="99" type="VARCHAR"/>
> > >      <column name="PROFILE" type="VARBINARY"/>
> > >
> > >      <unique>
> > >         <unique-column name="LOGIN_NAME" />
> > >      </unique>
> > >
> > >    </table>
> > >
> > >    <table name="JETSPEED_GROUP_PROFILE" idMethod="idbroker">
> > >
> > >      <column name="GROUP_ID" required="true" autoIncrement="true"
> > >              primaryKey="true" type="INTEGER"/>
> > >      <column name="GROUP_NAME" required="true" size="99"
> > > type="VARCHAR"/>
> > >      <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
> > >      <column name="LANGUAGE" size="99" type="VARCHAR"/>
> > >      <column name="COUNTRY" size="99" type="VARCHAR"/>
> > >      <column name="PAGE" size="99" type="VARCHAR"/>
> > >      <column name="PROFILE" type="VARBINARY"/>
> > >      <unique>
> > >         <unique-column name="GROUP_NAME" />
> > >      </unique>
> > >
> > >    </table>
> > >
> > >    <table name="JETSPEED_ROLE_PROFILE" idMethod="idbroker">
> > >
> > >      <column name="ROLE_ID" required="true" autoIncrement="true"
> > >              primaryKey="true" type="INTEGER"/>
> > >      <column name="ROLE_NAME" required="true" size="99"
> > > type="VARCHAR"/>
> > >      <column name="MEDIA_TYPE" size="99" type="VARCHAR"/>
> > >      <column name="LANGUAGE" size="99" type="VARCHAR"/>
> > >      <column name="COUNTRY" size="99" type="VARCHAR"/>
> > >      <column name="PAGE" size="99" type="VARCHAR"/>
> > >      <column name="PROFILE" type="VARBINARY"/>
> > >
> > >      <unique>
> > >         <unique-column name="ROLE_NAME" />
> > >      </unique>
> > >
> > >    </table>
> > >
> > > </database>
> > > ===============================================================
> > >
> > > I could generate all the peer classes, but "torque" fails if
> > > I try to use
> > > "native" as idMethod. So I have to use "idbroker".
> > >
> > > Questions:
> > > 1. The generated package name, I decided as:
> > > "org.apache.jetspeed.om.dbpsml" Is that okay?
> > > 2. The basePeer for generated peer classes is
> > > org.apache.turbine.om.peer.BasePeer. Hope that's correct...
> > >
> > > Also, how could we automate the process of generating
> > > database specific
> > > peer classes, when some one decides to use it for let's say
> > > MSSQL? Right
> > > now I am trying it with Oracle.. Currently I have generated
> > > all the peer
> > > classes with stand-alone version of Torque and manually
> > > copied them under
> > > Jetspeed cources, and got all compiled.
> > >
> > > Christopher, now, you don't have to define a separate schema
> > > in MSSQL, the
> > > above Torque schema will handle all the different database cases.
> > >
> > > -Atul
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to