1 package org.mvnforum.phpbb2mvnforum.db.jdbc; 2 3 import java.sql.Timestamp ; 4 import java.util.Collection ; 5 import java.util.Iterator ; 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.PostBean; 15 import org.mvnforum.phpbb2mvnforum.db.PostDAO; 16 import org.mvnforum.util.DBUtils; 17 import org.mvnforum.util.Phpbb2MvnforumConfig; 18 import org.w3c.dom.Document ; 19 import org.w3c.dom.Element ; 20 21 public class PostDAOImplXML implements PostDAO { 22 23 public void findByPrimaryKey(int postID) 24 throws ObjectNotFoundException, DatabaseException { 25 27 } 28 29 public void create(int postID, int parentPostID, int forumID, int threadID, int memberID, String memberName, 30 String lastEditMemberName, String postTopic, String postBody, Timestamp postCreationDate, 31 Timestamp postLastEditDate, String postCreationIP, String postLastEditIP, int postEditCount, 32 int postFormatOption, int postOption, int postStatus, String postIcon, int postAttachCount) 33 throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException { 34 36 } 37 38 public void createMultiple(Collection beans) { 39 Document doc = DBUtils.getDomDocument(); 41 Element element = doc.createElement("PostList"); 42 doc.appendChild(element); 43 for (Iterator iter = beans.iterator(); iter.hasNext(); ) { 44 PostBean bean = (PostBean)iter.next(); 45 bean.getBeanDocument(doc, element); 46 } 47 DBUtils.writeXmlFile(doc, Phpbb2MvnforumConfig.EXPORT_XML); 48 } 49 50 } 51 | Popular Tags |