Kevin (and Mark Lundequist)
Thank you.
These suggestions work fine.

Charlie


Kevin Hagel wrote:


Here is an example I wrote for someone, a Name component of a Person.
hibernatedoclet sees the property tags, it knows what to do. There are no class-level tags needed.


package com.hagel.domain;

/**
* Basic Name object, a component of a Person.
*
*/
public class Name {
   private String firstName;
   private String lastName;
   private Character initial;

   /** JavaBean contract for hibernate */
   public Name() {}

   /** Convenience constructor for transient Name objects */
   public Name(String first, Character middle, String last) {
       firstName = first;
       initial = middle;
       lastName = last;
   }


/** * Retrieve first name. * @hibernate.property * type="string" * length="16" * unique="false" */ public String getFirstName() { return firstName; }

   public void setFirstName(String firstName) {
       this.firstName = firstName;
   }

   /**
    * @hibernate.property
    *
   */
   public Character getInitial() {
       return initial;
   }

   public void setInitial(Character initial) {
       this.initial = initial;
   }

   /**
    * Retrieve last name.
    * @hibernate.property
    *      type="string"
    *      length="24"
    *      unique="false"
   */
   public String getLastName() {
       return lastName;
   }

   public void setLastName(String lastName) {
       this.lastName = lastName;
   }

   public String toString() {
       StringBuffer buf = new StringBuffer()
           .append(firstName)
           .append(' ');
       if (initial!=null) buf.append(initial)
           .append(' ');
       return buf.append(lastName)
           .toString();
   }

}



Charlie Kelly wrote:

What is the correct way to add properties within a Hibernate component,
when the component class will not be store in a separate table
(that is, there is no hibernate.class tag)?

Thanks

Charlie



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user





------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to