org.jbox.dao
Class Page

java.lang.Object
  extended by org.jbox.dao.Page
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PageProxy

public class Page
extends java.lang.Object
implements java.io.Serializable

A class represents a web page, but without any html tag. The data mapping details refer to "Page.hbm.xml".

Version:
1.0
Author:
YiBin.H
See Also:
PageHome, Word, Serialized Form

Constructor Summary
Page()
           
 
Method Summary
 java.lang.String getText()
          Return the text(without html tag) of page.
 java.lang.String getTitle()
          Return page title.
 java.lang.String getUrl()
          Return the URL of page.
 long getUrlId()
          Return the id of Page in data base.
 int getWordNum()
          Return the words number of page.
 java.util.Collection<Word> getWords()
          Return a collection containing Word objects of page.
 void setText(java.lang.String text)
          Set the text(without html tag) of page.
 void setTitle(java.lang.String title)
          Set the title of page.
 void setUrl(java.lang.String url)
          Set the URL of page.
 void setUrlId(long urlId)
          Set id of page.
 void setWordNum(int wordNum)
          Set the words number of page.
 void setWords(java.util.Collection<Word> words)
          Set a collection containing Word object.
 java.lang.String toString()
          Return string of URL of Page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Page

public Page()
Method Detail

getTitle

public java.lang.String getTitle()
Return page title.

Returns:
String.

setTitle

public void setTitle(java.lang.String title)
Set the title of page.

Parameters:
title - String.

getUrl

public java.lang.String getUrl()
Return the URL of page.

Returns:
String

setUrl

public void setUrl(java.lang.String url)
Set the URL of page.

Parameters:
url - String

getText

public java.lang.String getText()
Return the text(without html tag) of page.

Returns:
String

setText

public void setText(java.lang.String text)
Set the text(without html tag) of page.

Parameters:
text - String

getWordNum

public int getWordNum()
Return the words number of page.

Returns:
Integer

setWordNum

public void setWordNum(int wordNum)
Set the words number of page.

Parameters:
wordNum - Integer

getUrlId

public long getUrlId()
Return the id of Page in data base.

Returns:
long.

setUrlId

public void setUrlId(long urlId)
Set id of page.

Parameters:
urlId - id of page.

getWords

public java.util.Collection<Word> getWords()
Return a collection containing Word objects of page.

Returns:
Collection containing Word objects.

setWords

public void setWords(java.util.Collection<Word> words)
Set a collection containing Word object. It should be noticed that the collection doesn't be updated to database when invoking PageHome.savePage(Page).

Parameters:
words - Collection containing Word objects.

toString

public java.lang.String toString()
Return string of URL of Page.

Overrides:
toString in class java.lang.Object
Returns:
String.