Update of /cvsroot/xdoclet/xdoclet/samples/src/java/test/hibernate30
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17848/src/java/test/hibernate30

Modified Files:
        Pet.java 
Log Message:
XDT-1478: added @hibernate.idbag tag

Index: Pet.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/samples/src/java/test/hibernate30/Pet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Pet.java    2 May 2005 14:36:59 -0000       1.1
--- Pet.java    29 Jul 2005 17:42:16 -0000      1.2
***************
*** 1,37 ****
! package test.hibernate30;

! 

! /**

!  * @author Administrator

!  *

!  * @hibernate.subclass

!  *  table="PETS"

!  *  discriminator-value="pet"

!  */

! public class Pet extends Product {

! 

!       private Animal animal;

! 

!       /**

!        * Constructor for Pet.

!        */

!       public Pet() {

!               super();

!       }

! 

!       /**

!        * @hibernate.one-to-one

!        * @return Animal

!        */

!       public Animal getAnimal() {

!               return animal;

!       }

! 

!       /**

!        * Sets the animal.

!        * @param animal The animal to set

!        */

!       public void setAnimal(Animal animal) {

!               this.animal = animal;

!       }

! 

! }

--- 1,2 ----
! package test.hibernate30;

import java.util.Collection;

/**
 * @hibernate.subclass
 *     table="PETS"
 *     discriminator-value="pet"
 */
public class Pet extends Product {

        private Animal animal;
        
        private Collection lovers;

        /**
         * Constructor for Pet.
         */
        public Pet() {
                super();
        }

        /**
         * @hibernate.one-to-one
         * @return Animal
         */
        public Animal getAnimal() {
                return animal;
        }

        /**
         * Sets the animal.
         * @param animal The animal to set
         */
        public void setAnimal(Animal animal) {
                this.animal = animal;
        }
        
        /**
         * @hibernate.idbag
         *     table="PEOPLE"
         *     
         *     @hibernate.collection-id
         *         column="ID"
         *         type="long"
         * 
         *         @hibernate.generator
         *             class="sequence"
         *         
         *     @hibernate.key
         *         column="ID"
         *         
         *     @hibernate.many-to-many
         *         column="LOVER"
         *         class="test.hibernate30.Person"
         *         outer-join="true"
!        */
        public Collection getLovers() {
                return this.lovers;
        }

        public void setLovers(Collection lovers) {
                this.lovers = lovers;
        }

}

\ No newline at end of file



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to