On Wed, 2002-05-22 at 05:43, Prashant Singhal wrote:
> Hi,
> 
> I want to know if we can do the following...
> 
> Create a column in the schema, say XYZ.
> Now XYZ is stored in the DB as an INTEGER. But on the java side, I want it 
> to be represented as an ENUM. Basicaly, when we access the column XYZ in 
> the java code, an ENUM is returned rather than an INTEGER. There might not 
> be any difference between ENUM and INTEGER but as far as the application is 
> concerned, it is dealing with an ENUM. It shouldn't matter how it is being 
> stored in the DB.

In this case I would create another method 

public Enum getXYZ()
{
    return new Enum(getXYZasInt());
}

where getXYZasInt() is the method created by torque.

> 
> Secondly, All the "om" classes are created in the same directory. (whatever 
> package name you provide). For instance, in the torque example provided, 
> all the classes for "Author", "Book", "Publisher" are created in the same 
> directory (say ABC). Is there a way so that the directory structure can be 
> "ABC/Author", "ABC/Book", "ABC/Publisher". This will result in a more 
> maintainable O/R layer for the developers. If all the classes are created 
> in the same directory, it becomes unmanageable after say 10-15 tables. 
> (more so if you're using "managers").
> 

no.  but your characterization of it being unmanageable after 15 tables
is a bit harsh.  I use managers with a db of 35 tables and do not have a
feeling of unmanageability.

john mcnally


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

Reply via email to