6月22日 SSH 周五

package com.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.dto.Phone;

public class PhoneDao extends HibernateDaoSupport{

public List<Phone> getPhoneList() {
    Query query = getSession().createQuery("from Phone").setFirstResult(0).setMaxResults(2);
    List list = query.list();

// List find = getHibernateTemplate().find(“from Phone”);

    return list;
}

}

If you don’t go for a walk, you’ll think this is the world.
如果你不出去走走,你就会以为这就是全世界。
投稿人:『光畫』,他没有留下只言片语。小编想说:此处想引用邓布利多的一句话:决定我们成为什么样的人,不是我们的能力,而是我们的选择。

猜你喜欢

转载自blog.csdn.net/helloworld_1996/article/details/80778925