Discussion:
[Middlegen-user] why do we have EntityBean inheritance from middlegen ???
Oconnor, James H
2003-01-17 00:39:02 UTC
Permalink
I notice that the middlegen tool not only generates the entitybean (say
class A ), but there is an additional class the is generated (Class B).
Class B extends Class A. Furthermore, class B and not class A is referenced
in the ejb-jar file as the entitybean. Also class B doesn't contain
relationships, only the direct mappings to the table. I also noticed that
class B always has the name "CMP" appended to the class name. What is the
purpose of class B ??? I've dug arond the templates, but can't figure out
what is going on.

Here is an example ...
public abstract class CustomerCMP extends CustomerBean implements
javax.ejb.EntityBean


p.s. Middlegen will save the world.


Thanks!
-jim
Hal Deadman
2003-01-17 13:21:08 UTC
Permalink
The CMP bean is generated by xdoclet, not middlegen. Extending the bean
class allows Xdoclet to add the various ejb* required methods that aren't in
your Bean class, it also enables xdoclet to add methods dealing with value
objects. There are probably other reasons for it as well.
-----Original Message-----
Of Oconnor,
James H
Sent: Thursday, January 16, 2003 9:38 PM
Subject: [Middlegen-user] why do we have EntityBean inheritance from
middlegen ???
I notice that the middlegen tool not only generates the
entitybean (say
class A ), but there is an additional class the is generated
(Class B).
Class B extends Class A. Furthermore, class B and not class
A is referenced
in the ejb-jar file as the entitybean. Also class B doesn't contain
relationships, only the direct mappings to the table. I also
noticed that
class B always has the name "CMP" appended to the class name.
What is the
purpose of class B ??? I've dug arond the templates, but
can't figure out
what is going on.
Here is an example ...
public abstract class CustomerCMP extends CustomerBean implements
javax.ejb.EntityBean
p.s. Middlegen will save the world.
Thanks!
-jim
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information
by implementing
SSL on your Apache Web Server. Click here to get our FREE
Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...