db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Sherman <Neil.Sher...@trapezegroup.co.uk>
Subject Torque Objects Implementing a Defined Interface
Date Mon, 04 Jul 2011 11:01:12 GMT

Is it possible to get generated Torque objects to implement a specific 
interface ?

For example I have a Torque configuration that produces me a class called 
TestOne that has a number of methods on it. 

What I'd like to do is define an interface that only exposes one of those 
methods.  That way I can pass this object around by interface, and only 
expose a certain proportion of its capability.

So the generated class definition is something like:

public  class TestOne
    extends my.class.package.BaseTestOne
    implements Persistent

And I'd like it to become:

public  class TestOne
    extends my.class.package.BaseTestOne
    implements Persistent, MyDefinedInterface

I'm not expecting the generated class to implement any additional methods, 
just group some of its existing methods into a define interface.

Thanks for your time


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message