Thanks for your suggestion.  It works great.  You are right about the format
of "getFOO" in order for it to be pulled into the value object.  I ran a
test with just the "FOO" function name and it was ignored by the value
object.

Fee

-----------------------------------------------------
Subject: RE: [Xdoclet-user] value object question
Date: Thu, 5 Jun 2003 21:48:50 -0700
From: "Harkness, David" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]

If you don't want to denormalize by putting author_name on your Book
bean (I wouldn't either), you can create an accessor on Book:

  /**
   * Convenience method to pull the <tt>authorName</tt> field from the
Author.
   *
   * @ejb.interface-method
   * @value-object match=3D"*" // or whatever you're using
   */
  public String getAuthorName ( )
  {
    return getAuthor().getName();
  }

I'm currently doing this and it's working. Note that you pay the cost of
loading your Author bean (at least the name field if the fields are
loaded in groups). I believe that because it's a "getFOO" accessor, it
will be pulled into the "*" value object automatically, but I cannot
confirm this as we've created our own value object class -- don't ask.
;)

Peace,
Dave

David Harkness
Sony Pictures Digital Networks

-----Original Message-----
From: Fee Ling Chin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 9:31 PM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] value object question


Hi All,

I have 2 CMR entity beans: Book and Author.  Book has an AuthorId
foreign key.  I generated a value object for the Book bean and I would
like to return the value object to the client program.  The value object
defaults to
having the get/set AuthorId funnctions.   My confusion is how to replace
the
get/set AuthorId foreign key with the Author's name?  In other words,
what does one do with value objects of CMR beans with foreign keys?

Thanks,
Fee




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user



--__--__--

_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


End of xdoclet-user Digest




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to