Hi again,

Day, Michael-IBM/TT wrote:
> Thanks for the explanation.  I have one question for clarification.  You
> stated that I have to provide the object model containing the entity
> classes.  Is there anything in particular that these classes must have,
> besides the fields that map to the columns in a DB table?  Do they need to
> implement any OJB interfaces?

- It's not necessary to implement any OJB interface.

- a persistent capabable class must provide a public no-argument constructor

- OJB provide several attribute access strategies. If you choose the 
default version attributes are access via java reflection. In this mode 
attribute may be declared private. They won't need any getter or setter 
methods.
There is also a Javabeans compliant strategy. In this mode there must be 
public getter and setter methods that will be used to access attributes.

-  There must be at least one attribute that is declared as primary key. 
  OJB can only handle entities that can be identified by a PK.

- For 1:1, 1:n and n:m associations there must be attributes in the 
persistent class that hold the values of the respective foreign key columns.

cheers,
Thomas

> 
> -----Original Message-----
> From: Mahler Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 3:23 AM
> To: 'OJB Users List'
> Subject: AW: HELP with setup
> 
> 
> Hi,
> 
> 
>>I need help!  I cannot find enough documentation that 
>>explains what one
>>needs to do with a new project.  
>>
>>If I understand correctly, OJB will take a database schema 
>>(expressed in
>>XML) and generate everything I need to access the database 
>>entities through
>>objects. 
> 
> 
> No that's not correct.
> OJB is formost a *mapping* tool. that is you'll have to provide an object
> model containing all your entity classes.
> You also have to build a corresponding database schema.
> Then you have to write the repository.xml file that defines the mapping
> between object model and relational database schema.
> 
> We have *some* support for automatic generation from rdbms schema to
> repository.xml and oo model. We also have a tool to generate the rdbms
> tables from the repository.xml.
> These tools are mentioned in the last section of tutorial1.html.
> BUT: These tools are not working properly right now!
> We plan to have a complete forward/reverse engineering suite in the 2.0
> release!
> 
> 
> 
>>I cannot figure out how to make this happen.  I have found a
>>little information on the OJB jakarta site that shows example 
>>configuration
>>files; however, what do I do after writing these files?  
>>Don't I need to
>>create a build.xml for ant that will facilitate the class generation?
>>
> 
> As mentioned: we don't do any class generation!
> Please read our tutorials to learn how OJB works.
> 
> cheers,
> Thomas
> 
> 
>>__________________________________________________
>>Michael Blake Day
>>Nextel Communications, Inc.
>>email: [EMAIL PROTECTED]
>>desk: 678.966.4792 
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 



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

Reply via email to