|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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)
PageHomePage object from data base by the specified id.
findById in interface PageHomeid - Page object id, a long value.
Page objectpublic Page[] findByIds(long[] ids)
PageHomePage objects from data base by IDs.
findByIds in interface PageHomeids - Integer array containing id of Page object.
Page array.public Page findByUrl(java.lang.String url)
PageHome
findByUrl in interface PageHomepublic long findPageNum()
findPageNum in interface PageHomepublic long savePage(Page p)
PageHomePage object to data base,and return the page id in data
base.
savePage in interface PageHomep - a Page to save.
Page object.public void deletePage(Page p)
PageHomePage object from data base.
deletePage in interface PageHomep - Page object needed to delete.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||