[
https://issues.apache.org/jira/browse/TORQUE-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917618#action_12917618
]
CG Monroe commented on TORQUE-147:
----------------------------------
I'm -1 on making this a global change.
I'm concerned about how you would do generic methods without BaseClass. E.g.:
doSomethingBasedOnRecordType( BaseObject rec ) {
<use introspection to determine action>
}
Yes, I guess you can do the same thing using an object type. But IMHO, having
at least an Interface to limit objects to valid records is better for
documentation and compile time error checking.
FWIW - I have a bunch of code that does just this. Some of it does generic
stuff with the assumption of the presence of BaseObject methods in any record.
IMHO, while this is a nice way to migrate, it would add require too much
existing code to be changed if we just dropped BaseObject all together.
Having an interface seems like better middle ground.
If integration with external frameworks is a requirement for a subset of Torque
users, then perhaps this could be an generation time option.
Also, don't we handle a lot of this with the Beans generation options? If you
need to interface with another framework that deals with POJO objects, just
create a bean and pass it around. If the remote framework requires
annotations, perhaps this is where that should happen.
> Database objects should not need to inherit from BaseObject
> -----------------------------------------------------------
>
> Key: TORQUE-147
> URL: https://issues.apache.org/jira/browse/TORQUE-147
> Project: Torque
> Issue Type: Improvement
> Reporter: Thomas Fischer
> Assignee: Thomas Fischer
>
> Currently it is an error if database objects do not inherit from BaseObject.
> This makes embedding of Torque objects in other frameworks very difficult,
> because it does not allow to choose an own parent to inherit from.
> The minimum requirement would be that it is not required any more that
> database objects inherit from BaseObject.
> Ideally BaseObject dies and the base objects inherit directly from
> java.lang.object.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]