|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbox.dao.PageHomeByHibernate
public class PageHomeByHibernate
Implementation of PageHome
with hibernate.
It should be noticed that because there may be thousands of data written to data base when crawl Internet, it should be noticed that hibernate may not be the best choice for writing data base. If needed better performance, stored procedure may be a better choice.
Page
Constructor Summary | |
---|---|
PageHomeByHibernate()
|
Method Summary | |
---|---|
void |
deletePage(Page p)
Delete a Page object from data base. |
Page |
findById(long id)
Find a Page object from data base by the specified id. |
Page[] |
findByIds(long[] ids)
Find Page objects from data base by IDs. |
Page |
findByUrl(java.lang.String url)
Count the number of records in table "page" in data base. |
long |
findPageNum()
|
long |
savePage(Page p)
Save a Page object to data base,and return the page id in data
base. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageHomeByHibernate()
Method Detail |
---|
public Page findById(long id)
PageHome
Page
object from data base by the specified id.
findById
in interface PageHome
id
- Page
object id, a long value.
Page
objectpublic Page[] findByIds(long[] ids)
PageHome
Page
objects from data base by IDs.
findByIds
in interface PageHome
ids
- Integer array containing id of Page
object.
Page
array.public Page findByUrl(java.lang.String url)
PageHome
findByUrl
in interface PageHome
public long findPageNum()
findPageNum
in interface PageHome
public long savePage(Page p)
PageHome
Page
object to data base,and return the page id in data
base.
savePage
in interface PageHome
p
- a Page
to save.
Page
object.public void deletePage(Page p)
PageHome
Page
object from data base.
deletePage
in interface PageHome
p
- Page
object needed to delete.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |