package mircoders.storage;
-import java.sql.Connection;\r
-import java.sql.ResultSet;\r
-import java.sql.Statement;\r
-\r
-import mir.entity.EntityList;\r
-import mir.log.LoggerWrapper;\r
-import mir.storage.Database;\r
-import mir.storage.StorageObject;\r
-import mir.storage.StorageObjectExc;\r
-import mir.storage.StorageObjectFailure;\r
-import mircoders.entity.EntityComment;\r
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+import mir.entity.EntityList;
+import mir.log.LoggerWrapper;
+import mir.storage.Database;
+import mir.storage.StorageObject;
+import mir.storage.StorageObjectExc;
+import mir.storage.StorageObjectFailure;
+import mircoders.entity.EntityComment;
import mircoders.entity.EntityUploadedMedia;
/**
* <b>implements abstract DB connection to the comment_x_media SQL table
*
* @author RK, mir-coders group
- * @version $Id: DatabaseCommentToMedia.java,v 1.3.2.1 2003/09/03 17:49:41 zapata Exp $
+ * @version $Id: DatabaseCommentToMedia.java,v 1.3.2.2 2003/11/24 23:37:18 rk Exp $
*
*/
StorageObjectExc {
if (comment != null) {
try {
+ // TODO make this a count statement
if (selectByWhereClause("comment_id=" + comment.getId(), -1).size() ==
0)
return false;
public EntityList getAudio(EntityComment comment) throws StorageObjectFailure {
EntityList returnList = null;
if (comment != null) {
+// TODO rewrite as relational sql
// get all to_topic from media_x_topic
String id = comment.getId();
//this is not supported by mysql
public EntityList getVideo(EntityComment comment) throws StorageObjectFailure {
EntityList returnList = null;
if (comment != null) {
+// TODO rewrite as relational sql
// get all to_topic from media_x_topic
String id = comment.getId();
//this is not supported by mysql
StorageObjectFailure {
EntityList returnList = null;
if (comment != null) {
+// TODO rewrite as relational sql
// get all to_topic from media_x_topic
String id = comment.getId();
//this is not supported by mysql
EntityList returnList = null;
if (comment != null) {
+// TODO rewrite as relational sql
// get all to_topic from media_x_topic
String id = comment.getId();
//this is not supported by mysql
EntityList returnList = null;
if (comment != null) {
+// TODO rewrite as relational sql
// get all to_topic from media_x_topic
String id = comment.getId();
//this is not supported by mysql
StorageObjectFailure {
EntityList returnList = null;
if (media != null) {
+ // TODO rewrite as relational sql
String id = media.getId();
String select = "select comment_id from " + theTable + " where media_id=" +
id;
public EntityList getComment() throws StorageObjectFailure {
EntityList returnList = null;
+// TODO rewrite as relational sql
String select = "select distinct comment_id from " + theTable;
// execute select statement
Connection con = null;