KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mvnforum > phpbb2mvnforum > db > jdbc > ThreadDAOImplXML


1 package org.mvnforum.phpbb2mvnforum.db.jdbc;
2
3 import java.sql.Timestamp JavaDoc;
4 import java.util.Collection JavaDoc;
5 import java.util.Iterator JavaDoc;
6
7 import net.myvietnam.mvncore.exception.CreateException;
8 import net.myvietnam.mvncore.exception.DatabaseException;
9 import net.myvietnam.mvncore.exception.DuplicateKeyException;
10 import net.myvietnam.mvncore.exception.ForeignKeyNotFoundException;
11 import net.myvietnam.mvncore.exception.ObjectNotFoundException;
12
13 import org.mvnforum.phpbb2mvnforum.db.CategoryBean;
14 import org.mvnforum.phpbb2mvnforum.db.ThreadBean;
15 import org.mvnforum.phpbb2mvnforum.db.ThreadDAO;
16 import org.mvnforum.util.DBUtils;
17 import org.mvnforum.util.Phpbb2MvnforumConfig;
18 import org.w3c.dom.Document JavaDoc;
19 import org.w3c.dom.Element JavaDoc;
20
21 public class ThreadDAOImplXML implements ThreadDAO {
22
23     public void findByPrimaryKey(int threadID)
24         throws ObjectNotFoundException, DatabaseException {
25         // TODO Auto-generated method stub
26

27     }
28
29     public int createThread(int ThreadID, int forumID, String JavaDoc memberName, String JavaDoc lastPostMemberName,
30             String JavaDoc threadTopic, String JavaDoc threadBody, int threadVoteCount, int threadVoteTotalStars,
31             Timestamp JavaDoc threadCreationDate, Timestamp JavaDoc threadLastPostDate, int threadType, int threadOption,
32             int threadStatus, int threadHasPoll, int threadViewCount, int threadReplyCount, String JavaDoc threadIcon,
33             int threadDuration, int threadAttachCount)
34         throws ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException,
35         DuplicateKeyException {
36         // TODO Auto-generated method stub
37
return 0;
38     }
39
40     public void createMultiple(Collection JavaDoc beans) {
41         // TODO Auto-generated method stub
42
Document JavaDoc doc = DBUtils.getDomDocument();
43         Element JavaDoc element = doc.createElement("ThreadList");
44         doc.appendChild(element);
45         for (Iterator JavaDoc iter = beans.iterator(); iter.hasNext(); ) {
46             ThreadBean bean = (ThreadBean)iter.next();
47             bean.getBeanDocument(doc, element);
48         }
49         //DBUtils.writeXmlFile(doc, Phpbb2MvnforumConfig.EXPORT_XML);
50
}
51
52 }
53
Popular Tags