----- Original Message -----
From: Rafal Krzewski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 12, 2000 1:50 AM
Subject: extending Turbine user information
> Hello!
>
> In the system we are working on, there is a need to store some
> information about an user that is not covered by current Visitor table.
> It is not neceserily generic enough, that I would suggest adding it to
> the default Turbine database.
> We are thinking about correct way of implementing it and these are the
> approaches we could think of:
>
> 1. Creaing an additional table in the database containg the information
> that is not present in Visitor, using VISITORID as a primary key,
> and writing SQL statements to access it as necessary
>
> 2. Creating an additiona table in the database containg all personal
> information about an user, using only VISITORID, LOGINID,
PASSWORD_VALUE
> and CONFIRMED_VALUE from Visitor (let's say, these are system-level
information,
> and our table is application-level information).
> We could also use Peers model creating classes UserInfomation and
> UserInformationPeer, and subclass TurbineMapBuilder as neccessary.
>
> 3. Create an SQL script to ALTER TABLE VISITOR ADD ... the fields we want,
> Subclass TurbineUser, TurbineUserPeer and TurbineMapBuilder as
neccessary.
>
> 4. Other possibilites?
>
TurbineUser(Peer) is written so that additional columns can be added to the
Visitor table. The column values are then available through
turbineUser.getPerm("fullcolumnname").
This is a quick solution, if you can live with casting your attributes
whenever you want to use them.
Otherwise write your own XTurbineUser, etc. I do not think you gain much by
subclassing the Peer, as I do not know of any way in Java to dynamically
cast. But you can cut-and-paste the code from TurbineUserPeer. I would say
this is the correct way to go if your User object contains much additional
functionality. TurbineUser obviously doesn't model every situation.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]