org.jbox.dao
Class WordHomeByHibernate

java.lang.Object
  extended by org.jbox.dao.WordHomeByHibernate
All Implemented Interfaces:
WordHome

public class WordHomeByHibernate
extends java.lang.Object
implements WordHome

Implementation of WordHome with hibernate.

Because there are a large number of data to be written to database when crawling 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.

Version:
1.0
Author:
YiBin.H
See Also:
Word

Constructor Summary
WordHomeByHibernate()
           
 
Method Summary
 void deleteWord(Word w)
          Delete a Word object from data base.
 Word findByWordStr(java.lang.String wordStr)
          Find a Word object from data base by the specified string.
 void saveWord(Word w)
          Save a Word object to data base.
 void saveWords(Word[] words)
          Save Word objects in an array to data base.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordHomeByHibernate

public WordHomeByHibernate()
Method Detail

findByWordStr

public Word findByWordStr(java.lang.String wordStr)
Description copied from interface: WordHome
Find a Word object from data base by the specified string.

Specified by:
findByWordStr in interface WordHome
Parameters:
wordStr - String.
Returns:
Word object with the specified string.

saveWord

public void saveWord(Word w)
Description copied from interface: WordHome
Save a Word object to data base.

Specified by:
saveWord in interface WordHome
Parameters:
w - < Word object to be saved.

saveWords

public void saveWords(Word[] words)
Description copied from interface: WordHome
Save Word objects in an array to data base.

Specified by:
saveWords in interface WordHome
Parameters:
words - array containing Word objects to be saved.

deleteWord

public void deleteWord(Word w)
Description copied from interface: WordHome
Delete a Word object from data base.

Specified by:
deleteWord in interface WordHome
Parameters:
w - Word object to be deleted.