@Transactional public class PostCommentDAO extends Object
PostComment| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ADDTIME |
static String |
POSTID |
static String |
TEXT |
static String |
USERID |
| 构造器和说明 |
|---|
PostCommentDAO() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
attachClean(PostComment instance) |
void |
attachDirty(PostComment instance) |
List |
commentAndUser(int postid)
根据帖子id查所有回帖,排序为 id DESC
|
List |
commentAndUser(int postid,
int limit)
根据帖子id查回帖,排序为 id DESC
|
int |
count(int postid)
根据帖子id查回帖的数量
|
void |
delete(PostComment persistentInstance) |
List |
findAll() |
List<PostComment> |
findByAddtime(Object addtime) |
List<PostComment> |
findByExample(PostComment instance) |
PostComment |
findById(Integer id) |
List<PostComment> |
findByPostid(Object postid) |
List |
findByProperty(String propertyName,
Object value) |
List<PostComment> |
findByText(Object text) |
List<PostComment> |
findByUserid(Object userid) |
static PostCommentDAO |
getFromApplicationContext(org.springframework.context.ApplicationContext ctx) |
PostComment |
merge(PostComment detachedInstance) |
void |
save(PostComment transientInstance) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory) |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
public void save(PostComment transientInstance)
public void delete(PostComment persistentInstance)
public PostComment findById(Integer id)
public List<PostComment> findByExample(PostComment instance)
public List<PostComment> findByPostid(Object postid)
public List<PostComment> findByAddtime(Object addtime)
public List<PostComment> findByUserid(Object userid)
public List<PostComment> findByText(Object text)
public List findAll()
public PostComment merge(PostComment detachedInstance)
public void attachDirty(PostComment instance)
public void attachClean(PostComment instance)
public static PostCommentDAO getFromApplicationContext(org.springframework.context.ApplicationContext ctx)
public List commentAndUser(int postid)
postid - 帖子idpublic List commentAndUser(int postid, int limit)
postid - 帖子idlimit - 条数,若为0则显示所有public int count(int postid)
postid - 帖子id