Hibernate 最简单例子 (10)

    publicvoid setDateCreated(Long dateCreated) {

       this.dateCreated = dateCreated;

    }

 

}

 

(4)User.java

package com.guoqiang.hibernate;

 

// Generated by MyEclipse Persistence Tools

 

/**

 *UsergeneratedbyMyEclipsePersistenceTools

 */

publicclass User extends AbstractUser implements java.io.Serializable {

 

    // Constructors

 

    /**defaultconstructor*/

    public User() {

    }

 

    /**fullconstructor*/

    public User(Integer id, String username, String password, String firstName,

           String lastName, Long dateCreated) {

       super(id, username, password, firstName, lastName, dateCreated);

    }

 

}

 

5DemoHibernateTest.java

package com.guoqiang.hibernate;

 

import org.hibernate.Transaction;

 

publicclass DemoHibernateTest {

 

    /**

     *@paramargs

     */

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzjzyw.html