FileDocCategorySizeDatePackage
ListComments.javaAPI DocExample1393Mon Mar 31 23:08:52 BST 2003org.dasein.gb.persist

ListComments

public class ListComments extends org.dasein.persist.Execution

Fields Summary
public static final String
COMMENTS
private static final String
LOAD
private static final int
APPROVED
private static final int
COMMENT_ID
Constructors Summary
Methods Summary
public java.lang.StringgetDataSource()

        return "jdbc/kyra";
    
public static org.dasein.gb.persist.ListCommentsgetInstance()

    
        
        return (ListComments)Execution.getInstance(ListComments.class);
    
public java.lang.StringgetStatement()

        return LOAD;
    
public java.util.HashMaprun()

    
          
        boolean app = ((Boolean)data.get(Comment.APPROVED)).booleanValue();
        ArrayList cmts = new ArrayList();
        HashMap res = new HashMap();

        res.put(COMMENTS, cmts);
        statement.setString(APPROVED, (app ? "Y" : "N"));
        results = statement.executeQuery();
        while( results.next() ) {
            Long cid = new Long(results.getLong(COMMENT_ID));

            cmts.add(cid);
        }
        return res;