Patches item #748970, was opened at 2003-06-04 16:17
Message generated for change (Comment added) made by rkunze
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536547&aid=748970&group_id=73047
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard Kunze (rkunze)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improved EJB cartridge
Initial Comment:
Attached is an improved EJB cartridge that provides the following
features above the current EJB cartridge:
- Support for inheritance: If an <<Entity>> or <<Service>> class
extends another class, this is reflected in the generated EJB. If the
super class itself is an <<Entity>> or <<Service>>, the generated
*Bean extends the *BeanInmpl of the super class. In all other
cases, the generated *Bean extends the given super class.
- Support for arbitrary primary key types: If a <<Entity>> class or
any of its super classes has a dependency that is stereotyped as
<<PrimaryKey>>, the provider of that dependency is used as the
primary key type. If no such dependency exists but the class (or a
super class) has a field stereotyped as <<PrimaryKey>>, the type
of this field is used as primary key type. If neither a PK dependency
nor a PK field is found, the primary key type defaults to
"java.lang.String"
- Support for "abstract EJBs": If an <<Entity>> or <<Service>> is
declared abstract in the model, the "@ejb.bean generate" attribute
is set to "false" in the *Bean class. This means that XDoclet will
generate home and component interfaces for this class, but no
deployment descriptor entries.
- Improved support for attributes:
- For attributes that are marked readonly, the setter method is
not exposed to the component interface.
- Non-public attributes are not exposed to the component
interface.
- Attributes marked as both static and read-only are treated as
constants. For each constant, a getter method is created that
returns the initial value of the attribute as defined in the model.
If the constant is public, the getter is exposed on both the
home and component interfaces (i.e. the getter is marked as
"@ejb.interface-method", and an additional ejbHomeGet*()
method is generated). If the constant is stereotyped as
<<EnvEntry>>, an corresponding "@ejb.env-entry" tag is
generated and the getter returns the value of this entry
- Improved support for relations:
- Relation names are constructed based on the model
- Relations of an abstract <<Entity>> are "inherited" by
all derived <<Entity>> classes: For every such relation, a
corresponding get* method and "@ejb.relation" tag is generated
in the derived *Bean class. The only restriction is that the
navigable target of a relation must not be abstract. If it is
abstract, the generator stops with an exception.
- Improved support for operations:
- Non-public operations methods are not exposed on the
interfaces
- Operations declared as both public and static are interpreted as
home methods, i.e. the method name of the generated method is
prefixed with "ejbHome", and the method is marked as
"@ejb.home-method" instead of "@ejb.interface-method"
----------------------------------------------------------------------
>Comment By: Richard Kunze (rkunze)
Date: 2003-06-25 09:43
Message:
Logged In: YES
user_id=785616
New version for the improved EJB cartridge. Still very much work in
progress.
Changes to the previous version:
- Tons of bug fixes
- Support for arbitrary super interfaces for the bean component interface:
The bean's component interface extends all interfaces that are realized by
the corresponding <<Entity>> or <<Service>> class in UML.
- Generate home and component interfaces directly because XDoclet gets
confused by the *Bean/*BeanImpl pairs and generates the wrong
inheritance hierarchy, doesn't support multiple super interfaces for a
component interface and cannot properly handle accessors for CMR
relations that are defined on an abstract entity.
- Add support for <<ResourceRef>> dependencies. For every
<<ResourceRef>> class dependency, an "@ejb.resource-ref" class tag is
generated. The name of the referenced resource is the name of the
dependency if given or the unqualified class name of the supplier if the
dependency has no name. Along with the resource-ref tag, a matching
getter to access the dependency is generated.
- Support for the tagged value "@andromda.ejb.generateCMR" on
relations. If this tagged value is set to "false", no CMR xdoclet tags will be
generated for this relation. get/set-Methods are still generated though -
they have to be implemented in the *BeanImpl class.
- Preliminary support for generating SQL scripts to create/drop the
database structure. This is a quick hack to support my current project and
will probably be dropped again in the future because I think Xdoclet is
better at generating that kind of stuff.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536547&aid=748970&group_id=73047
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel