I am trying to port the app written for jboss to xdoclet+jboss. So the class is already there and I don't want to change the code to use the generated dataobject. However, I give it a try to modify the template which generates jaws.xml to do what I want it to do and I will post a patch.
Thanks! Michael. ----- Original Message ----- From: "Clarance Howatt" <[EMAIL PROTECTED]> To: "'Michael Larionov'" <[EMAIL PROTECTED]> Sent: Friday, November 09, 2001 10:50 AM Subject: RE: [Xdoclet-user] jdbc-type and sql-type for @jboss:cmp-field > I have not done what you are trying so I don't know if there is a way to > make it work. > > If, however, what you are trying to do is use the value object pattern to > get and set data, xdoclet does this for you. Simple include the getters and > setters for the persistent fields the way that you normally do. If you > don't want direct access to the getters and setters don't put them in the > interface. Now all you have to do is include the <dataobject\> element to > the ant script. This will have the result of generating the dataobject for > you, with all the getters and setters as well as including a getdata and > setdata method in the bean. > > Just a thought > C. > > -----Original Message----- > > From: Michael Larionov [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, November 08, 2001 5:59 PM > > To: Xdoclet mailing list > > Subject: Fw: [Xdoclet-user] jdbc-type and sql-type for > > @jboss:cmp-field > > > > > > > > > > > Yes, but not with the fields of a dependent value object. > > > In that case I have to use @jboss:cmp-field. > > > > > > I have the following situation: the field in an EJB is an > > object with the > > > cmp-fields > > > which corresopnd to the database fields. Corresopndingly I use the > > > doclet @jboss:cmp-field which is a class doclet rather than a method > > doclet. > > > Now, where should I put @jboss:sql-type and @jboss:jdbc-type? > > > In the fields of a dependent value class? > > > > > > The code looks like this: > > > > > > public abstract class UserBean extends EntityBean { > > > > > > /** > > > * @ejb:persistent-field > > > * @ejb:interface-method > > > * @jboss:not-persisted-field > > > */ > > > public abstract void setUserData(UserData newData); > > > /** > > > * @ejb:persistent-field > > > * @ejb:interface-method > > > * @jboss:not-persisted-field > > > */ > > > public abstract UserData getUserdata(); > > > > > > } > > > > > > public class UserData implements Serializable { > > > public String firstName; > > > public String lastName; > > > public Time wakeUpAt; > > > } > > > > > > Now, the database stores not a serialized UserData object > > but its fields, > > so > > > it looks like: > > > table users: > > > id > > > first_name > > > last_name > > > wake_up_at > > > > > > Of course, I used the doclet tag: > > > > > > @jboss:cmp-field field-name="data.firstName" > > column-name="first_name" > > > > > > which works fine, but for wake_up_at I need to tell jaws additional > > > information, like > > > jdbc-type and sql-type, so I would expect the tag to look like: > > > > > > @jboss:cmp-field field-name="wakeUpAt" > > > column-name="wake_up_at" > > > jdbc-type="TIME" > > > sql-type="TIME" > > > > > > Is there any other way? > > > > > > Thanks! > > > > > > Michael. > > > > > > > > > ----- Original Message ----- > > > From: "Clarance Howatt" <[EMAIL PROTECTED]> > > > To: "'Michael Larionov'" <[EMAIL PROTECTED]> > > > Sent: Thursday, November 08, 2001 5:15 PM > > > Subject: RE: [Xdoclet-user] jdbc-type and sql-type for > > @jboss:cmp-field > > > > > > > > > > It is. We do it all the time. > > > > > > > > @jboss:sql-type > > > > @jboss:jdbc-type > > > > > > > > C. > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Michael Larionov [mailto:[EMAIL PROTECTED]] > > > > > Sent: Thursday, November 08, 2001 3:09 PM > > > > > To: Xdoclet mailing list > > > > > Subject: [Xdoclet-user] jdbc-type and sql-type for > > @jboss:cmp-field > > > > > > > > > > > > > > > Hi, > > > > > > > > > > I am wondering why isn't it possible to specify jdbc-type abd > > > > > sql-type for > > > > > @jboss:cmp-field. > > > > > > > > > > Thanks! > > > > > > > > > > Michael. > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > 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 > > _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
