Chinaunix首页 | 论坛 | 博客
  • 博客访问: 596277
  • 博文数量: 765
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 5005
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-16 18:49
文章分类

全部博文(765)

文章存档

2011年(1)

2008年(764)

我的朋友

分类:

2008-10-16 18:56:11

 

package test;

    import java.util.Set;
    import java.util.TreeSet;

    /** *//**
     * @hibernate.class table="test_position"
     */
    public class Position ...{

        private int id;

        private int name;

        private Set users = new TreeSet();

        /** *//**
         * @hibernate.id generator-class="identity" type="int"
         */
        public int getId() ...{
            return id;
        }

        public void setId(int id) ...{
            this.id = id;
        }

        /** *//**
         * @hibernate.property length="25"
         */
        public int getName() ...{
            return name;
        }

        public void setName(int name) ...{
            this.name = name;
        }

        /** *//**
          * @hibernate.set inverse="true" lazy="true" table="test_user_position"
          * @hibernate.collection-key column="position_id"
          * @hibernate.collection-many-to-many class="test.Users" column="user_id"
          */
        public Set getUsers() ...{
            return users;
        }

        public void setUsers(Set users) ...{
            this.users = users;
        }
    }

    package test;

    import java.util.Set;
    import java.util.TreeSet;

    /** *//**
     * @hibernate.class table="test_position"
     */
    public class Position ...{

        private int id;

        private int name;

        private Set users = new TreeSet();

        /** *//**
         * @hibernate.id generator-class="identity" type="int"
         */
        public int getId() ...{
            return id;
        }

        public void setId(int id) ...{
            this.id = id;
        }

        /** *//**
         * @hibernate.property length="25"
         */
        public int getName() ...{
            return name;
        }

        public void setName(int name) ...{
            this.name = name;
        }

        /** *//**
          * @hibernate.set inverse="true" lazy="true" table="test_user_position"
          * @hibernate.collection-key column="position_id"
          * @hibernate.collection-many-to-many class="test.Users" column="user_id"
          */
        public Set getUsers() ...{
            return users;
        }

        public void setUsers(Set users) ...{
            this.users = users;
        }
    }

    package test;

    import java.util.Set;
    import java.util.TreeSet;

    /** *//**
     * @hibernate.class table="test_position"
     */
    public class Position ...{

        private int id;


--------------------next---------------------

阅读(187) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~