Kent,
class level:
/**
* @ejb.value-object
* name="full"
* match="*"
* @ejb.value-object
* name="light"
* match="light"
* @ejb.value-object
* name="none"
* match="none"
*/
all properties will be included in "full" value
object.
and in method level:
this will be included in "light"
/**
* @ejb.value-object
* match="light"
*/
....getOne();
this will be included in "none"
/**
* @ejb.value-object
* match="none"
*/
....getTwo();
this will be included both in "light and "none"
/**
* @ejb.value-object
* match="light"
* @ejb.value-object
* match="none"
*/
....getThree();
Sorry if I didn't make myself clear.
Hope it helps,
Guo
--- Kent Boogaart <[EMAIL PROTECTED]> 的正文:> guo
yingshou,
>
> So the answer is, "you can't do it"?? The reason I
> have "*full*" and
> "*light*" in the class-level value-object attributes
> is to attempt to ignore
> the externalId field which has a match of "none".
> How can I include the
> "full" and "light" but exclude the "none"?
>
> Kent
>
>
>
> class level tag:
>
> @ejb.value-object
> name="Test"
> match="light" /** not a regexp, just a name
> **/
>
> method level:
> /**
> @ejb.value-object
> match="light"
> */
> public *** get***(){
>
> this property will be included into the value
> object.
>
> --- Kent Boogaart <[EMAIL PROTECTED]> ???:>
> Hello All,
> >
> > I am trying to create two value objects for my
> > entity bean - one "full" and
> > one "light". However, I need to exclude a certain
> > field from being present
> > in any value object. Consider this:
> >
> > Full
> > ----
> > id : Integer
> > name : String
> > description : String
> >
> > Light
> > -----
> > id : Integer
> > name : String
> >
> > Ignored
> > -------
> > eternalId : int
> >
> > I have tried to achive this as follows:
> >
> > /**
> > * @ejb.bean
> > * cmp-version="2.x"
> > * name="Test"
> > * jndi-name="ejb/Test"
> > * local-jndi-name="ejb/TestLocal"
> > * primkey-field="id"
> > * schema="Test"
> > * type="CMP"
> > * view-type="both"
> > *
> > * @ejb.persistence
> > * table-name="test"
> > *
> > * @ejb.value-object
> > * name="Test"
> > * match="*full*"
> > *
> > * @ejb.value-object
> > * name="TestLight"
> > * match="*light*"
> > */
> > public abstract class TestBean implements
> EntityBean
> > {
> > /**
> > * @ejb.create-method
> > * @ejb.transaction type="Supports"
> > */
> > public String ejbCreate() throws
> CreateException {
> > return null;
> > }
> >
> > public void ejbPostCreate() {
> > }
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence column-name="id"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full-light"
> > */
> > public abstract Integer getId();
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence column-name="id"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full-light"
> > */
> > public abstract void setId(Integer id);
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence column-name="name"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full-light"
> > */
> > public abstract String getName();
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence column-name="name"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full-light"
> > */
> > public abstract void setName(String name);
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence
> column-name="description"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full"
> > */
> > public abstract String getDescription();
> >
> > /**
> > * @ejb.interface-method
> > * @ejb.persistence
> column-name="description"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="full"
> > */
> > public abstract void setDescription(String
> > description);
> >
> > /**
> > * @ejb.persistence
> column-name="external_id"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="none"
> > */
> > public abstract int getExternalId();
> >
> > /**
> > * @ejb.persistence
> column-name="external_id"
> > * @ejb.transaction type="Supports"
> > * @ejb.value-object match="none"
> > */
> > public abstract void setExternalId(int
> externalId);
> > }
> >
> > Everything I've tried has resulted in no matches
> > found and, consequently, no
> > fields in the value objects. What am I doing wrong
> > here?
> >
> > Thanks,
> > Kent
> >
> >
> >
>
>
>
-------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the
> latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user