Hi Quinton,
thanks for your answer. I tried to add the classname as a parameter, but it 
didn't help. I'm currently avoiding the problem by reading the value directly 
via sql and setting it in the User object, but that's more a workaround ...
Stefan

Am Thursday 13 March 2003 16:11 schrieb Quinton McCombs:
> No.  That will assign Turbine's default map builder.  You need to use the
> TurbineMapBuilderAdapter instead.  Look at the same code in the howto
> again.
>
> --------------------------------------------
> Quinton McCombs
> NequalsOne - HealthCare marketing tools
> mailto:[EMAIL PROTECTED]
> http://www.NequalsOne.com
>
> > -----Original Message-----
> > From: Stefan Kuhn [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 13, 2003 3:02 AM
> > To: Turbine Users List
> > Subject: Re: Problems extending TURBINE_USER
> >
> >
> > Hi Quinton,
> > thanks for your help. I must admit I don't understand the
> > problem. I do:
> >
> > private static final TurbineMapBuilderAdapter mapBuilder
> > =(TurbineMapBuilderAdapter) getMapBuilder();
> >
> > Isn't that the right one ?
> > Thanks
> > Stefan
> >
> > Am Wednesday 12 March 2003 23:01 schrieb Quinton McCombs:
> > > It looks like your assignment statement for the map builder in
> > > TurbineUserAdapterPeer is incorrent.  You should be setting it to
> > > TurbineMapBuilderAdapter.
> > >
> > > --------------------------------------------
> > > Quinton McCombs
> > > NequalsOne - HealthCare marketing tools
> >
> > mailto:[EMAIL PROTECTED]
> >
> > > http://www.NequalsOne.com
> > >
> > > > -----Original Message-----
> > > > From: Stefan Kuhn [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, March 12, 2003 1:28 PM
> > > > To: Turbine Users List
> > > > Subject: RE: Problems extending TURBINE_USER
> > > >
> > > >
> > > > Thanks for your reply. Here the classes:
> > > > TurbineUserAdapter (leaving out the remaining getters/setters,
> > > > brokensubmit ist the one not working):
> > > > package org.openscience.nmrshiftdb.om;
> > > >
> > > > import org.apache.turbine.om.security.TurbineUser;
> > > > import org.apache.turbine.om.NumberKey;
> > > >
> > > > public class TurbineUserAdapter extends
> > > > org.apache.turbine.om.security.TurbineUser
> > > > {
> > > >         public static final String TITLE = "TITLE";
> > > >         public static final String ADDRESS = "ADDRESS";
> > > >         public static final String CITY = "CITY";
> > > >         public static final String STATE = "STATE";
> > > >         public static final String ZIP_CODE = "ZIP_CODE";
> > > >         public static final String COUNTRY = "COUNTRY";
> > > >         public static final String WEB_PAGE = "WEB_PAGE";
> > > >         public static final String AFFILIATION = "AFFILIATION";
> > > >         public static final String BROKENSUBMIT = "BROKENSUBMIT";
> > > >
> > > >         public NumberKey getUserId()
> > > >         {
> > > >                 return(NumberKey) getPrimaryKey();
> > > >         }
> > > >
> > > >         public void setBrokenSubmit(String affiliation)
> > > >         {
> > > >                 setPerm(BROKENSUBMIT, affiliation);
> > > >         }
> > > >
> > > > ...
> > > >         public String getBrokenSubmit()
> > > >         {
> > > >                 String tmp = null;
> > > >                 try
> > > >                 {
> > > >                         tmp = (String) getPerm(BROKENSUBMIT);
> > > >                         if ( tmp.length() == 0 )
> > > >                                 tmp = null;
> > > >                 }
> > > >                 catch ( Exception e )
> > > >                 {
> > > >                 }
> > > >                 return tmp;
> > > >         }
> > > > }
> > > >
> > > > TurbineUserAdapterPeer (not TurbineUserPeerAdapter, but this
> > > > shouldn't
> > > > matter?):
> > > > package org.openscience.nmrshiftdb.om;
> > > >
> > > > import java.util.Vector;
> > > >
> > > > import org.apache.turbine.om.security.peer.TurbineUserPeer;
> > > > import
> > > > org.openscience.nmrshiftdb.util.db.map.TurbineMapBuilderAdapter;
> > > >
> > > > public class TurbineUserPeerAdapter extends
> > > > org.apache.turbine.om.security.peer.TurbineUserPeer
> > > > {
> > > >         private static final TurbineMapBuilderAdapter mapBuilder =
> > > > (TurbineMapBuilderAdapter) getMapBuilder();
> > > >
> > > >         public static final String TITLE =
> >
> > mapBuilder.getUser_Title();
> >
> > > >         public static final String ADDRESS =
> > > > mapBuilder.getUser_Address();
> > > >         public static final String CITY =
> >
> > mapBuilder.getUser_City();
> >
> > > >         public static final String STATE =
> >
> > mapBuilder.getUser_State();
> >
> > > >         public static final String ZIP_CODE =
> > > > mapBuilder.getUser_ZipCode();
> > > >         public static final String COUNTRY =
> > > > mapBuilder.getUser_Country();
> > > >         public static final String WEB_PAGE =
> > > > mapBuilder.getUser_WebPage();
> > > >         public static final String AFFILIATION =
> > > > mapBuilder.getUser_Affiliation();
> > > >   public static final String BROKENSUBMIT =
> > > > mapBuilder.getUser_BrokenSubmit();
> > > > }
> > > >
> > > > TurbineMapBuilderAdapter (leaving out the getters again): package
> > > > org.openscience.nmrshiftdb.util.db.map;
> > > >
> > > > import java.util.Date;
> > > >
> > > > import org.apache.turbine.services.db.TurbineDB;
> > > > import org.apache.turbine.util.db.map.TableMap;
> > > > import org.apache.turbine.util.db.map.TurbineMapBuilder;
> > > >
> > > > public class TurbineMapBuilderAdapter extends TurbineMapBuilder {
> > > >         public String getTitle()
> > > >         {
> > > >                 return "TITLE";
> > > >         }
> > > >
> > > >         public String getUser_Title()
> > > >         {
> > > >                 return getTableUser() + '.' +getTitle();
> > > >         }
> > > >
> > > >         public void doBuild() throws java.lang.Exception
> > > >         {
> > > >                 super.doBuild();
> > > >
> > > >                 // Make some objects
> > > >                 String string = new String("");
> > > >                 Integer integer = new Integer(0);
> > > >                 java.util.Date date = new Date();
> > > >
> > > >                 // Add extra User columns.
> > > >                 TableMap tMap =
> > > > TurbineDB.getDatabaseMap().getTable(getTableUser());
> > > >                 tMap.addColumn(getTitle(), string);
> > > >                 tMap.addColumn(getAddress(), string);
> > > >                 tMap.addColumn(getCity(), string);
> > > >                 tMap.addColumn(getState(), string);
> > > >                 tMap.addColumn(getZipCode(), string);
> > > >                 tMap.addColumn(getCountry(), string);
> > > >                 tMap.addColumn(getWebPage(), string);
> > > >                 tMap.addColumn(getAffiliation(), string);
> > > >     tMap.addColumn(getBrokenSubmit(), string);
> > > >         }
> > > > ...
> > > >         public String getUser_BrokenSubmit()
> > > >         {
> > > >                 return getTableUser() + '.' +getBrokenSubmit();
> > > >         }
> > > > }
> > > >
> > > > Hope this helps! Thanks
> > > > Stefan
> > > > BTW: I'm using Turbine 2.2b1 as part of Jetspeed 1.3a2
> > > >
> > > > Am Wednesday 12 March 2003 18:46 schrieben Sie:
> > > > > Can you post a copy of your TurbineUserAdapter,
> > > > > TurbineUserAdapterPeer, and TurbineMapBuilderAdapter?
> >
> > Depending
> >
> > > > > on how you implemented it, you may not have all of of these....
> > > > >
> > > > > --------------------------------------------
> > > > > Quinton McCombs
> > > > > NequalsOne - HealthCare marketing tools
> > > >
> > > > mailto:[EMAIL PROTECTED]
> > > >
> > > > > http://www.NequalsOne.com
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Stefan Kuhn [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Wednesday, March 12, 2003 11:27 AM
> > > > > > To: Turbine Users List
> > > > > > Subject: Problems extending TURBINE_USER
> > > > > >
> > > > > >
> > > > > > Hello,
> > > > > > I'm having problems when extending the TURBINE_USER
> >
> > table in the
> >
> > > > > > database. I followed the HowTo and I think I did
> >
> > everything like
> >
> > > > > > described, but it works only partly. If I set one of my new
> > > > > > properties on a User object and then call
> > > > > > TurbineSecurity.saveUser(runData.getUser()) it gets written
> > > > > > to the db. But if
> > > > > > I take a user from the session and call getProperty, it is
> > > > > > always null, even
> > > > > > if the respective column in the db is not. I implemented the
> > > > > > setProperty/getProperty via the Perm hashtable, as described
> > > > > > in the HowTo. It
> > > > > > seems the perm hashtable gets written to database columns,
> > > > > > but the columns
> > > > > > are not read. Any ideas ? Can anybody tell me where exactly
> > > > > > the hashtable is
> > > > > > filled - I could do some debugging then, but it's hard to
> > > > > > find the place in
> > > > > > all the classes.
> > > > > > Thanks a lot
> > > > > > Stefan
> > > > > >
> > > > > > --
> > > > > > Stefan Kuhn M. A.
> > > > > > Cologne University BioInformatics Center
> > > > > > (http://www.cubic.uni-koeln.de) Z�lpicher Str. > 47,
> >
> > 50674 Cologne
> >
> > > > > > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-5092
> >
> > --------------------------------------------------------------------
> >
> > > > -
> > > >
> > > > > > To unsubscribe, e-mail:
> > > >
> > > > [EMAIL PROTECTED]
> > > >
> > > > > > For additional commands, e-mail:
> > > >
> > > > [EMAIL PROTECTED]
> > > >
> > > > --
> > > > Stefan Kuhn M. A.
> > > > Cologne University BioInformatics Center
> > > > (http://www.cubic.uni-koeln.de)
> > > > Z�lpicher Str. 47, 50674
> > > > Cologne
> > > > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-5092
> >
> > --------------------------------------------------------------------
> >
> > > > -
> > > > 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]
> >
> > --
> > Stefan Kuhn M. A.
> > Cologne University BioInformatics Center
> > (http://www.cubic.uni-koeln.de) Z�lpicher Str. > 47, 50674
> > Cologne
> > Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-5092
> >
> >
> > ---------------------------------------------------------------------
> > 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]

-- 
Stefan Kuhn M. A.
Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de)
Z�lpicher Str. 47, 50674 Cologne
Tel: +49(0)221-470-7428   Fax: +49 (0) 221-470-5092


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

Reply via email to